Page MenuHomeVyOS Platform

Static routes with dhcp-interface are flaky
In progress, Requires assessmentPublicBUG

Description

I've observed the following issues with dhcp-interface static routes:

  1. Setting the interface to DHCP and adding a dhcp-interface static route in the same commit doesn't add the route to FRR.
  2. Renewing the DHCP lease after changing the default-router option or renumbering the network doesn't update the dhcp-interface next-hop in FRR.
  3. Rebooting after changing the default-router option or renumbering the network leaves the old dhcp-interface next-hop in FRR.

More info for #3:

vyos@vyos:~$ show configuration commands
set interfaces ethernet eth0 address 'dhcp'
set interfaces ethernet eth0 hw-id '0c:3f:c4:82:3f:00'
set interfaces loopback lo
set protocols static route 10.1.0.0/24 dhcp-interface 'eth0'
set system config-management commit-revisions '100'
set system console device ttyS0 speed '115200'
set system host-name 'vyos'
set system login user vyos authentication encrypted-password '$6$nl8G/LLSeS3igU'
set system login user vyos authentication plaintext-password ''
set system ntp server time1.vyos.net
set system ntp server time2.vyos.net
set system ntp server time3.vyos.net
set system syslog global facility all level 'info'
set system syslog global facility protocols level 'debug'
vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             10.0.2.10/24                      u/u  
lo               127.0.0.1/8                       u/u  
                 ::1/128                                
vyos@vyos:~$ vtysh -c 'show running-config'
Building configuration...

Current configuration:
!
frr version 7.5.1-20201222-185-gb3f4ff1d9
frr defaults traditional
hostname vyos
log syslog
log facility local7
service integrated-vtysh-config
!
ip route 10.1.0.0/24 10.0.1.1
!
line vty
!
end
vyos@vyos:~$ cat /var/lib/dhcp/dhclient_eth0.leases
lease {
  interface "eth0";
  fixed-address 10.0.1.10;
  option subnet-mask 255.255.255.0;
  option routers 10.0.1.1;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option dhcp-server-identifier 10.0.1.1;
  renew 2 2021/07/13 18:16:10;
  rebind 2 2021/07/13 18:16:10;
  expire 2 2021/07/13 18:16:10;
}
lease {
  interface "eth0";
  fixed-address 10.0.2.10;
  option subnet-mask 255.255.255.0;
  option routers 10.0.2.1;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option dhcp-server-identifier 10.0.2.1;
  renew 3 2021/07/14 05:25:46;
  rebind 3 2021/07/14 15:16:38;
  expire 3 2021/07/14 18:16:38;
}

Details

Difficulty level
Normal (likely a few hours)
Version
1.4-rolling-202107122017
Why the issue appeared?
Other
Is it a breaking change?
Perfectly compatible

Event Timeline

stepler changed the task status from Open to In progress.Jul 14 2021, 12:22 PM
stepler claimed this task.
stepler changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).Jul 14 2021, 5:56 PM
stepler changed Why the issue appeared? from Will be filled on close to Other.
stepler changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.