Set the IP of an Ubuntu Server to static

Some quick notes on setting up an Ubuntu server
Post Reply
User avatar
basit
Site Admin
Posts: 200
Joined: May 17th, 2005, 8:10 pm
Location: Johannesburg South Africa
Contact:

Set the IP of an Ubuntu Server to static

Post by basit »

Type this at the terminal:-

sudo nano /etc/network/interfaces

Then insert or change accordingly :-

# 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 p1p1
iface p1p1 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-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
dns-search user
Post Reply

Return to “Setting up an Ubuntu Server”