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
|
||||
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 \
|
||||
|
|
Loading…
Reference in a new issue