scripts actualizados para nuevo espacio de direcciones
This commit is contained in:
parent
d3e4f7ff33
commit
5eed27b86c
3 changed files with 17 additions and 4 deletions
|
@ -25,6 +25,8 @@ echo
|
|||
|
||||
echo "=====> Begin setup <====="
|
||||
setup-netdev
|
||||
scan-hdd
|
||||
scan-bonding
|
||||
echo "=====> Begin tests <====="
|
||||
screen -c /usr/local/etc/screenrc
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ source scan-netdev
|
|||
|
||||
modprobe bonding
|
||||
|
||||
# All vlans are using netmask /24
|
||||
MASK=24
|
||||
# All vlans are using netmask /22
|
||||
MASK=22
|
||||
|
||||
for VLAN in 401 402 403 404 405 406 407 408 ; do
|
||||
if [[ -f /etc/netdev/vlan.$VLAN.csv ]] ; then
|
||||
|
@ -58,6 +58,10 @@ for VLAN in 401 402 403 404 405 406 407 408 ; do
|
|||
sleep 2
|
||||
fi
|
||||
ip link set $VLAN_BOND up
|
||||
if [[ $BOND_MODE != 1 ]] ; then
|
||||
ethtool -s $SLAVE_0 autoneg off speed 10000 duplex full
|
||||
ethtool -s $SLAVE_1 autoneg off speed 10000 duplex full
|
||||
fi
|
||||
sleep 5
|
||||
ifenslave $VLAN_BOND $SLAVE_0 $SLAVE_1
|
||||
sleep 5
|
||||
|
|
|
@ -16,22 +16,29 @@ while [[ 1 ]] ; do
|
|||
clear
|
||||
fi
|
||||
date
|
||||
hostname
|
||||
for BOND_N in {0..4} ; do
|
||||
BOND=bond$BOND_N
|
||||
if [[ -d /sys/class/net/$BOND ]] ; then
|
||||
echo -n "$BOND:"
|
||||
SLAVES=`cat /sys/class/net/$BOND/bonding/slaves`
|
||||
MODE=`cat /sys/class/net/$BOND/bonding/mode \
|
||||
| cut -d ' ' -f 2`
|
||||
echo " Mode: $BLD$MODE$OFF"
|
||||
#echo
|
||||
SLAVES=`cat /sys/class/net/$BOND/bonding/slaves`
|
||||
for DEV in $SLAVES ; do
|
||||
LINKING=`cat /sys/class/net/$DEV/operstate`
|
||||
if [[ "$LINKING" == "up" ]] ; then
|
||||
echo -n " $GRN$DEV$OFF up"
|
||||
SPEED=`cat /sys/class/net/$DEV/speed`
|
||||
if [[ -n $SPEED ]] ; then
|
||||
echo -n " $SPEED"
|
||||
fi
|
||||
else
|
||||
echo -n " $RED$DEV$OFF down"
|
||||
fi
|
||||
|
||||
done
|
||||
echo -n " Mode: $BLD$MODE$OFF"
|
||||
echo
|
||||
if [[ $MODE == 1 ]] ; then
|
||||
ACTIVE=`cat /sys/class/net/$BOND/bonding/active_slave`
|
||||
|
|
Loading…
Reference in a new issue