All pastes #2074748 Raw Edit

Debwrt RT-N16 interfaces configu

public text v1 · immutable
#2074748 ·published 2011-06-04 21:44 UTC
rendered paste body
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
# Thanks to Linvinus for creating the configuration used here

# -LOOPBACK-
auto lo
iface lo inet loopback

# -ETH0-
auto eth0
iface eth0 inet manual
pre-up ifconfig eth0 0.0.0.0 up
pre-up modprobe switch-robo; exit 0
pre-up echo 1 > /proc/switch/eth0/reset
pre-up echo 1 > /proc/switch/eth0/enable_vlan
pre-up echo "1 2 3 4 8" > /proc/switch/eth0/vlan/2/ports
pre-up echo "0 8"       > /proc/switch/eth0/vlan/3/ports
post-down ifconfig eth0 down

# -VLAN2(LAN)-
auto vlan2
iface vlan2 inet manual
	vlan-raw-device eth0

# -VLAN3(WAN)-
auto vlan3
iface vlan3 inet dhcp
vlan-raw-device eth0

#If using PPPOE comment out the above 2 lines and uncomment the bottom 4 lines of this section as well as all the lines in the PPPOE section

#iface vlan3 inet static
#vlan-raw-device eth0
#	address  192.168.5.5
#	netmask  255.255.255.0

# -PPPOE-
#config file located at /etc/ppp/peers/MYPPPOE_PROVIDER
#auto MYPPPOE_PROVIDER
#iface MYPPPOE_PROVIDER inet ppp
#provider MYPPPOE_PROVIDER
#plugin rp-pppoe.so vlan3

# -LAN/WLAN BRIDGE-
auto br0
iface br0 inet static
        address  192.168.1.1
        netmask  255.255.255.0
        gateway  192.168.1.1
        nameserver 192.168.1.1
        bridge_ports vlan2 wl0
        bridge_stp no

# -WLAN-
auto wl0
iface wl0 inet manual

#Be sure to change MYWIFI_PASSWORD_CHANGE_ME & MYWIFI_SSID_CHANGE_ME in line below

post-up start-stop-daemon -S -v -b -p /var/run/nas.wl0.pid -x /usr/sbin/nas -- -P /var/run/nas.wl0.pid -l br0 -H 34954 -i wl0 -A -m 128 -k MYWIFI_PASSWORD_CHANGE_ME -s MYWIFI_SSID_CHANGE_ME -w 4 -g 3600
post-up wlc ap 1
post-up wlc up
pre-down start-stop-daemon -K -v -p /var/run/nas.wl0.pid
post-down wlc down