Internet connection configuring in Ubuntu

Couple of days ago I was trying to set all the network information in system to “Network Connections”(System>Preferences> Network Connection).I put all the necessary information in the fields as those are necessary to set the wired broad band connection.Unfortunately the connection could been established.So I tried to find out the configuration file which one writes down the network information to establish a connection.And found “/etc/network/interfaces “.So,I wrote the following commands to the terminal:

sudo gedit /etc/network/interfaces

The file was containing: “auto lo”

” iface lo inet loopback “.

As I guessed the network information were not wriitten to the file so I wrote follwoing informations:

auto eth0
iface eth0 inet static
address 192.168.100.118(put you internet address provided by the ISP)
gateway 192.168.100.1(gateway address)
netmask 255.255.255.0
network 192.168.100.0

Then I saved the file.And restarted the network using following command:

sudo /etc/init.d/networking retstart

For DHCP connection just have to put the following line into the /etc/network/interface  file


auto eth0

iface eth0 inet dhcp

The have to restart network.The connection will be established 🙂

Advertisements