#!/bin/sh #####NS5 AP############ #----Vlan Constants---- MVLAN_ID=1 VLAN1_ID=2 #---------------------- # #Clear out wireless interface ip address ifconfig ath0 0.0.0.0 #Bring down and destroy default bridge ifconfig br0 down brctl delif br0 ath0 brctl delif br0 eth0 brctl delbr br0 # #-------------------------------------------------------------------- #Create and configure Management Vlan bridge (Allows pass-thru to SM) #-------------------------------------------------------------------- #Create bridge for management vlan brctl addbr br${MVLAN_ID} #Add mvlan onto ethernet/wireless interface vconfig add eth0 ${MVLAN_ID} vconfig add ath0 ${MVLAN_ID} #Bring up mvlanned interfaces with defaults ifconfig eth0.${MVLAN_ID} 0.0.0.0 up ifconfig ath0.${MVLAN_ID} 0.0.0.0 up #Attach mvlanned ethernet/wireless interface to bridge brctl addif br${MVLAN_ID} eth0.${MVLAN_ID} brctl addif br${MVLAN_ID} ath0.${MVLAN_ID} #Configure ip address for mvlanned bridge ifconfig br${MVLAN_ID} 172.16.5.32 netmask 255.255.255.0 up route del default gw 0.0.0.0 route add default gw 172.16.5.1 br${MVLAN_ID} # #--------------------------------------------------------------------- #Create bridges to pass through customer vlans #--------------------------------------------------------------------- #Create bridge for customer vlan1 brctl addbr br${VLAN1_ID} # #Add vlan onto wireless/ethernet interfaces vconfig add ath0 ${VLAN1_ID} vconfig add eth0 ${VLAN1_ID} # #Bring up vlanned interfaces with defaults ifconfig ath0.${VLAN1_ID} 0.0.0.0 up ifconfig eth0.${VLAN1_ID} 0.0.0.0 up # #Attach vlanned wireless/ethernet interface to bridge brctl addif br${VLAN1_ID} ath0.${VLAN1_ID} brctl addif br${VLAN1_ID} eth0.${VLAN1_ID} # #Bring up bridge with defaults ifconfig br${VLAN1_ID} 0.0.0.0 up