I've a Debian server running with some static IPs and a public IP, all provided by the same ISP on a FTTO connection.
Now I've noticed if I unplug the cable between the server and the ISP ONT/ONU and reconnect it my machine still has the same public dynamic IPv4. To get a new dynamic IP I need to a) reboot the machine or b) run dhclient -r eth0
and dhclient eth0
.
My question: is it possible to reboot the machine and keep the same IP? In the same fashion as the unplug / replug network cable? How can I tell the system to reuse the last IP/Gateway it got instated going out and issue a DHCP request? And if the network doesn't work then as for a new IP?
Thank you.