Flag de autonegociación
This commit is contained in:
parent
8929ad09b8
commit
ee63874c72
1 changed files with 10 additions and 4 deletions
|
@ -52,16 +52,22 @@ for VLAN in {10..4000} ; do # Most vLANs
|
||||||
fi
|
fi
|
||||||
ip link set $VLAN_BOND up
|
ip link set $VLAN_BOND up
|
||||||
[[ -n $MTU ]] && ip link set $VLAN_BOND mtu $MTU
|
[[ -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
|
if [[ -n $SPEED ]] ; then
|
||||||
ethtool -s $SLAVE_0 autoneg off speed $SPEED duplex full
|
ethtool -s $SLAVE_0 $AUTONEG_FLAGS speed $SPEED duplex full
|
||||||
ethtool -s $SLAVE_1 autoneg off speed $SPEED duplex full
|
ethtool -s $SLAVE_1 $AUTONEG_FLAGS speed $SPEED duplex full
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 5
|
||||||
ifenslave $VLAN_BOND $SLAVE_0 $SLAVE_1
|
ifenslave $VLAN_BOND $SLAVE_0 $SLAVE_1
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
UNTAGGED=`cut -d ',' -f 8 <<< $VLAN_CONF`
|
UNTAGGED=`cut -d ',' -f 8 <<< $VLAN_CONF | grep 'U'`
|
||||||
if [[ $UNTAGGED == 'U' ]] ; then
|
if [[ -n $UNTAGGED ]] ; then
|
||||||
ip addr add $VLAN_IP/$MASK dev $VLAN_BOND
|
ip addr add $VLAN_IP/$MASK dev $VLAN_BOND
|
||||||
else
|
else
|
||||||
ip link add link $VLAN_BOND \
|
ip link add link $VLAN_BOND \
|
||||||
|
|
Loading…
Reference in a new issue