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"
50 ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
51 ucidef_add_switch "eth0" "1" "1"
52 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
53 ucidef_add_switch_vlan "eth0" "2" "0t 1"
54 ucidef_add_switch "eth1" "1" "1"
55 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
60 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
61 ucidef_add_switch "rtl8366s" "1" "1"
62 ucidef_add_switch_vlan "rtl8366s" "1" "0 1 2 3 5t"
66 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
67 ucidef_add_switch "eth0" "1" "1"
68 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
69 ucidef_add_switch_vlan "eth0" "2" "0t 1"
73 ucidef_set_interfaces_lan_wan "eth0" "eth1"
74 ucidef_add_switch "rtl8366s" "1" "1"
75 ucidef_add_switch_vlan "rtl8366s" "0" "0 1 2 3 5"
80 ucidef_set_interfaces_lan_wan "eth1" "eth0"
81 ucidef_add_switch "switch0" "1" "1"
82 ucidef_add_switch_vlan "switch0" "1" "1 2 5"
86 ucidef_set_interfaces_lan_wan "eth1" "eth0"
87 ucidef_add_switch "switch0" "1" "1"
88 ucidef_add_switch_vlan "switch0" "1" "0 1 2"
92 ucidef_set_interfaces_lan_wan "eth1" "eth0"
93 ucidef_add_switch "eth1" "1" "1"
94 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 5"
99 ucidef_set_interfaces_lan_wan "eth1" "eth0"
100 ucidef_add_switch "switch0" "1" "1"
101 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
108 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
109 ucidef_add_switch "switch0" "1" "1"
110 ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
111 ucidef_add_switch_vlan "switch0" "2" "0t 1"
115 ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
116 ucidef_add_switch "switch0" "1" "1"
117 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
118 ucidef_add_switch "switch1" "1" "1"
119 ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
120 ucidef_add_switch_vlan "switch1" "2" "0t 5"
126 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
127 ucidef_add_switch "eth0" "1" "1"
128 ucidef_add_switch_vlan "eth0" "1" "0t 1 3 4 5"
129 ucidef_add_switch_vlan "eth0" "2" "0t 2"
134 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
135 ucidef_add_switch "eth0" "1" "1"
136 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
137 ucidef_add_switch_vlan "eth0" "2" "0t 1"
141 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
142 ucidef_add_switch "rtl8366rb" "1" "1"
143 ucidef_add_switch_vlan "rtl8366rb" "1" "1 2 3 4 5t"
144 ucidef_add_switch_vlan "rtl8366rb" "2" "0 5t"
148 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
149 ucidef_add_switch "switch0" "1" "1"
150 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
151 ucidef_add_switch_vlan "switch0" "2" "0 9t"
156 ucidef_set_interface_raw "eth" "eth0"
157 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
161 ucidef_set_interfaces_lan_wan "eth1" "eth0"
162 ucidef_add_switch "switch0" "1" "1"
163 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
167 ucidef_set_interface_lan "eth0"
168 ucidef_add_switch "switch0" "1" "1"
169 ucidef_add_switch_vlan "switch0" "1" "0 1 2"
173 ucidef_set_interfaces_lan_wan "eth0" "eth1"
174 ucidef_add_switch "eth0" "1" "1"
175 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
179 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
180 ucidef_add_switch "switch0" "1" "1"
181 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
185 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
186 ucidef_add_switch "switch0" "1" "1"
187 ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
188 ucidef_add_switch_vlan "switch0" "2" "0t 5"
206 ucidef_set_interface_lan "eth0"
217 ucidef_set_interfaces_lan_wan "eth1" "eth0"
242 ucidef_set_interfaces_lan_wan "eth0" "eth1"
243 ucidef_add_switch "eth0" "1" "1"
244 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4"
248 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
249 ucidef_add_switch "eth0" "1" "1"
250 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
251 ucidef_add_switch_vlan "eth0" "2" "0t 1"
255 ucidef_set_interface_lan "eth0"
256 ucidef_add_switch "eth0" "1" "1"
257 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3"
261 ucidef_set_interfaces_lan_wan "eth0" "eth1"
262 ucidef_add_switch "eth0" "1" "1"
263 ucidef_add_switch_vlan "eth0" "1" "0 2 3"
267 ucidef_set_interfaces_lan_wan "eth0" "eth1"