2

I've configured a Static IP in Ubuntu Server, but when I do an ifconfig -a I don't see the new IP.

I must reload the new IP?

My configuration:

sudo nano /etc/network/interfaces:

auto eth0
iface eth0 inet static
address 192.168.1.21
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4

sudo nano /etc/resolv.conf:

nameserver 8.8.8.8
nameserver 8.8.4.4

And finally

sudo /etc/init.d/networking restart

But I don`t see the new IP, I see 192.168.1.16

ifconfig -a

Response ifconfig -a

8
  • 1
    Possible duplicate of restart network interface after editing /etc/network/interface
    – chili555
    Oct 13, 2016 at 16:24
  • What do you see in ifconfig -a post the output
    – meccooll
    Oct 13, 2016 at 20:14
  • @chili555 I think that is different.
    – Diego
    Oct 14, 2016 at 6:30
  • @meccooll Img with the response in the first post.
    – Diego
    Oct 14, 2016 at 6:30
  • How is it different? Do you get the request IP address if you do: sudo ifdown eth0 && sudo ifup eth0? Check: ifconfig
    – chili555
    Oct 14, 2016 at 13:47

1 Answer 1

1

Solution

  1. Restarting all server.
  2. Clean and writing the eth0 static configuration.
  3. Executing the command /etc/init.d/networking restart.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.