Test nics to see if we’re on the desired vlan

You want to know if one of your nics is in the vlan you need it to be? Quite tedious if you want to do it manually.
check this small script to config the ip, ping and unconfig
for i in 1 2 3 4 5 6 7 8 9 10 11;do set -x;ifconfig eth$i inet 10.203.102.102 netmask 255.255.254.0 up; ping -c
5 10.203.102.1; ifconfig eth$i down; done
25/433

Leave a Reply

Your email address will not be published. Required fields are marked *