· 6 years ago · Oct 23, 2018, 06:46 AM
1vlan 1 is pub
2vlan 2 is wan
3vlan 3 is priv
4
5port 6 is the CPU
6port 0 is the WAN port
7ports 1 and 2 are connected to ethernet runs to two ap's (with tagged packets)
8ports 3 and 4 have vlan tags stripped so you can plug in random devices
9
10gateway's /etc/config/network:
11
12config interface 'loopback'
13 option ifname 'lo'
14 option proto 'static'
15 option ipaddr '127.0.0.1'
16 option netmask '255.0.0.0'
17
18config interface 'wan'
19 option ifname 'eth0.2'
20 option proto 'dhcp'
21
22config interface 'wan6'
23 option proto 'dhcpv6'
24 option ifname '@wan'
25 option reqprefix '60'
26
27config switch
28 option name 'switch0'
29 option reset '1'
30 option enable_vlan '1'
31
32config switch_vlan
33 option device 'switch0'
34 option vlan '1'
35 option ports '1t 2t 3 4 6t'
36
37config switch_vlan
38 option device 'switch0'
39 option vlan '2'
40 option ports '0 6t'
41
42config switch_vlan
43 option device 'switch0'
44 option vlan '3'
45 option ports '1t 2t 6t'
46
47config interface 'pub'
48 option ifname 'eth0.3'
49 option type 'bridge'
50 option proto 'static'
51 option ipaddr '10.11.13.1'
52 option netmask '255.255.255.192'
53 option ip6assign '64'
54
55config interface 'priv'
56 option ifname 'eth0.1'
57 option type 'bridge'
58 option proto 'static'
59 option ipaddr '192.168.11.1'
60 option netmask '255.255.255.0'
61 option ip6assign '64'
62
63ap's /etc/config/network:
64
65config interface 'loopback'
66 option ifname 'lo'
67 option proto 'static'
68 option ipaddr '127.0.0.1'
69 option netmask '255.0.0.0'
70
71config interface 'pub'
72 option type 'bridge'
73 option ifname 'eth0.3'
74 option proto 'static'
75 option ip6assign '60'
76 option ipaddr '10.11.13.2'
77 option netmask '255.255.255.192'
78 option gateway '10.11.13.1'
79 option dns '10.11.13.1'
80
81config interface 'priv'
82 option type bridge
83 option ifname eth0.1
84 option proto static
85 option ipaddr '192.168.11.2'
86 option netmask '255.255.255.0'
87 option gateway '192.168.11.1'
88 option dns '192.168.11.1'