106bf5f86fe89e4ea799fbdb0e6a1f44d3d53b0d
[openwrt/staging/dedeckeh.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 SPW500V)
20 ucidef_set_interface_lan "eth0"
21 ;;
22
23 96338GW |\
24 96338W |\
25 96338W2_E7T |\
26 96348A-122 |\
27 96348W3 |\
28 CPVA642 |\
29 CT536_CT5621 |\
30 CT6373-1 |\
31 D-4P-W |\
32 "F@ST2604" |\
33 RTA1320_16M |\
34 RTA770BW |\
35 V2110)
36 ucidef_set_interface_lan "eth0"
37 ucidef_add_switch "eth0" "1" "1"
38 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
39 ;;
40
41 96348GW |\
42 96348GW-10 |\
43 96348GW-11 |\
44 96348GW-A |\
45 96358VW |\
46 96358VW2 |\
47 AGPF-S0 |\
48 "CPVA502+" |\
49 DV201AMR |\
50 DWV-S0 |\
51 "F@ST2404" |\
52 HW553 |\
53 MAGIC |\
54 RTA1025W_16 |\
55 V2500V_BB)
56 ucidef_set_interfaces_lan_wan "eth1" "eth0"
57 ucidef_add_switch "eth1" "1" "1"
58 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
59 ;;
60
61 AW4139 |\
62 HW556*)
63 ucidef_set_interface_lan "eth0.1"
64 ucidef_add_switch "eth0" "1" "1"
65 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5t"
66 ;;
67
68 NB4-* |\
69 DVG3810BN)
70 ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
71 ucidef_add_switch "eth1" "1" "1"
72 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5t"
73 ;;
74
75 96328avng |\
76 96328A-1241N |\
77 96328A-1441N1 |\
78 963281TAN |\
79 963281T_TEF |\
80 96368MVNgr)
81 ucidef_set_interface_lan "eth0.1"
82 ucidef_add_switch "eth0" "1" "1"
83 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 8t"
84 ;;
85
86 96368MVWG)
87 ucidef_set_interface_lan "eth0.1"
88 ucidef_add_switch "eth0" "1" "1"
89 ucidef_add_switch_vlan "eth0" "1" "1 2 4 5 8t"
90 ;;
91
92 NB6)
93 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
94 ucidef_add_switch "switch0" "1" "1"
95 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
96 ucidef_add_switch_vlan "switch0" "2" "0 9t"
97 ;;
98
99 *)
100 ucidef_set_interfaces_lan_wan "eth1" "eth0"
101 ;;
102
103 esac
104
105 uci commit network
106
107 exit 0