My Ubuntu used to connect to internet directly with pppoe dial-up, after once sudo pppoeconf internet connected automatically at log-in. Now I have just bought an iPad and so Ubuntu was connected to a router with DHCP enabled. Now the problem is Ubuntu won’t get IP from DHCP sever automatically.

Here is the solution, and it maybe help for some new to Ubuntu Linux to access to internet from a router.

1.) To manually get an IP from router, run the command:

dhclient eth0

here if eth0 is on used, change it to eth1, eth2, and etc.

2.) manual way won’t solve the problem completely, it need to repeat every log-in. So the best way is to configure /etc/network/interfaces.

Run the command:

gksudo gedit /etc/network/interfaces

remove the section about pppoe and make it looks like:

auto lo
iface lo inet loopback
hwaddress ether 00:19:e4:c1:fb:07

auto eth0
iface eth0 inet dhcp

Now Ubuntu should get an IP automatically at login and access to internet if the router is properly configured.