static ip

Written by employee #33. Posted in Lost and found

ubuntu static ip

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.19
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1 208.67.222.222 208.67.220.220

If you have more than one DNS server, just add a space between each:

dns-nameservers X.X.X.X Y.Y.Y.Y Z.Z.Z.Z

Edit /etc/hosts

$sudo nano /etc/hosts
Add:
192.168.1.50 u1404server.mynetwork.local u1404server

ifconfig eth0 down
ifconfig eth0 up

(or whatever your network interface is called) to restart the network.

Add comment


Security code
Refresh