Ubuntu – Problem with setting static ip on Ubuntu Server 14.04

14.04networking

I have a problem setting static ip on my Ubuntu Server 14.04 LTS.

I run the command sudo nano /etc/network/interfaces and than change dhcp to static
and then I type address,netmask,network,gateway,dns-nameservers and then I try to do simply ping command but its not working for let say (ping yahoo.com) i get error (ping: unknown host yahoo.com) and sometimes destination unreachable.

I also tried to connect throught putty but thats only local ip.What i need actually is a real IP(like this 109.92.21.200) so i can connect throught putty which i have on my laptop and connect to server which is desktop on port 22 which is open but i constantly getting error like Connection timed out or Connection refused.
Can somebody tell me solution of problem and show me that.

Thanks in advance.

Best Answer

When I needed to set a static IP address for my ubuntu pc, I did it from the router rather than trying to set it from the pc.

The router then sets the IP address given in the router table for the device on each power up.

Related Question