Friday, September 20, 2013

Setup static ip on Ubuntu Server

Edit /etc/network/interfaces

Change  iface eth0 inet dhcp to
iface eth0 inet static
address 192.168.1.200
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1 
dns-nameservers 8.8.8.8 8.8.4.4


Since most other systems on your network will use dhcp, pick an address that doesn't cause conflict. Most routers will assign small numbers 1st (192.168.1.[1,2,3..]) so pick a big one. Obviously, the rest of the settings need to be change to match your network.

No comments:

Post a Comment