Page MenuHomeVyOS Platform

Cannot add ethernet vif-s vif-c interface to bridge-group
Closed, ResolvedPublicBUG

Description

Scenario/Problem:
I needed to bridge a qnq sub-vlan interface on one port (i.e. eth0.499.30) to a normal vlan interface on another port (i.e. eth1.30), so I created bridge br30, then set the bridge-group bridge to br30 on the normal vlan interface eth1.30, then set the bridge-group bridge to br30 on the qnq sub-vlan interface eth0.499.30, but when commiting the configuration change, the commit fails to set the bridge-group on the qnq sub-vlan interface.

Workaround:
Running

sudo brctl addif br30 eth0.499.30

connects the interface to the bridge as expected, and testing shows that the interfaces/system are performing as expected.

Additional Info:
I'm using the VMware OVA version 1.1.8 as released on the vyos.io site. This installation is on a DoD classified network, so I cannot retrieve any files or data from the system whatsoever! Also, it cannot be connected to the Internet to download updates, so our only option is to use a workaround until a new iso is released with a fix included.

Steps to reproduce:
Deploy VMware OVA with 2 network interfaces

set interface bridge 'br30'
set interface ethernet eth0 vif-s 499 vif-s 30 
set interface ethernet eth0 vif-s 499 vif-c 30 bridge-group bridge br30
set interface ethernet eth1 vif 30
set interface ethernet eth1 vif 30 bridge-group bridge br30
commit

Details

Difficulty level
Unknown (require assessment)
Version
1.1.8
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

christopher.crews07 triaged this task as Normal priority.Mar 20 2018, 6:16 PM
christopher.crews07 created this task.
christopher.crews07 created this object in space S1 VyOS Public.
syncer changed the visibility from "Subscribers" to "Public (No Login Required)".
syncer changed the subtype of this task from "Task" to "Bug".Oct 20 2018, 4:51 AM
lbv2rus added a subscriber: lbv2rus.EditedJan 29 2019, 9:20 PM

Hi.
Sorry for bad english.

The problem does not exist in EPA3, with vif-s and vif-c non zero.
But!!!
This code (lines 188-190 in Interface.pm) work wrong when vif-s or vif-c is zero, because zero is false in condition.

$path .= " vif $self->{vif}" if ($self->{vif} && !$self->{vif_c});
$path .= " vif-s $self->{vif} vif-c $self->{vif_c}" if
    ($self->{vif} && $self->{vif_c});

After this fix all works as expected

$path .= " vif $self->{vif}" if (defined($self->{vif}) && !defined($self->{vif_c}));
$path .= " vif-s $self->{vif} vif-c $self->{vif_c}" if
    (defined($self->{vif}) && defined($self->{vif_c}));
pasik added a subscriber: pasik.Mar 12 2019, 6:10 PM

@christopher.crews07
In you example some mistake (2 times vif-s)

set interface ethernet eth0 vif-s 499 vif-s 30

Correct would be:

set interface ethernet eth0 vif-s 499 vif-c 30

So, in the latest VyOS 1.3-rolling-201912040242 release all works fine.

set interfaces ethernet eth0 vif-s 499 vif-c 30
set interfaces ethernet eth1 vif 30
set interfaces bridge br30 member interface eth0.499.30
set interfaces bridge br30 member interface eth1.30
vyos@1.3-roll# sudo brctl show
bridge name	bridge id		STP enabled	interfaces
br30		8000.52540056c42e	no		eth0.499.30
							eth1.30
c-po added a subscriber: c-po.Dec 6 2019, 4:25 PM

@Viacheslav thank you for testing!

c-po closed this task as Resolved.Dec 6 2019, 4:26 PM
c-po set Is it a breaking change? to Unspecified (possibly destroys the router).
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.Feb 9 2020, 2:17 PM