Sample Header Ad - 728x90

Confusing about vlan on bridge and filtering

1 vote
0 answers
67 views
I have created on openwrt router an interface tagged with vlan id 1 On one server i have some lxc containers and I want some of them using this vlan (id 1), I have created the bridge ip link add name br1 type bridge ip link set br1 type bridge vlan_filtering 1 ip link set enp7s0.1 up ip link set br1 up ip addr add 192.168.179.2 dev br1 add the vlan tag bridge vlan del dev enp7s0.1 vid 1 bridge vlan add dev enp7s0.1 vid 1 bridge vlan del dev br1 vid 1 self bridge vlan add dev br1 vid 1 self bridge vlan add dev veth1001_17Yt vid 1 This is the result bridge vlan sh port vlan-id enp7s0 1 PVID Egress Untagged wlan0 1 PVID Egress Untagged br0 1 PVID Egress Untagged vnet0 1 PVID Egress Untagged veth1001_LoZK 1 PVID Egress Untagged veth1001_4Kss 1 PVID Egress Untagged veth1001_ZF7k 1 PVID Egress Untagged veth1001_FuzI 1 PVID Egress Untagged veth1001_1C5W 1 PVID Egress Untagged veth1001_W2FM 1 PVID Egress Untagged veth1001_YsU5 1 PVID Egress Untagged veth1001_823Q 1 PVID Egress Untagged veth1001_Uf5S 1 PVID Egress Untagged veth1001_R5zN 1 PVID Egress Untagged veth1001_9gyW 1 PVID Egress Untagged lxcbr0 1 PVID Egress Untagged enp7s0.1 1 br1 1 veth1001_17Yt 1 From pc using the bridge I try to ping ip of lxc container (which use vlan tag 1) ping 192.168.179.3 PING 192.168.179.3 (192.168.179.3) 56(84) bytes of data. It doesn't work! But if I disable vlan filtering... ip link set dev br1 type bridge vlan_filtering 0 works ping 192.168.179.3 PING 192.168.179.3 (192.168.179.3) 56(84) bytes of data. 64 bytes from 192.168.179.3: icmp_seq=1 ttl=63 time=8.75 ms 64 bytes from 192.168.179.3: icmp_seq=2 ttl=63 time=6.88 ms but seems vlan tag are not used tcpdump -i br1 -e vlan tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on br1, link-type EN10MB (Ethernet), snapshot length 262144 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel What I miss?
Asked by elbarna (13690 rep)
Feb 2, 2025, 02:05 AM