Configuring network in Linux using command prompt

1. Specifying DNS details.

sudo vi /etc/resolv.conf

#START

search xxx.xxx.xxx.xxx

nameserver xxx.xxx.xxx.xxx

#END

2. Specify system IP address

sudo vi /etc/network/interfaces

#START

auto lo

iface lo inet loopback

#IP info

auto eth0

iface eth0 inet static

address xxx.xxx.xxx.xxx

netmask xxx.xxx.xxx.xxx

network xxx.xxx.xxx.xxx

broadcast xxx.xxx.xxx.xxx

gateway xxx.xxx.xxx.xxx

#END

3. restart the network interface eth0

sudo /etc/init.d/networking restart

4. Now test the network

ping http://www.yahoo.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: