Configuring Ubuntu Server IP have never been any easier. Just edit the /etc/network/interfaces file using any text editor on the server. By default, you should have nano and vi in your Ubuntu Server.
The simplest and straight forward text editor is nano. So, use this command:
$ sudo nano /etc/network/interfaces
you should see the default file content like this:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interfaceauto loiface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
This is the default network settings on your Ubuntu Server where it use DHCP. So, to set it as static IP. Let say, we wanna setting like this:
=> Host IP address: 10.1.1.100
=> Netmask: 255.255.255.0
=> Network ID: 10.1.1.0
=> Broadcast IP: 10.1.1.255
=> Gateway/Router IP: 10.1.1.254
=> DNS Server: 10.1.1.254
You should change the file like this:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5)
# The loopback network interfaceauto loiface lo inet loopback
# The primary network interfaceauto eth0
# iface eth0 inet dhcp
iface eth0 inet static
address 10.1.1.100
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
gateway 10.1.1.254
To set the DNS server, edit the /etc/resolv.conf file using this command:
$ sudo nano /etc/resolv.conf
add the line for nameserver like this:
search myisp.com
nameserver 10.1.1.254
nameserver 208.67.222.222
nameserver 208.67.220.220
How to Set Ubuntu Server IP
Related Posts:
Installing Microsoft Fonts in UbuntuYou may want to install Microsoft Truetype fonts in Ubuntu for any reason. It's very simple. All you need to do in your Ubuntu Gutsy Gibbon 7.10 is to… Read More
Convert flv (flash video) to dvd iso in Ubuntuflv2dvd is a script that convert an flv into a dvd iso image. simple stick the (single flv file) into an empty directory, cd into it and type in (flv2… Read More
How to enable DVD Playback in your ubuntu SystemDVD playback is not a feature that is installed by default due to license restrictions. This will show you how to install DVD playback capability on y… Read More
How to Install GCC (c/c++) Compiler in Ubuntu LinuxInstall package called build-essential is the best way build-essential contains a list of packages which are essential for building Ubuntu packages… Read More
How to enable Moodbar in Amarok Music PlayerAmarok is a sound system-independent audio-player for *nix systems. Its interface uses a powerful “browser” metaphor that allows you to create playlis… Read More
0 comments:
Post a Comment