To reproduce set address by dhcp , use load-balancing configuration:
set interfaces ethernet eth1 address 'dhcp' set interfaces ethernet eth2 address 'dhcp' set load-balancing wan interface-health eth1 failure-count '1' set load-balancing wan interface-health eth1 nexthop 'dhcp' set load-balancing wan interface-health eth1 success-count '1' set load-balancing wan interface-health eth2 failure-count '1' set load-balancing wan interface-health eth2 nexthop 'dhcp' set load-balancing wan interface-health eth2 success-count '1' set load-balancing wan rule 10 inbound-interface 'eth3' set load-balancing wan rule 10 interface eth1 set load-balancing wan rule 10 interface eth2 set load-balancing wan rule 10 source address '198.51.100.0/24'
Force renew the DHCP address:
vyos@r14:~$ renew dhcp interface eth1
Logs hook 04-dhcp-wanlb returned non-zero exit status:
May 08 12:40:37 r14 root[4623]: /etc/dhcp/dhclient-exit-hooks.d/04-dhcp-wanlb returned non-zero exit status 1 May 08 12:40:37 r14 systemd[1]: [email protected]: Deactivated successfully. May 08 12:40:37 r14 systemd[1]: Stopped [email protected] - DHCP client on eth1. May 08 12:40:37 r14 systemd[1]: Starting [email protected] - DHCP client on eth1... May 08 12:40:37 r14 systemd[1]: Started [email protected] - DHCP client on eth1. May 08 12:40:37 r14 sudo[4551]: pam_unix(sudo:session): session closed for user root May 08 12:40:37 r14 dhclient-script-vyos[4628]: Current dhclient PID: 4627, Parent PID: 4626, IP version: 4, All dhclients for interface eth1: 4626 4627 May 08 12:40:37 r14 dhclient-script-vyos[4628]: Passing command to /usr/sbin/ip: "link set dev eth1 up" May 08 12:40:37 r14 dhclient-script-vyos[4628]: No changes to apply via vyos-hostsd-client May 08 12:40:37 r14 root[4656]: /etc/dhcp/dhclient-exit-hooks.d/04-dhcp-wanlb returned non-zero exit status 1 May 08 12:40:37 r14 dhclient[4627]: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 5 May 08 12:40:40 r14 dhclient[4627]: DHCPOFFER of 192.168.100.254 from 192.168.100.1 May 08 12:40:40 r14 dhclient[4627]: DHCPREQUEST for 192.168.100.254 on eth1 to 255.255.255.255 port 67 May 08 12:40:40 r14 dhclient[4627]: DHCPACK of 192.168.100.254 from 192.168.100.1
Use sudo kill -s SIGUSR2 $( cat $pid ) 2>/dev/null seems fixes the bug