Hi,
I tried latest Openwrt release r13601-d93da0d016
and converting swconfig
configuration to DSA
.
I have problems with DSA
configuration.
- swconfig setup
sw.port | 0 | 1 | 2 | 3 | 4 | 5 | 6 | vlan id | vid |
-----------------------------------------------------
vlan201 | u | u | t | t | | t | | 1 | 201 |
vlan202 | | | t | t | | t | | 3 | 202 |
vlan204 | | | t | t | | t | | 4 | 204 |
wan | | | | | u | | t | 2 | |
root@linksys0:~# cat /etc/config/network
config interface 'vlan201'
option type 'bridge'
option ifname 'eth0.201'
option proto 'static'
option ipaddr '10.254.201.1'
option netmask '255.255.255.0'
config interface 'vlan202'
option type 'bridge'
option ifname 'eth0.202'
option proto 'static'
option ipaddr '10.254.202.1'
option netmask '255.255.255.0'
config interface 'vlan204'
option type 'bridge'
option ifname 'eth0.204'
option proto 'static'
option ipaddr '10.254.204.1'
option netmask '255.255.255.0'
config interface 'wan'
option 'ifname' 'eth1.2'
option _orig_ifname 'eth1.2'
option _orig_bridge 'false'
option 'proto' 'pppoe'
option 'username' 'user'
option 'password' 'password'
option 'timeout' '10'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2t 3t 5t'
option vid '201'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6t'
option vid '2'
config switch_vlan
option device 'switch0'
option vlan '3'
option ports '2t 3t 5t'
option vid '202'
config switch_vlan
option device 'switch0'
option vlan '4'
option ports '2t 3t 5t'
option vid '204'
- DSA setup 1 (not fully working)
VID | lan0 | lan1 | lan2 | lan3 | wan |
----------------------------------------
201 | t | t | u | u | |
202 | t | t | | | |
204 | t | t | | | |
2 | | | | | u |
root@linksys0:~# cat /etc/config/network
config interface 'vlan201'
option type 'bridge'
option ifname 'lan1.201 lan2.201 lan3 lan4'
option proto 'static'
option ipaddr '10.254.201.1'
option netmask '255.255.255.0'
config interface 'vlan202'
option type 'bridge'
option ifname 'lan1.202 lan2.202'
option proto 'static'
option ipaddr '10.254.202.1'
config interface 'vlan204'
option type 'bridge'
option ifname 'lan1.204 lan2.204'
option proto 'static'
option ipaddr '10.254.204.1'
option netmask '255.255.255.0'
config interface 'wan'
option 'ifname' 'wan'
option 'proto' 'pppoe'
option 'username' 'user'
option 'password' 'password'
option 'timeout' '10'
root@linksys0:~# cat /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
#### enable vlan filtering
ip link set dev br-vlan201 type bridge vlan_filtering 1
ip link set dev br-vlan202 type bridge vlan_filtering 1
ip link set dev br-vlan204 type bridge vlan_filtering 1
#### set vlans
bridge vlan add dev lan3 vid 201 pvid untagged
bridge vlan add dev lan4 vid 201 pvid untagged
ip link set br-vlan201 type bridge vlan_default_pvid 201
ip link set br-vlan202 type bridge vlan_default_pvid 202
ip link set br-vlan204 type bridge vlan_default_pvid 204
#### clear out vlan 1
bridge vlan del dev lan3 vid 1
bridge vlan del dev lan4 vid 1
I have problem with communication between untagged and tagged interfaces ( lan1.201
and lan3
) in bridge vlan201
.
This is tcpdump on openwrt when pinging something connected on lan1.201
from PC connected to lan3
.
root@linksys0:~# tcpdump -n -i any host 10.254.201.2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked v1), capture size 262144 bytes
12:12:28.018672 ARP, Request who-has 10.254.201.2 tell 10.254.201.46, length 46
12:12:28.018672 ARP, Request who-has 10.254.201.2 tell 10.254.201.46, length 46
12:12:29.032057 ARP, Request who-has 10.254.201.2 tell 10.254.201.46, length 46
12:12:29.032057 ARP, Request who-has 10.254.201.2 tell 10.254.201.46, length 46
12:12:30.045341 ARP, Request who-has 10.254.201.2 tell 10.254.201.46, length 46
12:12:30.045341 ARP, Request who-has 10.254.201.2 tell 10.254.201.46, length 46
^C
Output:
root@linksys0:~# bridge vlan
port vlan-id
lan4 201 PVID Egress Untagged
lan3 201 PVID Egress Untagged
br-vlan201 201 PVID Egress Untagged
lan1.201 201 PVID Egress Untagged
lan2.201 201 PVID Egress Untagged
br-vlan202 202 PVID Egress Untagged
lan1.202 202 PVID Egress Untagged
lan2.202 202 PVID Egress Untagged
br-vlan204 204 PVID Egress Untagged
lan1.204 204 PVID Egress Untagged
lan2.204 204 PVID Egress Untagged
root@linksys0:~#
root@linksys0:~# brctl show
bridge name bridge id STP enabled interfaces
br-vlan201 7fff.6038e0cd87c0 no lan1.201
lan2.201
lan3
lan4
br-vlan202 7fff.6038e0cd87c0 no lan1.202
lan2.202
br-vlan204 7fff.6038e0cd87c0 no lan1.204
lan2.204
root@linksys0:~#
- DSA setup 2 (router is not booting)
This setup is based on setup provided by dengqf6 in PR2942.
The difference from DSA setup 1
is that there is only one bridge.
I tried configuration based on that setup, but the router is dead (bricked) after reboot.
I don't have serial cable to see where is the problem.
I saw that there is setup in /etc/hotplug.d/iface/21-lan
file (not in /etc/rc.local
).
Ports lan1
and lan2
are trunk ports (with vlans 201
, 202
, and 203
), and ports lan3
and lan4
are untagged ports with vlan 201
.
I can boot the previous partition with old swconfig
configuration.
# vi /etc/config/network
config interface 'lan'
option type 'bridge'
option ifname 'lan1 lan2 lan3 lan4'
option proto 'none'
config interface 'vlan201'
option ifname '@lan.201'
option proto 'static'
option ipaddr '10.254.201.1'
option netmask '255.255.255.0'
config interface 'vlan202'
option ifname '@lan.202'
option proto 'static'
option ipaddr '10.254.202.1'
option netmask '255.255.255.0'
config interface 'vlan204'
option ifname '@lan.204'
option proto 'static'
option ipaddr '10.254.204.1'
option netmask '255.255.255.0'
# vi /etc/hotplug.d/iface/21-lan
#!/bin/sh
[ $INTERFACE = lan -a $ACTION = ifup ] || exit 0
# enable VLAN filtering
ip link set dev br-lan type bridge vlan_filtering 1
# clear out vlan 1
bridge v del dev lan1 vid 1
bridge v del dev lan2 vid 1
bridge v del dev lan3 vid 1
bridge v del dev lan4 vid 1
bridge v del dev br-lan self vid 1
# set vlans lan1
bridge v add dev lan1 vid 201
bridge v add dev lan1 vid 202
bridge v add dev lan1 vid 204
# set vlans lan2
bridge v add dev lan2 vid 201
bridge v add dev lan2 vid 202
bridge v add dev lan2 vid 204
# set vlans lan1
bridge v add dev lan3 vid 201 pvid untagged
# set vlans lan2
bridge v add dev lan4 vid 201 pvid untagged
# set vlans cpu port
bridge v add dev br-lan self vid 201 pvid untagged
bridge v add dev br-lan self vid 202
bridge v add dev br-lan self vid 204
I hope somebody can find / locate the problem.
I am not sure where is is the problem, and is configuration in file /etc/hotplug.d/iface/21-lan
correct, or it should go also in /etc/rc.local
.
Best regards!