[ar71xx] dir825b1: Add image for DIR-825-B1 that uses the whole flash (must first...
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / base-files / etc / uci-defaults / network
1 #!/bin/sh
2 #
3 # Copyright (C) 2011 OpenWrt.org
4 #
5
6 [ -e /etc/config/network ] && exit 0
7
8 touch /etc/config/network
9
10 . /lib/functions/uci-defaults.sh
11 . /lib/ar71xx.sh
12
13 ucidef_set_interface_loopback
14
15 board=$(ar71xx_board_name)
16
17 case "$board" in
18 all0315n |\
19 all0258n |\
20 ja76pf2)
21 ucidef_set_interface_lan "eth0 eth1"
22 ;;
23
24 db120)
25 ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
26 ucidef_add_switch "eth0" "1" "1"
27 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
28 ucidef_add_switch_vlan "eth0" "2" "0t 1"
29 ucidef_add_switch "eth1" "1" "1"
30 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
31 ;;
32
33 dir-825-b1|\
34 dir-825-b1-openwrt|\
35 dir-825-b1-tostock|\
36 tew-673gru)
37 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
38 ucidef_add_switch "rtl8366s" "1" "1"
39 ucidef_add_switch_vlan "rtl8366s" "1" "0 1 2 3 5t"
40 ;;
41
42 nbg460n_550n_550nh)
43 ucidef_set_interfaces_lan_wan "eth0" "eth1"
44 ucidef_add_switch "rtl8366s" "1" "1"
45 ucidef_add_switch_vlan "rtl8366s" "0" "0 1 2 3 5"
46 ;;
47
48 rb-433 |\
49 rb-433u)
50 ucidef_set_interfaces_lan_wan "eth1" "eth0"
51 ucidef_add_switch "switch0" "1" "1"
52 ucidef_add_switch_vlan "switch0" "1" "1 2 5"
53 ;;
54
55 rb-450)
56 ucidef_set_interfaces_lan_wan "eth1" "eth0"
57 ucidef_add_switch "eth1" "1" "1"
58 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 5"
59 ;;
60
61 rb-450g |\
62 routerstation-pro)
63 ucidef_set_interfaces_lan_wan "eth1" "eth0"
64 ucidef_add_switch "switch0" "1" "1"
65 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
66 ;;
67
68 ap136 |\
69 rb-750gl |\
70 rb-751g |\
71 wzr-hp-g450h)
72 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
73 ucidef_add_switch "switch0" "1" "1"
74 ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
75 ucidef_add_switch_vlan "switch0" "2" "0t 1"
76 ;;
77
78 rb-493g)
79 ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
80 ucidef_add_switch "switch0" "1" "1"
81 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
82 ucidef_add_switch "switch1" "1" "1"
83 ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
84 ucidef_add_switch_vlan "switch1" "2" "0t 5"
85 ;;
86
87 wzr-hp-g300nh2 |\
88 pb92 |\
89 ap113)
90 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
91 ucidef_add_switch "eth0" "1" "1"
92 ucidef_add_switch_vlan "eth0" "1" "0t 1 3 4 5"
93 ucidef_add_switch_vlan "eth0" "2" "0t 2"
94 ;;
95
96 tl-wdr4300|\
97 tl-wr1041n-v2)
98 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
99 ucidef_add_switch "eth0" "1" "1"
100 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
101 ucidef_add_switch_vlan "eth0" "2" "0t 1"
102 ;;
103
104 tl-wr1043nd)
105 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
106 ucidef_add_switch "rtl8366rb" "1" "1"
107 ucidef_add_switch_vlan "rtl8366rb" "1" "1 2 3 4 5t"
108 ucidef_add_switch_vlan "rtl8366rb" "2" "0 5t"
109 ;;
110
111 tl-wr2543n)
112 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
113 ucidef_add_switch "switch0" "1" "1"
114 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
115 ucidef_add_switch_vlan "switch0" "2" "0 9t"
116 ;;
117
118 tl-wr841n-v1|\
119 tl-wr941nd)
120 ucidef_set_interface_raw "eth" "eth0"
121 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
122 ;;
123
124 wrt160nl)
125 ucidef_set_interfaces_lan_wan "eth0" "eth1"
126 ucidef_add_switch "eth0" "1" "1"
127 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
128 ;;
129
130 wzr-hp-g300nh)
131 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
132 ucidef_add_switch "switch0" "1" "1"
133 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
134 ;;
135
136 all0305 |\
137 aw-nr580 |\
138 bullet-m |\
139 eap7660d |\
140 ew-dorin |\
141 rb-411 |\
142 tl-mr11u |\
143 tl-mr3020 |\
144 tl-wa901nd |\
145 tl-wa901nd-v2 |\
146 tl-wr703n |\
147 wp543)
148 ucidef_set_interface_lan "eth0"
149 ;;
150
151 alfa-ap96 |\
152 alfa-nx |\
153 ap83 |\
154 jwap003 |\
155 pb42 |\
156 pb44 |\
157 routerstation|\
158 wpe72)
159 ucidef_set_interfaces_lan_wan "eth1" "eth0"
160 ;;
161
162 ap121 |\
163 ap121-mini |\
164 ap96 |\
165 airrouter |\
166 dir-600-a1 |\
167 dir-615-c1 |\
168 dir-615-e4 |\
169 ja76pf |\
170 rb-750 |\
171 rb-751 |\
172 tew-632brp |\
173 tew-712br |\
174 tl-mr3220 |\
175 tl-mr3420 |\
176 tl-wr741nd |\
177 tl-wr741nd-v4 |\
178 tl-wr841n-v7 |\
179 whr-g301n |\
180 whr-hp-g300n |\
181 whr-hp-gn |\
182 wzr-hp-ag300h)
183 ucidef_set_interfaces_lan_wan "eth0" "eth1"
184 ucidef_add_switch "eth0" "1" "1"
185 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4"
186 ;;
187
188 wzr-hp-g450h)
189 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
190 ucidef_add_switch "eth0" "1" "1"
191 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
192 ucidef_add_switch_vlan "eth0" "2" "0t 1"
193 ;;
194
195 ew-dorin-router)
196 ucidef_set_interfaces_lan_wan "eth0" "eth1"
197 ucidef_add_switch "eth0" "1" "1"
198 ucidef_add_switch_vlan "eth0" "1" "0 2 3"
199 ;;
200
201 *)
202 ucidef_set_interfaces_lan_wan "eth0" "eth1"
203 ;;
204 esac
205
206 uci commit network
207
208 exit 0