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:
Get Atheros AR5007EG or AR242x wireless cards (may be other models) working in Ubuntu 8.10 (Intrepid Ibex)This tutorial will explain how to Atheros AR5007EG or AR242x wireless cards working in Ubuntu 8.10 (Intrepid Ibex).First you need to compile latest at… Read More
connect iPhone/iPod Touch (Using USB) in Karmic/Jaunty/Intrepid/HardyIf you want iphone/ipod touch in ubuntu easy way is using iFuse program. iFuse allows you to mount an iPhone or iPod Touch under Linux using the USB … Read More
Howto install Softwares on Ubuntu without Internet ConnectionWhen installing ubuntu, it's a must that you have an internet connection when installing softwares since the software packages are downloaded from ubu… Read More
setup Second IP address or Virtual IP address to your Networkcard in ubuntuIf you are a Network Administrator some time you need to assign more than ONE ip address (second ipaddress) to your network card of Ubuntu machine. Fo… Read More
How to Install Firefox3.0a1 in UbuntuFirefox 3.0 is the next generation release of the award-winning Firefox web browser from Mozilla.This article describes how to install fiefox3.0a1 in … Read More
0 comments:
Post a Comment