I have a Fedora 34 server which recently got dns issues (cannot resolve anything anymore).
I try to debug by temporarily switching the server from a static ipv4 address to using dhcp.
Everything needs to be done headless, because the server does not have any graphical user interface.
So far I tried
nmcli connection edit enp3s0
set ipv4.method auto
nmcli device disconnect enp3s0; wait; nmcli device connect enp3s0
But nothing changed. The ip address stays the same. What I expect is that my connection drops (not a problem, inside a screen session, so all commands are executed nonetheless) and a new ip address is acquired which needs to be different from my static one, because that one is outside of the range of the dhcp server.
I already checked that NetworkManager.service is running and systemd-networkd.service is not. Any suggestions?