QinQ vlan tpid 0x8100

I have setup where i run QinQ with 802.1Q (0x8100)
But i have some problem adding vyos to the setup.

Running VyOS 1.4-rolling-202105051111

Simple interface config with protocol 802.1q

ethernet eth1 {
vif-s 800 {
protocol 802.1q
vif-c 10 {
address 192.168.66.10/24

But tcpdump shows that it is still sending 802.1ad (0x88a8)

nd@vyos:~$ sudo tcpdump -i eth1 -v -e
07:48:50.254688 00:0d:b9:5a:2e:55 (oui Unknown) > Broadcast, ethertype 802.1Q-QinQ (0x88a8), length 50: vlan 800, p 0, ethertype 802.1Q, vlan 10, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.66.1 tell 192.168.66.10, length 28

Am i missing something or is this a bug?

Hello @thastad. I create a simple topology to test this, and it looks like all works correctly.

08:32:57.481101 50:01:00:05:00:01 > 50:01:00:06:00:01, ethertype 802.1Q (0x8100), length 106: vlan 800, p 0, ethertype 802.1Q, vlan 1
    192.168.66.1 > 192.168.66.2: ICMP echo request, id 2287, seq 1, length 64
08:32:57.481226 50:01:00:06:00:01 > 50:01:00:05:00:01, ethertype 802.1Q (0x8100), length 106: vlan 800, p 0, ethertype 802.1Q, vlan  
    192.168.66.2 > 192.168.66.1: ICMP echo reply, id 2287, seq 1, length 64

Did you create vif-s 800 interface without protocol 802.1q and then add protocol 802.1q?
Try next:

delete interface ethernet eth1 vif-s 800
commit
set interfaces ethernet eth1 vif-s 800 protocol 802.1q
set interfaces ethernet eth1 vif-s 800 vif-c 10 address 192.168.66.10/24
commit

It looks like does not possible to change ethertype when interface already created. I propose to open bug report on the https://phabricator.vyos.net/
Reproducing steps:

configure
set interfaces ethernet eth1 vif-s 800 vif-c 10 address 192.168.66.2/24
commit
set interfaces ethernet eth1 vif-s 800 protocol 802.1q
commit
vyos@vyos# sudo ip -d link show dev eth1.800
8: eth1.800@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 50:01:00:06:00:01 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 0 maxmtu 65535 
    vlan protocol 802.1ad id 800 <REORDER_HDR> addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 

Thank you.

Can confirm that it is working when you configure vif-s with protocol first.
Had to do two commits,

Also visible in show | commands

When changing protocols after interface creation.
set interfaces ethernet eth1 vif-s 800 vif-c 10 address ‘192.168.66.10/24’

When first adding vif-s with protocol
set interfaces ethernet eth1 vif-s 800 protocol ‘802.1q’
set interfaces ethernet eth1 vif-s 800 vif-c 10 address ‘192.168.66.10/24’

Will make a bug report

1 Like

This worked perfectly, thanks!