Nov 22, 2019 by Thibault Debatty | 1947 views
https://cylab.be/blog/46/modify-your-static-ip-on-ubuntu-server
This seems easy, but... When you modify your static IP address in /etc/network/interfaces, the old IP is not removed. The new IP is simply added to your interface.
You can check this using the command
ip address
To remove the old IP address you can either:
sudo ip addr del 172.20.104.128/16 dev enp0s8
sudo service networking restart
sudo ip addr flush dev enp0s8
sudo service networking restart
This blog post is licensed under CC BY-SA 4.0