summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
blob: 11dd5b8d7b64ce6e5a1c9469d4299a5b37f91b16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/bin/sh
#
# Copyright (C) 2012 OpenWrt.org
#

[ -e /etc/config/network ] && exit 0

touch /etc/config/network

. /lib/functions/uci-defaults.sh
. /lib/brcm63xx.sh

ucidef_set_interface_loopback

case "$(brcm63xx_board_name)" in

cvg834g |\
rta770bw |\
rta770w |\
spw303v |\
spw500v)
	ucidef_set_interface_lan "eth0"
	;;

ar1004g |\
bcm96338gw |\
bcm96338w |\
cpva642 |\
ct-5365 |\
ct-536p_5621t |\
ct-6373 |\
dg834g_v4 |\
dsl-2640b-b |\
dsl-2640u |\
fast2604 |\
rta1320 |\
v2110)
	ucidef_set_interface_lan "eth0"
	ucidef_add_switch "eth0" "1" "1"
	ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
	;;

agpf-s0 |\
bcm96348gw |\
bcm96348gw-10 |\
bcm96348gw-11 |\
bcm96358vw |\
bcm96358vw2 |\
cpva502p |\
dg834gt |\
dmv-s0 |\
dsl-2650u |\
dv-201amr |\
f5d7633 |\
fast2404 |\
magic |\
rg100a |\
rta1025W |\
td-w8900gb |\
usr9108 |\
v2500v_bb)
	ucidef_set_interfaces_lan_wan "eth1" "eth0"
	ucidef_add_switch "eth1" "1" "1"
	ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
	;;

dsl-274xb-c |\
hg553 |\
hg556a_* |\
homehub2a)
	ucidef_set_interface_lan "eth0.1"
	ucidef_add_switch "eth0" "1" "1"
	ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5t"
	;;

dva-g3810bn |\
hg520 |\
neufbox4)
	ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
	ucidef_add_switch "eth1" "1" "1"
	ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5t"
	;;

a4001n1 |\
a4001n |\
ar-5381u |\
ar-5387un |\
bcm963281tan |\
bcm96328avng |\
bcm96368mvngr |\
dsl-274xb-f |\
dsl-275xb-d |\
fast2504n |\
fast2704v2 |\
hg655b |\
p870hw-51a_v2 |\
vr-3025un |\
vr-3025u)
	ucidef_set_interface_lan "eth0.1"
	ucidef_add_switch "eth0" "1" "1"
	ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 8t"
	;;

bcm96368mvwg)
	ucidef_set_interface_lan "eth0.1"
	ucidef_add_switch "eth0" "1" "1"
	ucidef_add_switch_vlan "eth0" "1" "1 2 4 5 8t"
	;;

wap-5813n)
	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
	ucidef_add_switch "eth0" "1" "1"
	ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 5t"
	ucidef_add_switch_vlan "eth0" "2" "4 5t"
	;;

fast2704n |\
dgnd3700v1_dgnd3800b)
	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
	ucidef_add_switch "eth0" "1" "1"
	ucidef_add_switch_vlan "eth0" "1" "1 2 3 4 8t"
	ucidef_add_switch_vlan "eth0" "2" "0 8t"
	;;

neufbox6)
	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
	ucidef_add_switch "switch0" "1" "1"
	ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
	ucidef_add_switch_vlan "switch0" "2" "0 9t"
	;;

vg50)
	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
	ucidef_add_switch "switch0" "1" "1"
	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 8t"
	ucidef_add_switch_vlan "switch0" "2" "4 8t"
	;;

bcm963268bu_p300)
	ucidef_set_interface_lan "eth0.1"
	ucidef_add_switch "switch0" "1" "1"
	ucidef_add_switch_vlan "switch0" "1" "0 3 4 5 6 7 8t"
	;;

*)
	ucidef_set_interfaces_lan_wan "eth1" "eth0"
	;;

esac

uci commit network

exit 0