3 # Copyright (C) 2011 OpenWrt.org
6 [ -e /etc/config/network ] && exit 0
8 touch /etc/config/network
10 . /lib/functions/uci-defaults.sh
13 ucidef_set_interface_loopback
15 board=$(ar71xx_board_name)
22 ucidef_set_interface_lan "eth0 eth1"
26 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
27 ucidef_add_switch "switch0" "1" "1"
28 ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
29 ucidef_add_switch_vlan "switch0" "2" "0t 1"
33 ucidef_set_interfaces_lan_wan "eth0" "eth1"
34 ucidef_add_switch "switch0" "1" "1"
35 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
36 ucidef_add_switch_vlan "switch0" "2" "5 6"
42 ucidef_set_interfaces_lan_wan "eth1" "eth0"
43 ucidef_add_switch "switch0" "1" "1"
44 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
45 ucidef_add_switch_vlan "switch0" "2" "5 6"
52 ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
53 ucidef_add_switch "switch0" "1" "1"
54 ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
55 ucidef_add_switch_vlan "switch0" "2" "0t 1"
56 ucidef_add_switch "switch1" "1" "1"
57 ucidef_add_switch_vlan "switch1" "1" "0 1 2 3 4 5"
61 ucidef_set_interface_raw "sfp" "eth0.3"
62 ucidef_add_switch_vlan "switch0" "3" "0t 6"
69 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
70 ucidef_add_switch "switch0" "1" "1"
71 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
75 ucidef_set_interfaces_lan_wan "eth0" "eth1"
76 ucidef_add_switch "switch0" "1" "1"
77 ucidef_add_switch_vlan "switch0" "0" "0 1 2 3 5"
82 ucidef_set_interfaces_lan_wan "eth1" "eth0"
83 ucidef_add_switch "switch0" "1" "1"
84 ucidef_add_switch_vlan "switch0" "1" "1 2 5"
88 ucidef_set_interfaces_lan_wan "eth1" "eth0"
89 ucidef_add_switch "switch0" "1" "1"
90 ucidef_add_switch_vlan "switch0" "1" "0 1 2"
94 ucidef_set_interfaces_lan_wan "eth1" "eth0"
95 ucidef_add_switch "switch0" "1" "1"
96 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5"
101 ucidef_set_interfaces_lan_wan "eth1" "eth0"
102 ucidef_add_switch "switch0" "1" "1"
103 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
111 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
112 ucidef_add_switch "switch0" "1" "1"
113 ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
114 ucidef_add_switch_vlan "switch0" "2" "0t 1"
118 ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
119 ucidef_add_switch "switch0" "1" "1"
120 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
121 ucidef_add_switch "switch1" "1" "1"
122 ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
123 ucidef_add_switch_vlan "switch1" "2" "0t 5"
129 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
130 ucidef_add_switch "switch0" "1" "1"
131 ucidef_add_switch_vlan "switch0" "1" "0t 1 3 4 5"
132 ucidef_add_switch_vlan "switch0" "2" "0t 2"
137 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
138 ucidef_add_switch "switch0" "1" "1"
139 ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
140 ucidef_add_switch_vlan "switch0" "2" "0t 1"
144 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
145 ucidef_add_switch "switch0" "1" "1"
146 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5t"
147 ucidef_add_switch_vlan "switch0" "2" "0 5t"
151 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
152 ucidef_add_switch "switch0" "1" "1"
153 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
154 ucidef_add_switch_vlan "switch0" "2" "0 9t"
159 ucidef_set_interface_raw "eth" "eth0"
160 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
166 ucidef_set_interfaces_lan_wan "eth1" "eth0"
167 ucidef_add_switch "switch0" "1" "1"
168 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
172 ucidef_set_interface_lan "eth0"
173 ucidef_add_switch "switch0" "1" "1"
174 ucidef_add_switch_vlan "switch0" "1" "0 1 2"
178 ucidef_set_interfaces_lan_wan "eth0" "eth1"
179 ucidef_add_switch "switch0" "1" "1"
180 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4 5"
184 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
185 ucidef_add_switch "switch0" "1" "1"
186 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
192 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
193 ucidef_add_switch "switch0" "1" "1"
194 ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
195 ucidef_add_switch_vlan "switch0" "2" "0t 5"
214 ucidef_set_interface_lan "eth0"
226 ucidef_set_interfaces_lan_wan "eth1" "eth0"
252 ucidef_set_interfaces_lan_wan "eth0" "eth1"
253 ucidef_add_switch "switch0" "1" "1"
254 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
258 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
259 ucidef_add_switch "switch0" "1" "1"
260 ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
261 ucidef_add_switch_vlan "switch0" "2" "0t 1"
265 ucidef_set_interface_lan "eth0"
266 ucidef_add_switch "switch0" "1" "1"
267 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3"
271 ucidef_set_interfaces_lan_wan "eth0" "eth1"
272 ucidef_add_switch "switch0" "1" "1"
273 ucidef_add_switch_vlan "switch0" "1" "0 2 3"
277 ucidef_set_interfaces_lan_wan "eth0" "eth1"