Flag de autonegociación

This commit is contained in:
Sandino Araico Sanchez 2021-11-24 13:25:09 -06:00
parent 8929ad09b8
commit ee63874c72

View file

@ -52,16 +52,22 @@ for VLAN in {10..4000} ; do # Most vLANs
fi
ip link set $VLAN_BOND up
[[ -n $MTU ]] && ip link set $VLAN_BOND mtu $MTU
AUTONEG=`cut -d ',' -f 8 <<< $VLAN_CONF | grep 'A'`
if [[ -z $AUTONEG ]] ; then
AUTONEG_FLAGS='autoneg off';
else
AUTONEG_FLAGS='';
fi
if [[ -n $SPEED ]] ; then
ethtool -s $SLAVE_0 autoneg off speed $SPEED duplex full
ethtool -s $SLAVE_1 autoneg off speed $SPEED duplex full
ethtool -s $SLAVE_0 $AUTONEG_FLAGS speed $SPEED duplex full
ethtool -s $SLAVE_1 $AUTONEG_FLAGS speed $SPEED duplex full
fi
sleep 5
ifenslave $VLAN_BOND $SLAVE_0 $SLAVE_1
sleep 5
fi
UNTAGGED=`cut -d ',' -f 8 <<< $VLAN_CONF`
if [[ $UNTAGGED == 'U' ]] ; then
UNTAGGED=`cut -d ',' -f 8 <<< $VLAN_CONF | grep 'U'`
if [[ -n $UNTAGGED ]] ; then
ip addr add $VLAN_IP/$MASK dev $VLAN_BOND
else
ip link add link $VLAN_BOND \