814e1003cd6e9287659e309eeffd3a4d712cf0a9
[openwrt/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 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 p870hw-51a_v2 |\
96 vr-3025un |\
97 vr-3025u)
98 ucidef_set_interface_lan "eth0.1"
99 ucidef_add_switch "eth0" "1" "1"
100 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 8t"
101 ;;
102
103 bcm96368mvwg)
104 ucidef_set_interface_lan "eth0.1"
105 ucidef_add_switch "eth0" "1" "1"
106 ucidef_add_switch_vlan "eth0" "1" "1 2 4 5 8t"
107 ;;
108
109 wap-5831n)
110 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
111 ucidef_add_switch "eth0" "1" "1"
112 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 5t"
113 ucidef_add_switch_vlan "eth0" "2" "4 5t"
114 ;;
115
116 dgnd3700v1_dgnd3800b)
117 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
118 ucidef_add_switch "eth0" "1" "1"
119 ucidef_add_switch_vlan "eth0" "1" "1 2 3 4 8t"
120 ucidef_add_switch_vlan "eth0" "2" "0 8t"
121 ;;
122
123 neufbox6)
124 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
125 ucidef_add_switch "switch0" "1" "1"
126 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
127 ucidef_add_switch_vlan "switch0" "2" "0 9t"
128 ;;
129
130 vg50)
131 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
132 ucidef_add_switch "switch0" "1" "1"
133 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 8t"
134 ucidef_add_switch_vlan "switch0" "2" "4 8t"
135 ;;
136
137 bcm963268bu_p300)
138 ucidef_set_interface_lan "eth0.1"
139 ucidef_add_switch "switch0" "1" "1"
140 ucidef_add_switch_vlan "switch0" "1" "0 3 4 5 6 7 8t"
141 ;;
142
143 *)
144 ucidef_set_interfaces_lan_wan "eth1" "eth0"
145 ;;
146
147 esac
148
149 uci commit network
150
151 exit 0