Celeb Glow
general | March 28, 2026

How can I change the network configuration on Ubuntu 14.04 server?

I just installed an Ubuntu 14.04 server, and I've discovered that there is no way to make any changes to the network configuration except by rebooting the server. This is on a stock install of Ubuntu 14.04 server, installed last week, with no changes made to it, and no new packages installed (since I can't reach apt-get).

ifconfig up/down seems to read from some kind of cache; at least, it ignores any changes I make to /etc/network/interfaces. I tried using it to change from DCHP to static for eth1, and nothing happened; eth1 continued to get its address from DHCP.

/etc/init.d/networking stop/restart/force-reload all fail with no error message.

How is this supposed to work on Ubuntu Server? Right now, it seems like network changes only take effect with a reboot.

(and please don't give me answers which involve network-manager; this is a headless server with no GUI. Thanks).

ADDING INFORMATION REQUESTED BELOW:

/etc/network/interfaces originally was:

# The primary network interface
auto eth1
iface eth1 inet dhcp

... this wasn't picking up gateway information from DHCP, even though my Ubuntu laptop picks it up just fine.

So I changed it to:

# The primary network interface
auto eth1
iface eth1 inet static
address 172.47.23.106
netmask 255.255.255.0
gateway 172.47.23.1

However, after doing ifconfig down/up, the IP address of eth1 did not change and the gateway did not get added to the route table. On a full restart of the system, the eth1 configuration was picked up just fine.

So it seems that ifconfig up ignores changes to /etc/network/interfaces.

5

2 Answers

The correct way to get the system to re-read and use the changed /etc/network/interfaces file is:

sudo ifdown eth1 && sudo ifup -v eth1

The '-v' for verbose should produce output to judge if the changes were made successfully. Check:

ifconfig
ping -c3 
1

Based on follow-ups elsewhere, I found that it is indeed the case that Ubuntu will completely ignore changes in /etc/network/interfaces for a device which was previously defined and then changed. In order to get it to take a new configuration, you need to run the following:

ifdown {device}
ip addr flush dev {device}
ifup {device}

This is run between ifdown and ifup. Ideally, Ubuntu should add the flush to ifup.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy