Page MenuHomeVyOS Platform

Not possible to change ethertype after interface creation
Closed, ResolvedPublicBUG

Description

If you first configure a QinQ interface and then later try to change the ethertype to 802.1q the ethertype is not changed.

set interfaces ethernet eth0 vif-s 700 vif-c 20 address 10.0.0.1/24
commit

set interfaces ethernet eth0 vif-s 700 protocol 802.1q
commit

sudo ip -d link show dev eth0.700
13: eth0.700@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
    link/ether 00:0d:b9:5a:2e:54 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 0 maxmtu 65535
    vlan protocol 802.1ad id 700 <REORDER_HDR> addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

If you configure 802.1q first the ethertype is set correct.

set interfaces ethernet eth0 vif-s 700 protocol '802.1q'
set interfaces ethernet eth0 vif-s 700 vif-c 20 address '10.0.0.1/24'
commit

sudo ip -d link show dev eth0.700
15: eth0.700@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
    link/ether 00:0d:b9:5a:2e:54 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 0 maxmtu 65535
    vlan protocol 802.1Q id 700 <REORDER_HDR> addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

Details

Difficulty level
Normal (likely a few hours)
Version
1.4-rolling-202105051111
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav triaged this task as Normal priority.May 12 2021, 6:26 PM
Viacheslav changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
Viacheslav changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
c-po added a project: VyOS 1.3 Equuleus.
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.
c-po moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.

https://github.com/vyos/vyos-1x/commit/edcdea890b2eeb03d24b06fdd8ac38133e631c05

Function get_interface_config itself not added. Needs to add it for 1.3.

[email protected]:~$ show int
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/show_interfaces.py", line 26, in <module>
    from vyos.ifconfig import Section
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/__init__.py", line 18, in <module>
    from vyos.ifconfig.interface import Interface
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 39, in <module>
    from vyos.util import get_interface_config
ImportError: cannot import name 'get_interface_config' from 'vyos.util' (/usr/lib/python3/dist-packages/vyos/util.py)
[email protected]:~$
SrividyaA set Issue type to Bug (incorrect behavior).Aug 31 2021, 3:06 PM