#!/bin/sh # for NS5M, tested with 5.1.2 and 5.2. The main ethernet is trunked, then # vlan 3 bridged to the wireless and vlan 4 bridged to the secondary port. # Run this manually from /tmp or something first and check that it works # If it does, copy it to /etc/persistent/vlan.sh and make # /etc/persistent/rc.poststart run it. ################AP Hotspot###################### # ifconfig ath0 0.0.0.0 ifconfig br0 down brctl delif br0 ath0 brctl delif br0 eth0_real brctl delif br0 eth1_real brctl delbr br0 # local IP address on ethernet interface so we can manage while installing ifconfig eth0_real 192.168.16.2 netmask 255.255.255.0 up ifconfig eth1_real 192.168.16.3 netmask 255.255.255.0 up vconfig add eth0_real 3 ifconfig eth0_real.3 0.0.0.0 up vconfig add eth0_real 4 ifconfig eth0_real.4 0.0.0.0 up ifconfig ath0 0.0.0.0 up brctl addbr br3 brctl addif br3 eth0_real.3 brctl addif br3 ath0 ifconfig br3 192.168.13.2 netmask 255.255.255.0 up brctl addbr br4 brctl addif br4 eth0_real.4 brctl addif br4 eth1_real ifconfig br4 192.168.17.3 netmask 255.255.255.0 up