0

I have installed ubuntu server 14.04 behind router and when i use the server in DHCP mode work fine he now namesaver, but if i make in static IP with /etc/network/interfaces, and i reboot, i have internet second or two and then i do not have net and when i go to interfaces the static rules are ok but in namesaver DNS mode /etc/resolv.conf i do not have nothing i put namsaver like router ip xxx.xxx.xxx.1 and nameserver 8.8.8.8 again nothing do not remember or some conflict erase the settings .

PLEASE HELP

  • 1
    May we see your static address /etc/network/interfaces file? – chili555 Dec 10 '14 at 23:49
  • auto eth0 iface eth0 inet static address 192.168.100.42 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.100.255 gateway 192.168.100.1 – mobinstal Dec 10 '14 at 23:53
  • # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN – mobinstal Dec 10 '14 at 23:54
  • no nameserver if i put manually it will be erased, in auto eth0 iface eth0 inet dhcp , work normally – mobinstal Dec 10 '14 at 23:55
1

I suggest you amend your /etc/network/interfaces file to:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.100.42
netmask 255.255.255.0
gateway 192.168.100.1
dns-nameservers 8.8.8.8 192.168.100.1

Restart the interface:

sudo ifdown eth0 && sudo ifup -v eth0

Check:

ping -c3 www.ubuntu.com

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.