top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Change IP address of ethernet device while Ubuntu system is running

0 votes
395 views

On a computer running Ubuntu 16.04, I am trying to change the static IP address of an ethernet device, while the system is running. Therefore, I edit the file /etc/network/interfaces.d/${IFNAME} and then execute the command 'service networking restart'. But with that, the ethernet device is not switched to the new IP address, but it keeps the old address and gets the "new" address as secondary IP address. In former versions of Ubuntu, with the same steps as above, the old IP address was replaced by the new one.

What do I have to do now to switch the IP address without a reboot?

posted Dec 8, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

I believe, but am not sure, that you either have to do it via NetworkManager, or remove NetworkManager and either do everything
manually (addressing + subnet masking, gateways, routing, hostnames, &c) or switch to a different tool such as WICD.

answer Dec 8, 2016 by Amit Parthsarthi
0 votes

you should never ever do this since this tears out the whole networking stack from the system ... rather run "ifdown $interfacename" and "ifup $interfacename"

if you actually restart the networking stack, loopback devices will be killed/restarted too (along with any daemons providing protocols though localhost etc) ... this can for example cause dbus to restart ... which is a very bad thing on a desktop where apps communicate through dbus.

answer Dec 8, 2016 by Satish Mishra
Similar Questions
0 votes

I'm facing some trouble setting up a 13.04 server (amd64) which I want to use Ethernet bonding and NFS mounted volumes.

I've read the ubuntu tutorial about Ethernet bonding but seems the machine try to mount NFS volumes BEFORE the network comes up , the result is the volumes are not mounted at boot up.

Please help.

+1 vote

I want a JAVA program. That gets the website name from the user and prints the IP Address of that website.

+3 votes

Any opensource code would be a great help :)

+1 vote
...