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"
41 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
42 ucidef_add_switch
"switch0" "1" "1"
43 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 4"
44 ucidef_add_switch_vlan
"switch0" "2" "5 6"
48 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
49 ucidef_add_switch
"switch0" "1" "1"
50 ucidef_add_switch_vlan
"switch0" "1" "0 2 3 4 5"
51 ucidef_add_switch_vlan
"switch0" "2" "1 6"
58 ucidef_set_interfaces_lan_wan
"eth0.1 eth1" "eth0.2"
59 ucidef_add_switch
"switch0" "1" "1"
60 ucidef_add_switch_vlan
"switch0" "1" "0t 2 3 4 5"
61 ucidef_add_switch_vlan
"switch0" "2" "0t 1"
62 ucidef_add_switch
"switch1" "1" "1"
63 ucidef_add_switch_vlan
"switch1" "1" "0 1 2 3 4 5"
67 ucidef_set_interface_raw
"sfp" "eth0.3"
68 ucidef_add_switch_vlan
"switch0" "3" "0t 6"
75 ucidef_set_interfaces_lan_wan
"eth0.1" "eth1"
76 ucidef_add_switch
"switch0" "1" "1"
77 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 5t"
81 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
82 ucidef_add_switch
"switch0" "1" "1"
83 ucidef_add_switch_vlan
"switch0" "0" "0 1 2 3 5"
88 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
89 ucidef_add_switch
"switch0" "1" "1"
90 ucidef_add_switch_vlan
"switch0" "1" "1 2 5"
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"
100 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
101 ucidef_add_switch
"switch0" "1" "1"
102 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 5"
107 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
108 ucidef_add_switch
"switch0" "1" "1"
109 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 4"
117 ucidef_set_interfaces_lan_wan
"eth0.1" "eth0.2"
118 ucidef_add_switch
"switch0" "1" "1"
119 ucidef_add_switch_vlan
"switch0" "1" "0t 2 3 4 5"
120 ucidef_add_switch_vlan
"switch0" "2" "0t 1"
124 ucidef_set_interfaces_lan_wan
"eth0 eth1.1" "eth1.2"
125 ucidef_add_switch
"switch0" "1" "1"
126 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 4"
127 ucidef_add_switch
"switch1" "1" "1"
128 ucidef_add_switch_vlan
"switch1" "1" "0t 1 2 3 4"
129 ucidef_add_switch_vlan
"switch1" "2" "0t 5"
135 ucidef_set_interfaces_lan_wan
"eth0.1" "eth0.2"
136 ucidef_add_switch
"switch0" "1" "1"
137 ucidef_add_switch_vlan
"switch0" "1" "0t 1 3 4 5"
138 ucidef_add_switch_vlan
"switch0" "2" "0t 2"
143 ucidef_set_interfaces_lan_wan
"eth0.1" "eth0.2"
144 ucidef_add_switch
"switch0" "1" "1"
145 ucidef_add_switch_vlan
"switch0" "1" "0t 2 3 4 5"
146 ucidef_add_switch_vlan
"switch0" "2" "0t 1"
150 ucidef_set_interfaces_lan_wan
"eth0.1" "eth0.2"
151 ucidef_add_switch
"switch0" "1" "1"
152 ucidef_add_switch_vlan
"switch0" "1" "1 2 3 4 5t"
153 ucidef_add_switch_vlan
"switch0" "2" "0 5t"
157 ucidef_set_interfaces_lan_wan
"eth0.1" "eth0.2"
158 ucidef_add_switch
"switch0" "1" "1"
159 ucidef_add_switch_vlan
"switch0" "1" "1 2 3 4 9t"
160 ucidef_add_switch_vlan
"switch0" "2" "0 9t"
165 ucidef_set_interface_raw
"eth" "eth0"
166 ucidef_set_interfaces_lan_wan
"lan1 lan2 lan3 lan4" "wan"
173 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
174 ucidef_add_switch
"switch0" "1" "1"
175 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 4"
179 ucidef_set_interface_lan
"eth0"
180 ucidef_add_switch
"switch0" "1" "1"
181 ucidef_add_switch_vlan
"switch0" "1" "0 1 2"
185 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
186 ucidef_add_switch
"switch0" "1" "1"
187 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 4 5"
191 ucidef_set_interfaces_lan_wan
"eth0.1" "eth1"
192 ucidef_add_switch
"switch0" "1" "1"
193 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 5t"
199 ucidef_set_interfaces_lan_wan
"eth0.1" "eth0.2"
200 ucidef_add_switch
"switch0" "1" "1"
201 ucidef_add_switch_vlan
"switch0" "1" "0t 1 2 3 4"
202 ucidef_add_switch_vlan
"switch0" "2" "0t 5"
222 ucidef_set_interface_lan
"eth0"
226 ucidef_set_interface_lan
"eth1"
239 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
265 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
266 ucidef_add_switch
"switch0" "1" "1"
267 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 4"
271 ucidef_set_interfaces_lan_wan
"eth0.1" "eth0.2"
272 ucidef_add_switch
"switch0" "1" "1"
273 ucidef_add_switch_vlan
"switch0" "1" "0t 2 3 4 5"
274 ucidef_add_switch_vlan
"switch0" "2" "0t 1"
278 ucidef_set_interface_lan
"eth0"
279 ucidef_add_switch
"switch0" "1" "1"
280 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3"
284 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
285 ucidef_add_switch
"switch0" "1" "1"
286 ucidef_add_switch_vlan
"switch0" "1" "0 2 3"
290 ucidef_set_interfaces_lan_wan
"eth0" "eth1"