I am working with 1.4-rolling-202209130217 (Sagatta) and it looks like two issues that were corrected on 2022-02-01 (T4220 and T4224) are occurring again. I create an image from the ISO and set eth0 for DHCP (set interfaces ethernet address dhcp or adding iface eth0 inet dhcp to /etc/network/interfaces file). I reboot and execute “ip a” and the interface has no ip address. If I execute “sudo dhclient eth0” I immediately get an ip address. I’m assuming that since that command works (like it did in T4220), the same problem has been re-introduced.
I searched the changelog and didn’t see any additional updates for DHCP client issues. I’ll grab a newer version of the rolling releases to see if the issue still exists or has been reverted by someone else.
Please advise if this is what you are seeing as well.
I pulled down vyos-1.4-rolling-202212160319-amd64.iso, installed it and configured DHCP on eth0, and the same thing is occurring. Looks like the issue is continuing in the latest rolling releases.
Just adding set interfaces ethernet eth0 address dhcp and then rebooting, I’m not able to reproduce error:
[ OK ] Reached target VyOS target.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Finished Update UTMP about System Runlevel Changes.
[ 18.605934] vyos-router[741]: Mounting VyOS Config...done.
[ 21.827822] vyos-router[741]: Starting VyOS router: migrate configure.
[ 22.170412] vyos-config[750]: Configuration success
Welcome to VyOS - vyos ttyS0
vyos login: vyos
Password:
Welcome to VyOS!
Check out project news at https://blog.vyos.io
and feel free to report bugs at https://phabricator.vyos.net
You can change this banner using "set system login banner post-login" command.
VyOS is a free software distribution that includes multiple components,
you can check individual component licenses under /usr/share/doc/*/copyright
vyos@vyos:~$ show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
--------- ---------- --- -----------
eth0 192.168.0.100/24 u/u
eth1 - u/u
eth2 - u/u
eth3 - u/u
lo 127.0.0.1/8 u/u
::1/128
vyos@vyos:~$ sudo journalctl -b | grep dhclient
Dec 22 10:40:11 vyos systemd[1]: Created slice system-dhclient.slice.
Dec 22 10:40:12 vyos dhclient-script-vyos[1289]: Current dhclient PID: 1276, Parent PID: 1268, IP version: 4, All dhclients for interface eth0: 1268 1276
Dec 22 10:40:12 vyos dhclient-script-vyos[1289]: Passing command to /usr/sbin/ip: "link set dev eth0 up"
Dec 22 10:40:12 vyos dhclient-script-vyos[1289]: No changes to apply via vyos-hostsd-client
Dec 22 10:40:12 vyos dhclient[1276]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Dec 22 10:40:12 vyos dhclient[1276]: DHCPOFFER of 192.168.0.100 from 172.16.20.1
Dec 22 10:40:12 vyos dhclient[1276]: DHCPREQUEST for 192.168.0.100 on eth0 to 255.255.255.255 port 67
Dec 22 10:40:12 vyos dhclient[1276]: DHCPACK of 192.168.0.100 from 172.16.20.1
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Current dhclient PID: 1276, Parent PID: 1, IP version: 4, All dhclients for interface eth0: 1276
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Passing command to /usr/sbin/ip: "-4 addr add 192.168.0.100/255.255.255.0 broadcast 192.168.0.255 valid_lft 86400 preferred_lft 86400 dev eth0 label eth0"
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: FRR status: running
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Checking if the route presented in kernel: default via 192.168.0.1 dev eth0 metric 210
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Converted vtysh command: "ip route 0.0.0.0/0 192.168.0.1 eth0 tag 210 210 "
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Sending command to vtysh
Dec 22 10:40:13 vyos dhclient-script-vyos[1383]: Deleting nameservers with tag "dhcp-eth0" via vyos-hostsd-client
Dec 22 10:40:13 vyos dhclient-script-vyos[1383]: Adding nameservers "192.168.0.1 8.8.8.8" with tag "dhcp-eth0" via vyos-hostsd-client
Dec 22 10:40:13 vyos dhclient-script-vyos[1383]: Applying changes via vyos-hostsd-client
Dec 22 10:40:13 vyos dhclient-script-vyos[1383]: No changes to apply via vyos-hostsd-client
Dec 22 10:40:13 vyos dhclient[1276]: bound to 192.168.0.100 -- renewal in 41014 seconds.
vyos@vyos:~$ show ver | grep Ver
Version: VyOS 1.4-rolling-202212200319
vyos@vyos:~$
I ran the installation again and got the same result. I used SnagIt to create a narrated video clip of the installation process so you could see what I did and what the results were, but I don’t see a way to upload a file. Just an FYI - I followed the same process when I created a VM for VyOS-1.1.8 and it worked without issue so not sure what is happening with VyOS-1.4. Perhaps it is something that I’m doing wrong, or something that Virtual Machine Manager is having trouble with.
Exact steps I followed:
Working on Ubuntu 20.04 64-bit VM in VMware Workstation.
Downloaded vyos-1.4-rolling-202212160319-amd64.iso
Opened Virtual Machine Manager (VMM) - UI to handle QEMU calls
Selected Created a new virtual machine
Chose use ISO image
Selected the ISO image
Selected 4096 GB memory
Selected 30GB Hard Disk
Set Hard Disk and Video to Virtio
Started Installation
Logged in once bootup completed
Ran “Install Image” to get image copied to hard disk
Accepted all defaults, then rebooted when complete and prompted to do so
Logged in once reboot completed
Ran configure and setup eth0: set interface ethernet eth0 address dhcp;commit;save;exit
Reboot
Logged back in
Executed ip a - no ip address
I’ve uploaded a screenshot of the journalctl command.
Check cat /config/config.boot section interfaces there should be “address dhcp” after saving
also you don’t need touch any other file like /etc/network/interfaces
I also grabbed a shot of an error that is occurring when I reboot the VM. Not sure if it has anything to do with the issue at hand but an error is never good:
Are you sure you don’t have any other scripts to call dhcp-client?
It strange
Could you send “show version”?
Do you have access to the DHCP-server site? Check dumps/logs on the DHCP server site after/during reboot
Logs show that old dhclient was killed and it tries request DHCP address 8 times, for some reason the server doesn’t get IP address from DHCP-server, and service state is “failed”
Encountered exactly the same issue on VyOS 1.4-rolling-202301280924
sudo dhclient ethX solves the issue. No effect neither at a boot time nor at the commit.
Here are a boot time logs regarding DHCP client part:
– Journal begins at Sat 2023-01-28 14:10:46 UTC. –
Apr 22 20:40:19 dhclient-script-vyos[1766]: Current dhclient PID: 1, Parent PID: 0, IP vers
ion: , All dhclients for interface eth0: 1765
Apr 22 20:40:19 dhclient-script-vyos[1766]: Stopping dhclient with PID: 1765, PID file: /va
r/lib/dhcp/dhclient_eth0.pid, Leases file: /var/lib/dhcp/dhclient_eth0.leases
Apr 22 20:40:20 dhclient-script-vyos[1766]: PID file /var/lib/dhcp/dhclient_eth0.pid does n
ot exists, killing dhclient with SIGTERM signal
Apr 22 20:40:20 systemd[1]: [email protected]: Control process exited, code=killed, sta
tus=15/TERM
Apr 22 20:40:20 systemd[1]: [email protected]: Failed with result ‘signal’.
Apr 22 20:40:20 systemd[1]: [email protected]: Scheduled restart job, restart counter i
s at 5.
Apr 22 20:40:20 systemd[1]: Stopped DHCP client on eth0.
Apr 22 20:40:20 systemd[1]: [email protected]: Start request repeated too quickly.
Apr 22 20:40:20 systemd[1]: [email protected]: Failed with result ‘signal’.
Apr 22 20:40:20 systemd[1]: Failed to start DHCP client on eth0.
Some errors will be produced after upgrading with vyos iso format. At the same time it is hard to reproduce.
Maybe you can recreate a fresh vyos virtual machine then configure the vyos to replace a old. For me I configure the vyos with ansible. And it is ease to reconfigure a new one.
I installed latest version of VyOS 1.4 from iso image and looks like the bug is still persists. Steps to reproduce:
set interface ethernet ethX address dhcp. reboot.
after reboot you should have acquired address by DHCP.
set interface ethernet ethX disable
commit
del interface ethernet ethX disable commit.
no ip address here.
sudo dhclient ethX after that - gets an address from dhcp.
Hello @Jackwmtr
I have tried to reproduce your issue but I could not.
VyOS 1.4-rolling-202308060317
set interface ethernet eth0 address dhcp
commit
save
reboot
vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
--------- ---------- --- -----------
eth0 192.168.139.218/24 u/u
eth1 - u/D
eth2 - u/D
eth3 - u/D
lo 127.0.0.1/8 u/u
set interfaces ethernet eth0 disable
commit
vyos@vyos# run show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
--------- ---------- --- -----------
eth0 - A/D
eth1 - u/D
eth2 - u/D
eth3 - u/D
lo 127.0.0.1/8 u/u
::1/128
vyos@vyos# delete interfaces ethernet eth0 disable
[edit]
vyos@vyos# commit
vyos@vyos# run show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
--------- ---------- --- -----------
eth0 192.168.139.218/24 u/u
eth1 - u/D
eth2 - u/D
eth3 - u/D
lo 127.0.0.1/8 u/u
::1/128
I recreated VM from scratch again and I couldn’t see the problem now either. Looks like it occurs when you update vyos version inside the VM via “set system image …” with the new image.