3

My problem:

I am connected to Ethernet "wired connection 1", I can see that in the network manager (the up and down arrows).

But when I open up Firefox or anything else that requires Internet connection, I get told the same thing: no Internet connection.

Information so far:

ifconfig:

$ ifconfig
enp3s0    Link encap:Ethernet  HWaddr 94:de:80:c7:fd:2b  
          inet6 addr: fe80::f527:1269:a6f5:57e5/64 Scope:Link
          inet6 addr: 2001:878:3ac:163:8a7:7349:6e60:d84/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:47 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:848 (848.0 B)  TX bytes:288 (288.0 B)

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:2292 errors:0 dropped:0 overruns:0 frame:0 TX packets:2292 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:171576 (171.5 KB) TX bytes:171576 (171.5 KB)

When I do ping google.com I get:

$ ping google.com
ping: unknown host google.com

When I look at /etc/network/interfaces I get:

$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth
iface eth0 inet dhcp

I should note that no other devices have trouble connecting to the router, nor does Windows 7 when I dual boot to that.

I'm using Ubuntu version 16.04.

If you need more information, please do tell me.

edit 1

i pinged a website on the working computer and got an address, but nothing on the nonworking computer's firefox.

when i tried

$ /etc/resolv.conf

i got

command not recognized

I found a workaround in another post that might have the right information though.

 kasper@kasper-To-be-filled-by-O-E-M:~$ cat /etc/resolv.conf
 # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
 #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

Edit 2

When I do

sudo lshw -C network

I get:

  *-network               
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 06
       serial: 94:de:80:c7:fd:2b
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd
autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4
 03/27/12 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:32 ioport:d000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff

and when i do

sudo apt install r8168-dkms

as suggested in another post i get:

Reading package lists... Done Building dependency tree        Reading
state information... Done E: Unable to locate package r8168-dkms

still no better after reboot.

Kasper
  • 31

3 Answers3

2

Looks like your dhcp server is not giving you a DNS server to look up names. Ip names are not real addresses, they are human names that all have ip numbers that are the real addresses.

Ip numbers Work in firefox, not names. I mean, go to pc that works, find a server, get its IP number, then try that number address in firefox. If you get terminal on worhing system, run, for example 'ping www.ku.edu', it will give ip number. Put numeric address into firefox url. If that works, but name does not, for sure dns is your trouble.

See if /etc/resolv.conf has a valid IP in it. That file is rewritten automatically by dhcp if it works. If you see number there, try 'ping nnn.nnn.nn.nnn.

Also, I turn off IPV6 because nobody has it where I go. If you disable it and allow IPV4, you more likely have everything working. Now I am on Wireless, but tomorrow can look at wired when at office.

pauljohn32
  • 3,743
0

https://unix.stackexchange.com/questions/518266/ping-displays-name-or-service-not-known I had just upgraded to 18.04.6 from 16 something and had Ethernet connection with no internet access, this fixed it and I have VERY little programming experience.

0

check your ethernet driver by sudo lshw -C network, if it is r8169, this may help

  • followed the link and did as it suggested, i made "edit 2" about what the information that i gained from this. – Kasper Jul 29 '16 at 07:36
  • of course it no better, your ubuntu cant find the package on repo. really weird, but you can go to here and download it, then install with sudo dpkg -i r8168-dkms_8.041.00-1_all.deb

    and maybe you should go to here to fix unable to local package issue

    – arshavindn Jul 29 '16 at 15:10
  • i downloaded the file, but i think i am doing something wrong, it says file or directory not found.

    do i need to put it somewhere where it can easier find it or am i missing an instruction?

    – Kasper Jul 29 '16 at 21:31
  • you seem new to linux, dont you? change the directory to where your downloaded file was stored by cd /directory/stored/downloaded/file then run the dpkg command. – arshavindn Jul 30 '16 at 10:51