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"
28 ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
29 ucidef_add_switch "eth0" "1" "1"
30 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
31 ucidef_add_switch_vlan "eth0" "2" "0t 1"
32 ucidef_add_switch "eth1" "1" "1"
33 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
38 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
39 ucidef_add_switch "rtl8366s" "1" "1"
40 ucidef_add_switch_vlan "rtl8366s" "1" "0 1 2 3 5t"
44 ucidef_set_interfaces_lan_wan "eth0" "eth1"
45 ucidef_add_switch "rtl8366s" "1" "1"
46 ucidef_add_switch_vlan "rtl8366s" "0" "0 1 2 3 5"
51 ucidef_set_interfaces_lan_wan "eth1" "eth0"
52 ucidef_add_switch "switch0" "1" "1"
53 ucidef_add_switch_vlan "switch0" "1" "1 2 5"
57 ucidef_set_interfaces_lan_wan "eth1" "eth0"
58 ucidef_add_switch "switch0" "1" "1"
59 ucidef_add_switch_vlan "switch0" "1" "0 1 2"
63 ucidef_set_interfaces_lan_wan "eth1" "eth0"
64 ucidef_add_switch "eth1" "1" "1"
65 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 5"
70 ucidef_set_interfaces_lan_wan "eth1" "eth0"
71 ucidef_add_switch "switch0" "1" "1"
72 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
79 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
80 ucidef_add_switch "switch0" "1" "1"
81 ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
82 ucidef_add_switch_vlan "switch0" "2" "0t 1"
86 ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
87 ucidef_add_switch "switch0" "1" "1"
88 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
89 ucidef_add_switch "switch1" "1" "1"
90 ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
91 ucidef_add_switch_vlan "switch1" "2" "0t 5"
97 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
98 ucidef_add_switch "eth0" "1" "1"
99 ucidef_add_switch_vlan "eth0" "1" "0t 1 3 4 5"
100 ucidef_add_switch_vlan "eth0" "2" "0t 2"
105 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
106 ucidef_add_switch "eth0" "1" "1"
107 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
108 ucidef_add_switch_vlan "eth0" "2" "0t 1"
112 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
113 ucidef_add_switch "rtl8366rb" "1" "1"
114 ucidef_add_switch_vlan "rtl8366rb" "1" "1 2 3 4 5t"
115 ucidef_add_switch_vlan "rtl8366rb" "2" "0 5t"
119 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
120 ucidef_add_switch "switch0" "1" "1"
121 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
122 ucidef_add_switch_vlan "switch0" "2" "0 9t"
127 ucidef_set_interface_raw "eth" "eth0"
128 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
132 ucidef_set_interfaces_lan_wan "eth1" "eth0"
133 ucidef_add_switch "switch0" "1" "1"
134 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
138 ucidef_set_interface_lan "eth0"
139 ucidef_add_switch "switch0" "1" "1"
140 ucidef_add_switch_vlan "switch0" "1" "0 1 2"
144 ucidef_set_interfaces_lan_wan "eth0" "eth1"
145 ucidef_add_switch "eth0" "1" "1"
146 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
150 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
151 ucidef_add_switch "switch0" "1" "1"
152 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
156 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
157 ucidef_add_switch "switch0" "1" "1"
158 ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
159 ucidef_add_switch_vlan "switch0" "2" "0t 5"
176 ucidef_set_interface_lan "eth0"
187 ucidef_set_interfaces_lan_wan "eth1" "eth0"
211 ucidef_set_interfaces_lan_wan "eth0" "eth1"
212 ucidef_add_switch "eth0" "1" "1"
213 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4"
217 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
218 ucidef_add_switch "eth0" "1" "1"
219 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
220 ucidef_add_switch_vlan "eth0" "2" "0t 1"
224 ucidef_set_interface_lan "eth0"
225 ucidef_add_switch "eth0" "1" "1"
226 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3"
230 ucidef_set_interfaces_lan_wan "eth0" "eth1"
231 ucidef_add_switch "eth0" "1" "1"
232 ucidef_add_switch_vlan "eth0" "1" "0 2 3"
236 ucidef_set_interfaces_lan_wan "eth0" "eth1"