source: trunk/debian/package/debwrt-net/etc/network/interfaces.wr1043nd @ 517

Last change on this file since 517 was 517, checked in by amain, 6 years ago

Merge contrib branch 340:516. Main features added:

  • updated plugin architecture
  • improved patch system
  • bitten continous integration support
  • sever build fixed over time to remain in sync with OpenWrt
File size: 3.9 KB
Line 
1# DebWrt Debian interfaces: TP-Link TL-WR1043ND
2#
3# - Atheros wireless chipset AR9100
4# - Atheros RTL8366RB switch
5# - Hostapd NO-KEY/WPA/WEP
6# - Firewall
7#
8# note: don't forget to enable dnsmasq in /etc/defaults/dnsmasq
9#
10# Madwifi drivers are disabled by default in DebWrt ( /etc/modprobe.d/debwrt.conf ). This
11# interfaces file and hostapd config files ( /etc/hostapd/* and /etc/defaults/hostapd )
12# assume the linuxwireless drivers.
13#
14# linuxwireless | ath5k, ath9k: wlan0-wlanN          | hostapd driver: nl80211
15# madwifi       | ath_pci     : wifi0-wifiN -> wlan0 | hostapd driver: madwifi
16#
17# Madwifi: When using madwifi(ath_pci) drivers instead of linuxwireles(athNx) drivers, install
18#          madwifi-tools from Debian Lenny: http://packages.debian.org/nl/lenny/madwifi-tools. Note
19#          that /etc/modprobe.d/madwifi is created when installing madwifi-tools, which disables
20#          loading of linuxwireless drivers. This file should be removed.
21#
22#          Change driver=nl80211 to driver=madwifi in the hostap.conf file, and the
23#          appropriate lines ( wlanconfig ) in the wifi section of this interfaces file.
24#
25# Hostapd is used to setup the wireless device as an access point. Hostapd adds the
26# wireless device automatically to the lan bridge(br-lan). There are several hostapd example
27# files provided by DebWrt. See /etc/hostapd. Adjust /etc/default/hostapd to
28# select which configuration to use. By default it is hostapd-nokey.conf.
29#
30# Amain <amain@debwrt.net> - november 2012
31
32auto lo
33iface lo inet loopback
34
35auto pre
36iface pre inet manual
37    pre-up /etc/firewall/firewall.sh start
38    pre-up /sbin/ifconfig eth0 down
39    pre-up /sbin/ifconfig wlan0 down
40    pre-up /sbin/ip link set wlan0 name wifi
41    #pre-up /sbin/ip link set eth0 name internal-switch
42    pre-up /sbin/ifconfig eth0 up
43    pre-up /sbin/ifconfig wifi up
44
45auto pre-switch
46iface pre-switch inet manual
47    pre-up    /usr/sbin/swconfig dev rtl8366rb set reset
48    pre-up    /usr/sbin/swconfig dev rtl8366rb set enable_vlan 1
49    pre-up    /usr/sbin/swconfig dev rtl8366rb vlan 1 set ports "1 2 3 4 5t"
50    pre-up    /usr/sbin/swconfig dev rtl8366rb vlan 2 set ports "0 5t"
51    pre-up    /usr/sbin/swconfig dev rtl8366rb set apply
52    pre-up    /sbin/ip link add link eth0 name lan type vlan id 1
53    pre-up    /sbin/ip link add link eth0 name wan type vlan id 2
54
55auto lan
56iface lan inet manual
57    pre-up    /sbin/ifconfig lan up
58    post-down /sbin/ifconfig lan down
59
60auto wan
61iface wan inet manual
62    pre-up    /sbin/ifconfig wan up
63    pre-up    start-stop-daemon --start  \
64                                --oknodo \
65                                --quiet  \
66                                --pidfile /var/run/dhclient.wan.pid \
67                                --exec /sbin/dhclient \
68                                  -- -v -pf /var/run/dhclient.wan.pid -lf /var/lib/dhcp/dhclient.wan.leases -nw wan
69    post-down /sbin/ifconfig wan down
70    post-down start-stop-daemon --stop \
71                                --signal HUP \
72                                --pidfile /var/run/dhclient.wan.pid \
73                                --exec /sbin/dhclient
74
75auto br-lan
76iface br-lan inet static
77    bridge-ports   lan
78    bridge-stp     off
79    bridge-maxwait 0
80    address        192.168.1.1
81    netmask        255.255.255.0
82
83auto wifi
84iface wifi inet manual
85    pre-up /sbin/ifconfig wifi up
86    pre-up /etc/init.d/hostapd start
87    post-down /etc/init.d/hostapd stop
88    post-down /sbin/ifconfig wifi down
89
90auto post-switch
91iface post-switch inet manual
92    post-down /sbin/ip link del lan
93    post-down /sbin/ip link del wan
94    post-down /usr/sbin/swconfig dev rtl8366rb set reset
95    post-down /usr/sbin/swconfig dev rtl8366rb set apply
96
97auto post
98iface post inet manual
99    post-down /sbin/ip link set wifi name wlan0
100    post-down /sbin/ifconfig eth0 down
101    post-down /sbin/ifconfig wlan0 down
102    post-down /etc/firewall/firewall.sh stop
103
Note: See TracBrowser for help on using the repository browser.