Monday, May 20, 2013

STATIC IP CONFIGURATION IN UBUNTU / LINUX


# cat /etc/network/interfaces
-----------------------interface file--------------------------------
# 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.X.X.X
netmask 255.Y.Y.Y
broadcast 192.X.X.X
gateway 192.X.X.X
dns-nameservers 192.X.X.X

-----------------------interface file ends-----------------------------

# ifconfig eth0 down
# ifdown eth0
# service networking restart

# ifconfig eth0

route info
# route -n

dns-servers placeholder under /etc/network/interfaces updates <resolve.conf> info too.

# cat /etc/resolv.conf
nameserver 192.X.X.X




No comments:

Post a Comment