e5880eb414c43447c6b7182ca8c7a2fb0c41c52d
[openwrt/svn-archive/archive.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 homehub2a)
71 ucidef_set_interface_lan "eth0.1"
72 ucidef_add_switch "eth0" "1" "1"
73 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5t"
74 ;;
75
76 dva-g3810bn |\
77 hg520 |\
78 neufbox4)
79 ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
80 ucidef_add_switch "eth1" "1" "1"
81 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5t"
82 ;;
83
84 a4001n1 |\
85 a4001n |\
86 ar-5381u |\
87 ar-5387un |\
88 bcm963281tan |\
89 bcm96328avng |\
90 bcm96368mvngr |\
91 dsl-274xb-f |\
92 dsl-275xb-d |\
93 fast2504n |\
94 fast2704v2 |\
95 hg655b |\
96 p870hw-51a_v2 |\
97 vr-3025un |\
98 vr-3025u)
99 ucidef_set_interface_lan "eth0.1"
100 ucidef_add_switch "eth0" "1" "1"
101 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 8t"
102 ;;
103
104 bcm96368mvwg)
105 ucidef_set_interface_lan "eth0.1"
106 ucidef_add_switch "eth0" "1" "1"
107 ucidef_add_switch_vlan "eth0" "1" "1 2 4 5 8t"
108 ;;
109
110 wap-5831n)
111 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
112 ucidef_add_switch "eth0" "1" "1"
113 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 5t"
114 ucidef_add_switch_vlan "eth0" "2" "4 5t"
115 ;;
116
117 dgnd3700v1_dgnd3800b)
118 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
119 ucidef_add_switch "eth0" "1" "1"
120 ucidef_add_switch_vlan "eth0" "1" "1 2 3 4 8t"
121 ucidef_add_switch_vlan "eth0" "2" "0 8t"
122 ;;
123
124 neufbox6)
125 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
126 ucidef_add_switch "switch0" "1" "1"
127 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
128 ucidef_add_switch_vlan "switch0" "2" "0 9t"
129 ;;
130
131 vg50)
132 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
133 ucidef_add_switch "switch0" "1" "1"
134 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 8t"
135 ucidef_add_switch_vlan "switch0" "2" "4 8t"
136 ;;
137
138 bcm963268bu_p300)
139 ucidef_set_interface_lan "eth0.1"
140 ucidef_add_switch "switch0" "1" "1"
141 ucidef_add_switch_vlan "switch0" "1" "0 3 4 5 6 7 8t"
142 ;;
143
144 *)
145 ucidef_set_interfaces_lan_wan "eth1" "eth0"
146 ;;
147
148 esac
149
150 uci commit network
151
152 exit 0