0

I have an internet connection through Ethernet LAN cable (connected on interface eth7). My Ubuntu OS shows that internet is connected. However, when I search on the browser, page shows that I am not connected to the internet. I have another Ethernet cable connected to interface eth0. The issue resolves somehow ether by adding:

nameserver 8.8.8.8

nameserver 8.8.4.4

in /etc/resolv.conf file, or removing the cable from eth0 port.

Following results of ifconfig and route are found when both cables are plugged in. the result of ifconfig:

eth0      Link encap:Ethernet  HWaddr 34:17:eb:da:dd:78  
          inet addr:10.0.1.2  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::3617:ebff:feda:dd78/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10604 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33768 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:869236 (869.2 KB)  TX bytes:6328432 (6.3 MB)
          Interrupt:20 Memory:f7c00000-f7c20000 

eth7      Link encap:Ethernet  HWaddr ec:08:6b:0b:8b:13  
          inet addr:10.102.72.17  Bcast:10.102.73.255  Mask:255.255.254.0
          inet6 addr: fe80::ee08:6bff:fe0b:8b13/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:39264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28573 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:21008366 (21.0 MB)  TX bytes:5212340 (5.2 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2725463 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2725463 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:211327988 (211.3 MB)  TX bytes:211327988 (211.3 MB)

Result of running route -n:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.102.72.1     0.0.0.0         UG    0      0        0 eth7
10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 eth0
10.102.72.0     0.0.0.0         255.255.254.0   U     1      0        0 eth7
1
  • Why does your question title say "127.0.1.1"? – Scott Dec 25 '18 at 5:01
0

I had a similar issue and ran into a similar solution here that theJack made.

Putting the following GoogleDNS servers in /etc/dhcp/dhclient.conf (unlike the answer given in the link, you must add the '/dhcp' in Ubuntu) should do the trick:

supersede domain-name-servers 8.8.8.8, 8.8.4.4;

8
  • Your answer is different from the one you linked to.   Are you saying that the two year old answer is wrong? – Scott Dec 25 '18 at 4:12
  • I'm not sure what you mean, Scott. The link should be the Topic "How to change my DNS server provider permanently?". My answer was copied from the topmost answer from that link. – Daniel Connelly Dec 25 '18 at 4:24
  • You changed the filename.  The other answer says /etc/dhclient.conf; yours says /etc/dhcp/dhclient.conf. – Scott Dec 25 '18 at 4:27
  • The other question is referring to Fedora. This question is referring to Ubuntu. The path names are different, the solution is the same. – Daniel Connelly Dec 25 '18 at 4:28
  • 1
    Our goal at Super User is not just to give timely answers to question-askers; it is also to build a searchable database of questions and answers that can be useful to future readers.  Many people come to Super User by way of a Google search.  Your answer would be more robust and durable if you added information like what you put in your comment. I.e., don’t add useful information in comments; edit your answer to make it clearer and more complete. – Scott Dec 25 '18 at 4:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.