Menu Close

Ubuntu and static IP

By Andrea Corso

If you want set a static ip on your Ubuntu servers you can do:


# nano /etc/network/interfaces

set your eth0 interface as same:


auto eth0
iface eth0 inet static
 address 192.168.0.100
 netmask 255.255.255.0
 network 192.168.0.0
 broadcast 192.168.0.255
 gateway 192.168.0.1

Save and exit. Now launch:


# /etc/init.d/networking restart
# nano /etc/resolv.conf

and put this: nameserver 192.168.0.1. NOTE: the address after nameserver will be the same of gateway!

Posted in Linux, News

Leave a Reply

Your email address will not be published. Required fields are marked *