Static internet setting in ubuntu

In ubuntu,even if you enter IPs in Network manager correctly,it is not able to connect internet.At that time you need to enter details manually in network files.

1) type sudo gedit /etc/resolv.conf

See if you DNS server is there,If it is not  there than type:
nameserver <YOUR DNS IP>

save & close file.

2)Now type:
sudo gedit /etc/network/interfaces

in this file first type:
iface eth0 inet static

after that type:

address <your ip>
netmask <subnet mask>
gateway <gateway ip>

save & close file.

3)Restart network service by following command:

sudo /etc/init.d/networking restart

and Now it should be working!

Advertisements
Tagged ,

2 thoughts on “Static internet setting in ubuntu

  1. Avinash says:

    itna mehnat kyun karta hai. open up a terminal and run

    ifconfig eth0 up netmask

    and set DNS as u were!

  2. rikilshah says:

    Oh….Thanks for that! 🙂

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: