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)
21 ucidef_set_interface_lan "eth0 eth1"
27 ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
28 ucidef_add_switch "eth0" "1" "1"
29 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
30 ucidef_add_switch_vlan "eth0" "2" "0t 1"
31 ucidef_add_switch "eth1" "1" "1"
32 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
120 ucidef_set_interface_raw "eth" "eth0"
121 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
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"
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"
148 ucidef_set_interface_lan "eth0"
159 ucidef_set_interfaces_lan_wan "eth1" "eth0"
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"
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"
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"
202 ucidef_set_interfaces_lan_wan "eth0" "eth1"