Page MenuHomeVyOS Platform

vrrp over dhcp default route bug (unexpected vrf)
Closed, ResolvedPublicBUG

Description

Unexpected vrf configuration for the default route.
When we use rfc3768 and this node as a master. Eth1 gets an address via dhcp.
To reproduce:

set interfaces ethernet eth1 address 'dhcp'

set high-availability vrrp group test interface 'eth1'
set high-availability vrrp group test rfc3768-compatibility
set high-availability vrrp group test virtual-address '172.20.110.111/24'
set high-availability vrrp group test virtual-address '172.20.110.15/24'
set high-availability vrrp group test vrid '1'

Vtysh config (unexpected vrf value):

service integrated-vtysh-config
!
vrf eth1v1
 ip route 0.0.0.0/0 192.168.101.1 eth1 tag 210 210 
 exit-vrf
!
line vty
!

Expected behavior - to see default route without vrf.

Tested on: 1.3.0-rc1 and 1.4-rolling-202103070218

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.3.0-rc1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav renamed this task from vrrp over dhcp default route bug to vrrp over dhcp default route bug (unexpected vrf).Mar 7 2021, 8:51 PM
Viacheslav updated the task description. (Show Details)

vrf detected even it not created
https://github.com/vyos/vyos-1x/blob/dd35eb76153191bc487e3ea23c3e73c753ec1d4b/src/etc/dhcp/dhclient-enter-hooks.d/03-vyos-ipwrapper#L55-L59

root@r-roll01:/home/vyos# basename /sys/class/net/eth1/upper_* | sed -e 's/upper_//'
eth1v1

If we create a vrf "foo"

root@r-roll01:/home/vyos# ls /sys/class/net/eth1/upper_
upper_eth1v1/ upper_foo/
Viacheslav changed the task status from Open to Needs testing.Mar 9 2021, 11:14 AM
Viacheslav assigned this task to stepler.
stepler changed the task status from Needs testing to Backport candidate.Mar 10 2021, 8:10 PM

Looks good on 1.4-rolling-202103100218:

vyos@vyos:~$ configure
[edit]
vyos@vyos# set interfaces ethernet eth0 address dhcp
[edit]
vyos@vyos# set high-availability vrrp group test vrid 1
[edit]
vyos@vyos# set high-availability vrrp group test rfc3768-compatibility
[edit]
vyos@vyos# set high-availability vrrp group test interface eth0
[edit]
vyos@vyos# set high-availability vrrp group test virtual-address 10.0.0.1/24
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit
Warning: configuration changes have not been saved.
exit
vyos@vyos:~$ vtysh -c "show running-config"
Building configuration...

Current configuration:
!
frr version 7.5.1
frr defaults traditional
hostname vyos
log syslog
log facility local7
service integrated-vtysh-config
!
ip route 0.0.0.0/0 192.168.251.1 eth0 tag 210 210
!
line vty
!
end
vyos@vyos:~$ configure
[edit]
vyos@vyos# delete interfaces ethernet eth0 address
[edit]
vyos@vyos# delete high-availability
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# set vrf name test table 100
[edit]
vyos@vyos# set interfaces ethernet eth0 vrf test
[edit]
vyos@vyos# set interfaces ethernet eth0 address dhcp
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit
Warning: configuration changes have not been saved.
exit
vyos@vyos:~$ vtysh -c "show running-config"
Building configuration...

Current configuration:
!
frr version 7.5.1
frr defaults traditional
hostname vyos
log syslog
log facility local7
service integrated-vtysh-config
!
vrf test
 ip route 0.0.0.0/0 192.168.251.1 eth0 tag 210 210
 exit-vrf
!
line vty
!
end
vyos@vyos:~$ show version

Version:          VyOS 1.4-rolling-202103100218
Release Train:    sagitta

Built by:         [email protected]
Built on:         Wed 10 Mar 2021 02:18 UTC
Build UUID:       51645abd-58ce-4332-9d3d-e2f1a855ab67
Build Commit ID:  7f51126be43dd7

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    26804cb9-0c63-4039-b493-bebb7fb1f6d6

Copyright:        VyOS maintainers and contributors

Looks good on 1.3-rolling-202103280642:

vyos@vyos:~$ configure
[edit]
vyos@vyos# set interfaces ethernet eth0 address dhcp
[edit]
vyos@vyos# set high-availability vrrp group test vrid 1
[edit]
vyos@vyos# set high-availability vrrp group test rfc3768-compatibility
[edit]
vyos@vyos# set high-availability vrrp group test interface eth0
[edit]
vyos@vyos# set high-availability vrrp group test virtual-address 10.0.0.1/24
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit
Warning: configuration changes have not been saved.
exit
vyos@vyos:~$ vtysh -c "show running-config"
Building configuration...

Current configuration:
!
frr version 7.3.1-20210325-00-g7e801aec1
frr defaults traditional
hostname vyos
log syslog
log facility local7
service integrated-vtysh-config
!
ip route 0.0.0.0/0 192.168.251.1 eth0 tag 210 210
!
line vty
!
end
vyos@vyos:~$ configure
[edit]
vyos@vyos# delete interfaces ethernet eth0 address
[edit]
vyos@vyos# delete high-availability
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# set vrf name test table 100
[edit]
vyos@vyos# set interfaces ethernet eth0 vrf test
[edit]
vyos@vyos# set interfaces ethernet eth0 address dhcp
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit
Warning: configuration changes have not been saved.
exit
vyos@vyos:~$ vtysh -c "show running-config"
Building configuration...

Current configuration:
!
frr version 7.3.1-20210325-00-g7e801aec1
frr defaults traditional
hostname vyos
log syslog
log facility local7
service integrated-vtysh-config
!
vrf test
 ip route 0.0.0.0/0 192.168.251.1 eth0 tag 210 210
 exit-vrf
!
line vty
!
end
vyos@vyos:~$ show version

Version:          VyOS 1.3-rolling-202103280642
Release Train:    equuleus

Built by:         [email protected]
Built on:         Mon 29 Mar 2021 03:42 UTC
Build UUID:       a3b25a73-a77e-440d-9000-099e5b504cd2
Build Commit ID:  56ecc5b821b2f0

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    688112b3-7dd7-42b5-9642-83ab9b7242ee

Copyright:        VyOS maintainers and contributors
SrividyaA set Issue type to Bug (incorrect behavior).Aug 31 2021, 2:12 PM