I’m working on a beaglebone black with a debian system and i want change my ip by modifying “/etc/network/interfaces”, this is working but when I switch from DHCP method to static method my address, (atribuate by DHCP), is not “killed” so I end up with two IP addresses.
2
Answers
I found a way, i just use
ip addr flush eth0
after modified "/etc/network/interfaces" and beforeifdown eth0
ifup eth0
.You need to stop and disable the DHCP client daemon.
How exactly this is done depends on which version of Debian you’re using.
On older versions, which I suspect you’re on, there is a
dhcpcd
service. Stop it withsystemctl stop dhcpcd
and disable it withsystemctl disable dhcpcd
.Newer versions or alternate configurations with NetworkManager or systemd-networkd will need those services reconfigured.