df4e29307b070587fbe2431f17c3ad5fd773e148
[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 "$(brcm63xx_board_name)" in
16
17 cvg834g |\
18 rta770bw |\
19 rta770w |\
20 spw303v |\
21 spw500v)
22         ucidef_set_interface_lan "eth0"
23         ;;
24
25 ar1004g |\
26 bcm96338gw |\
27 bcm96338w |\
28 cpva642 |\
29 ct-5365 |\
30 ct-536p_5621t |\
31 ct-6373 |\
32 dg834g_v4 |\
33 dsl-2640b-b |\
34 dsl-2640u |\
35 fast2604 |\
36 rta1320 |\
37 v2110)
38         ucidef_set_interface_lan "eth0"
39         ucidef_add_switch "eth0" "1" "1"
40         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
41         ;;
42
43 agpf-s0 |\
44 bcm96348gw |\
45 bcm96348gw-10 |\
46 bcm96348gw-11 |\
47 bcm96358vw |\
48 bcm96358vw2 |\
49 cpva502p |\
50 dg834gt |\
51 dmv-s0 |\
52 dsl-2650u |\
53 dv-201amr |\
54 f5d7633 |\
55 fast2404 |\
56 magic |\
57 rg100a |\
58 rta1025W |\
59 td-w8900gb |\
60 usr9108 |\
61 v2500v_bb)
62         ucidef_set_interfaces_lan_wan "eth1" "eth0"
63         ucidef_add_switch "eth1" "1" "1"
64         ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
65         ;;
66
67 dsl-274xb-c |\
68 hg553 |\
69 hg556a_*)
70         ucidef_set_interface_lan "eth0.1"
71         ucidef_add_switch "eth0" "1" "1"
72         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5t"
73         ;;
74
75 dva-g3810bn |\
76 hg520 |\
77 neufbox4)
78         ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
79         ucidef_add_switch "eth1" "1" "1"
80         ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5t"
81         ;;
82
83 a4001n1 |\
84 a4001n |\
85 ar-5381u |\
86 ar-5387un |\
87 bcm963281tan |\
88 bcm96328avng |\
89 bcm96368mvngr |\
90 dsl-274xb-f |\
91 dsl-275xb-d |\
92 fast2504n |\
93 fast2704v2 |\
94 p870hw-51a_v2 |\
95 vr-3025un |\
96 vr-3025u)
97         ucidef_set_interface_lan "eth0.1"
98         ucidef_add_switch "eth0" "1" "1"
99         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 8t"
100         ;;
101
102 bcm96368mvwg)
103         ucidef_set_interface_lan "eth0.1"
104         ucidef_add_switch "eth0" "1" "1"
105         ucidef_add_switch_vlan "eth0" "1" "1 2 4 5 8t"
106         ;;
107
108 wap-5831n)
109         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
110         ucidef_add_switch "eth0" "1" "1"
111         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 5t"
112         ucidef_add_switch_vlan "eth0" "2" "4 5t"
113         ;;
114
115 dgnd3700v1_dgnd3800b)
116         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
117         ucidef_add_switch "eth0" "1" "1"
118         ucidef_add_switch_vlan "eth0" "1" "1 2 3 4 8t"
119         ucidef_add_switch_vlan "eth0" "2" "0 8t"
120         ;;
121
122 neufbox6)
123         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
124         ucidef_add_switch "switch0" "1" "1"
125         ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
126         ucidef_add_switch_vlan "switch0" "2" "0 9t"
127         ;;
128
129 vg50)
130         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
131         ucidef_add_switch "switch0" "1" "1"
132         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 8t"
133         ucidef_add_switch_vlan "switch0" "2" "4 8t"
134         ;;
135
136 bcm963268bu_p300)
137         ucidef_set_interface_lan "eth0.1"
138         ucidef_add_switch "switch0" "1" "1"
139         ucidef_add_switch_vlan "switch0" "1" "0 3 4 5 6 7 8t"
140         ;;
141
142 *)
143         ucidef_set_interfaces_lan_wan "eth1" "eth0"
144         ;;
145
146 esac
147
148 uci commit network
149
150 exit 0