#####NS5 SM######## #----Vlan Constants---- MVLAN_ID=1 VLAN_ID=2 #---------------------- # #Delete default gateway from device route del default gw 0.0.0.0 # #Bring down and destroy default bridge ifconfig br0 0.0.0.0 ifconfig br0 down brctl delif br0 ath0 brctl delif br0 eth0 brctl delbr br0 # #--------------------------------------------------------------- #Create and configure Management Vlan #--------------------------------------------------------------- #Add MVlan onto wireless interface and configure ip address vconfig add ath0 ${MVLAN_ID} ifconfig ath0.${MVLAN_ID} 172.16.5.31 netmask 255.255.255.0 up route add default gw 172.16.5.1 ath0.${MVLAN_ID} # #--------------------------------------------------------------- #Tag ethernet traffic as it passes to wireless interface #--------------------------------------------------------------- #Create bridge for customer vlan brctl addbr br${VLAN_ID} # #Add vlan onto wireless interface vconfig add ath0 ${VLAN_ID} # #Attach vlanned wireless/untagged ethernet interface to bridge brctl addif br${VLAN_ID} ath0.${VLAN_ID} brctl addif br${VLAN_ID} eth0 # #Bring up interfaces with defaults ifconfig ath0.${VLAN_ID} 0.0.0.0 up ifconfig eth0 0.0.0.0 up # #Bring up bridges with defaults ifconfig br${VLAN_ID} up