Configuration:
set interfaces bridge br0 enable-vlan set interfaces bridge br0 member interface eth1 native-vlan '1000' set interfaces bridge br0 member interface eth2 native-vlan '1001' set interfaces bridge br0 vif 1000 address '172.16.0.3/24' set interfaces bridge br0 vif 1001 address '172.16.1.3/24'
Situation:
- 2 hosts on the same VLAN are able to talk each other (L2 between hosts is fine, if I add another port, i.e. eth3).
- any host is not able to reach the VyOS itself (i.e. not able to ping 172.16.x.3) (and not able to use it as a inter-vlan router).
under the hood situation:
vyos@s1:~$ sudo bridge vlan port vlan-id eth1 1000 PVID Egress Untagged eth2 1001 PVID Egress Untagged br0 1 PVID Egress Untagged
This is solved by manually launching, to instruct the bridge to handle also the VLAN locally:
sudo bridge vlan add vid 1000 dev br0 self sudo bridge vlan add vid 1001 dev br0 self
which results in
vyos@s1:~$ sudo bridge vlan port vlan-id eth1 1000 PVID Egress Untagged eth2 1001 PVID Egress Untagged br0 1 PVID Egress Untagged 1000 1001
And now the hosts are able to talk to VyOS, and between each other:
vyos@s1:~$ ping 172.16.0.1 PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data. 64 bytes from 172.16.0.1: icmp_seq=1 ttl=64 time=0.630 ms 64 bytes from 172.16.0.1: icmp_seq=2 ttl=64 time=0.634 ms 64 bytes from 172.16.0.1: icmp_seq=3 ttl=64 time=0.568 ms --- 172.16.0.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2080ms rtt min/avg/max/mdev = 0.568/0.610/0.634/0.030 ms vyos@s1:~$ ping 172.16.1.2 PING 172.16.1.2 (172.16.1.2) 56(84) bytes of data. 64 bytes from 172.16.1.2: icmp_seq=1 ttl=64 time=0.612 ms 64 bytes from 172.16.1.2: icmp_seq=2 ttl=64 time=0.384 ms 64 bytes from 172.16.1.2: icmp_seq=3 ttl=64 time=0.436 ms --- 172.16.1.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2081ms rtt min/avg/max/mdev = 0.384/0.477/0.612/0.097 ms
Most probably this is missing in https://github.com/vyos/vyos-1x/blob/current/python/vyos/ifconfig/bridge.py
thanks
Stefano