6b9736a4690f02fe9bc9ed7d9a4ca0b9aa077896
[openwrt.git] / target / linux / brcm63xx / base-files / etc / uci-defaults / 02_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2012 OpenWrt.org
4 #
5
6 [ -e /etc/config/network ] && exit 0
7
8 touch /etc/config/network
9
10 . /lib/functions/uci-defaults.sh
11 . /lib/brcm63xx.sh
12
13 ucidef_set_interface_loopback
14
15 case "$board_name" in
16
17 96348W3 |\
18 96358-502V |\
19 CVG834G_E15R3921 |\
20 RTA770BW |\
21 RTA770W |\
22 SPW500V)
23         ucidef_set_interface_lan "eth0"
24         ;;
25
26 96338GW |\
27 96338W |\
28 96338W2_E7T |\
29 96348A-122 |\
30 96348W3 |\
31 AR1004G |\
32 CPVA642 |\
33 CT536_CT5621 |\
34 CT6373-1 |\
35 D-4P-W |\
36 "F@ST2604" |\
37 RTA1320_16M |\
38 V2110)
39         ucidef_set_interface_lan "eth0"
40         ucidef_add_switch "eth0" "1" "1"
41         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
42         ;;
43
44 96348GW |\
45 96348GW-10 |\
46 96348GW-11 |\
47 96348GW-A |\
48 96358VW |\
49 96358VW2 |\
50 AGPF-S0 |\
51 "CPVA502+" |\
52 DV201AMR |\
53 DWV-S0 |\
54 "F@ST2404" |\
55 MAGIC |\
56 RTA1025W_16 |\
57 V2500V_BB)
58         ucidef_set_interfaces_lan_wan "eth1" "eth0"
59         ucidef_add_switch "eth1" "1" "1"
60         ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
61         ;;
62
63 AW4139 |\
64 HW553 |\
65 HW556*)
66         ucidef_set_interface_lan "eth0.1"
67         ucidef_add_switch "eth0" "1" "1"
68         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5t"
69         ;;
70
71 NB4-* |\
72 DVG3810BN |\
73 HW6358GW_B)
74         ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
75         ucidef_add_switch "eth1" "1" "1"
76         ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5t"
77         ;;
78
79 96328avng |\
80 96328A-1241N |\
81 96328A-1441N1 |\
82 963281TAN |\
83 963281T_TEF |\
84 96328dg2x2 |\
85 96368M-1341N |\
86 96368M-1541N |\
87 96368MVNgr |\
88 AW4339U |\
89 AW5200B |\
90 "F@ST2504n" |\
91 "F@ST2704V2" |\
92 P870HW-51a_v2)
93         ucidef_set_interface_lan "eth0.1"
94         ucidef_add_switch "eth0" "1" "1"
95         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 8t"
96         ;;
97
98 96368MVWG)
99         ucidef_set_interface_lan "eth0.1"
100         ucidef_add_switch "eth0" "1" "1"
101         ucidef_add_switch_vlan "eth0" "1" "1 2 4 5 8t"
102         ;;
103
104 96369R-1231N)
105         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
106         ucidef_add_switch "eth0" "1" "1"
107         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 5t"
108         ucidef_add_switch_vlan "eth0" "2" "4 5t"
109         ;;
110
111 DGND3700v1_3800B)
112         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
113         ucidef_add_switch "eth0" "1" "1"
114         ucidef_add_switch_vlan "eth0" "1" "1 2 3 4 8t"
115         ucidef_add_switch_vlan "eth0" "2" "0 8t"
116         ;;
117
118 NB6)
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"
123         ;;
124
125 VW6339GU)
126         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
127         ucidef_add_switch "switch0" "1" "1"
128         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 8t"
129         ucidef_add_switch_vlan "switch0" "2" "4 8t"
130         ;;
131
132 963268BU_P300)
133         ucidef_set_interface_lan "eth0.1"
134         ucidef_add_switch "switch0" "1" "1"
135         ucidef_add_switch_vlan "switch0" "1" "0 3 4 5 6 7 8t"
136         ;;
137
138 *)
139         ucidef_set_interfaces_lan_wan "eth1" "eth0"
140         ;;
141
142 esac
143
144 uci commit network
145
146 exit 0