Part 1 - PPPoE connection not working
I would try disabling the Network Manager and configuring the network manually like explained in Ubuntu help ADSLPPPoE. Use the Config with pppoeconf
part first which is basically running sudo pppoeconf
and answering the questions. As you need to use a different DNS server than the one of your ISP, answer no
to the question about using the peer DNS server.
Optional if your internet connection is not restarted at boot:
You can edit nano /etc/rc.local
, add the following lines before the exit
line and reboot to test it.
killall pppd
ifconfig eth0 up
pon dsl-provider
Network manager won't be used when you use the manual config but you can disable it clicking on it and de-selecting the option enable network
(and enable wireless
if present). If disabling only doesnt work, you can also uninstall it with sudo apt-get remove network-manager
and after sudo apt-get autoremove
to clean the auto-installed packages.
Part 2 Changing default ISP DNS server to openDNS
I found here that the best way to use a static DNS with resolvconf
is to add the nameserver in /etc/network/interfaces
or to add it in /etc/resolvconf/resolv.conf.d/head
. As your interfaces are automatically configured (dhcp) you have to use the head
file:
sudo nano /etc/resolvconf/resolv.conf.d/head
and add at the end:
nameserver 208.67.222.222
nameserver 208.67.220.220
Limitations
- You cannot use Network-Manager to connect. However, this automatically gets you connected to the internet. Otherwise, you can connect by running
pon dsl-provider
. To disconnect, you need to be sudo, so running sudo poff
disconnects.
- [This issue is only with Ubuntu 12.04.] While Booting Ubuntu (with Modem turned off or while it is still trying to establish a link with the ISP) - Ubuntu waits for loading
Network-Configuration
for about 2 mins and thereafter boots without Network-Configuration. To get online you have to run pon dsl-provider
.
Fixes to remove the previous tests made (not needed in other cases):
As we deleted the resolv.conf
symlink before, we need to recreate it (not needed on new install):
cd /etc
sudo rm resolv.conf
sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf
If this works, you can revert the changes in /etc/dhcp/dhclient.conf
we made before.
From the above output, it looks like Ubuntu is trying to use a local DNS server. Correct? Is it caching a failed lookup on my local machine?
Yes, Ubuntu is using whatever was provided with dhcp lease, more specifically dnsmasq
, a plug-in, that takes care of that for network-manager
.
Is Ubuntu using this second DNS server sometimes? Why? Is it load balancing? Is the local one slower?
If the first dns fails to resolve, then dnsmasq
should redirect the query to the secondary dns. At least that's the idea.
In case you'd like to use your own dns-server
Personally, I always use supersede domain-name-server xxx.xx.xxx.xxx
in /etc/dhcp/dhclient.conf
to tell my Ubuntu system to replace whatever dns it receives via dhcp lease with my own server. Here's the excerpt from that file:
30)serg@ubuntu[/home/xieerqi]
>_ cat /etc/dhcp/dhclient.conf
# Configuration file for /sbin/dhclient, which is included in Debian's
# dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
# few changes must be made to this file, if any.
#
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
#send host-name "andare.fugue.com";
send host-name = gethostname();
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
supersede domain-name-servers 208.67.220.220;
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers,
dhcp6.fqdn, dhcp6.sntp-servers;
After setting that up and reconnecting or restarting network-manager
, here's what I have:
31)serg@ubuntu[/home/xieerqi]
>_ nmcli dev list | grep -i dns
IP4.DNS[1]: 208.67.220.220
Nslookup will report Server: 127.0.1.1
and Address: 127.0.1.1#53
since it is Network-Manager's dsnmasq
that listens on that address, and it uses whatever was provided by dhcp ( in this case , the substituted dns)
Best Answer
Well, could really be a problem with your ISP DNSs and maybe they intercept DNS traffic and route it throurgh their servers...
Try a
dig @8.8.8.8 www.ubuntu.com
and see what happens.Output should be like: