source: trunk/debian/package/debwrt-net/etc/network/interfaces.broadcom @ 298

Last change on this file since 298 was 298, checked in by amain, 8 years ago

debwrt-net: add support for Asus RT-N16

File size: 4.5 KB
Line 
1# DebWrt Debian interfaces: broadcom
2#
3# - broadcom based devices
4# - proprietary wl kernel module driver ( prepared for b43 )
5# - nas ( prepared for hostapd )
6# - robocfg
7#
8# Tested on
9# - Asus WL-500g Premium v1.
10# - Asus RT-N16
11#
12# Amain <amain@debwrt.net>
13
14auto lo
15iface lo inet loopback
16
17auto eth0
18iface eth0 inet manual
19    pre-up    /sbin/ifconfig eth0 up
20    # robocfg:
21    pre-up    /usr/sbin/robocfg switch disable                2>/dev/null
22    pre-up    /usr/sbin/robocfg vlans enable reset            2>/dev/null
23    pre-up    /usr/sbin/robocfg vlan 1 ports "0 5t"           2>/dev/null
24    pre-up    /usr/sbin/robocfg vlan 2 ports "1 2 3 4 5t"     2>/dev/null
25    pre-up    /usr/sbin/robocfg port 0 state enabled stp none 2>/dev/null
26    pre-up    /usr/sbin/robocfg switch enable                 2>/dev/null
27    pre-up    /usr/sbin/robocfg show                          2>/dev/null
28    post-down /usr/sbin/robocfg switch disable                2>/dev/null
29    post-down /usr/sbin/robocfg vlans enable reset            2>/dev/null
30    post-down /usr/sbin/robocfg vlan 0 ports "0 1 2 3 4 5u"   2>/dev/null
31    post-down /usr/sbin/robocfg port 0 state enabled stp none 2>/dev/null
32    post-down /usr/sbin/robocfg switch enable                 2>/dev/null
33    post-down /usr/sbin/robocfg show                          2>/dev/null
34        # asus rt-n16:
35    #pre-up     modprobe switch-core; exit 0
36    #pre-up     modprobe switch-robo; exit 0
37    #pre-up     echo 1 > /proc/switch/eth0/reset
38    #pre-up     echo 1 > /proc/switch/eth0/enable_vlan
39    #pre-up     echo "0 8"       > /proc/switch/eth0/vlan/1/ports
40    #pre-up     echo "1 2 3 4 8" > /proc/switch/eth0/vlan/2/ports
41    post-down /sbin/ifconfig eth0 down
42
43auto wan
44iface wan inet manual
45    pre-up    if ! grep -q eth0 /etc/network/run/ifstate; then echo "First bring eth0 up."; false; fi
46    pre-up    /etc/firewall/firewall.sh start
47    pre-up    /sbin/ip link add link eth0 name wan type vlan id 1
48    pre-up    start-stop-daemon --start  \
49                                --oknodo \
50                                --quiet  \
51                                --pidfile /var/run/dhclient.wan.pid \
52                                --exec /sbin/dhclient \
53                                  -- -v -pf /var/run/dhclient.wan.pid -lf /var/lib/dhcp/dhclient.wan.leases -nw wan
54    post-down /sbin/ip link delete wan
55    post-down start-stop-daemon --stop \
56                                --signal HUP \
57                                --pidfile /var/run/dhclient.wan.pid \
58                                --exec /sbin/dhclient
59    post-down /etc/firewall/firewall.sh stop
60
61auto lan
62iface lan inet manual
63    pre-up    if ! grep -q eth0 /etc/network/run/ifstate; then echo "First bring eth0 up."; false; fi
64    pre-up    /sbin/ip link add link eth0 name lan type vlan id 2
65    post-down /sbin/ip link delete lan
66
67#auto wlan0
68#iface wlan0 inet manual
69#    pre-up    /sbin/ip link set wlan0 up
70#    post-up   touch /etc/network/run/wlan0
71#    post-down /sbin/ip link set wlan0 down
72#    post-down rm -f /etc/network/run/wlan0
73
74auto wl0
75iface wl0 inet manual
76    pre-up    /usr/sbin/pciunbind
77    pre-up    /usr/sbin/wlc ifname wl0 ap 1
78    pre-up    /usr/sbin/wlc ifname wl0 channel 5
79    pre-up    /usr/sbin/wlc ifname wl0 ssid DebWrt
80    pre-up    /usr/sbin/wlc ifname wl0 up
81    pre-up    /sbin/ip link set wl0 up
82    post-up   touch /etc/network/run/wl0
83    post-down /sbin/ip link set wl0 down
84    post-down /usr/sbin/wlc ifname wl0 down
85    post-down rm -f /etc/network/run/wl0
86
87auto br-lan
88iface br-lan inet static
89    bridge-ports   lan wl0
90    bridge-stp     off
91    bridge-maxwait 0
92    address        192.168.1.1
93    netmask        255.255.255.0
94    post-up        [ -f /etc/network/run/wl0 ] && \
95                      start-stop-daemon --start      \
96                                        --background \
97                                        --oknodo     \
98                                        --quiet      \
99                                        --pidfile /var/run/nas.wl0.pid \
100                                        --exec /usr/sbin/nas \
101                                          -- -P /var/run/nas.wl0.pid -H 34954 -l br-lan -i wl0 -A -m 128 -w 4 -g 3600 -k 'debwrtdebwrt' -s DebWrt
102    pre-down       [ -f /etc/network/run/wl0 ] && \
103                      start-stop-daemon --stop \
104                                        --signal HUP  \
105                                        --pidfile /var/run/nas.wl0.pid \
106                                        --exec /usr/sbin/nas
Note: See TracBrowser for help on using the repository browser.