5

enter image description here

enter image description here This is info of my hardware :

lshw:

ubuntu@ubuntu:~$ sudo lshw -C network
  *-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: 09
       serial: 04:d9:f5:31:bf:d6
       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-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.8.0-43-generic firmware=rtl8168f-1_0.0.5 06/18/12 latency=0 link=no multicast=yes port=MII
       resources: irq:17 ioport:e000(size=256) memory:f0004000-f0004fff memory:f0000000-f0003fff
  *-network
       description: Ethernet interface
       physical id: 2
       bus info: usb@2:1.6
       logical name: usb0
       serial: 4a:95:ce:43:80:51
       capabilities: ethernet physical
       configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.42.193 link=yes multicast=yes

The problem come when RTL8111/8167/8411 showing on my system

nmcli:

ubuntu@ubuntu:~$ sudo nmcli
usb0: connected to Wired connection 2
        "Qualcomm SDM636-QRD SN:3166A9F8"
        ethernet (rndis_host), 4A:95:CE:43:80:51, hw, mtu 1500
        ip4 default
        inet4 192.168.42.193/24
        route4 0.0.0.0/0
        route4 192.168.42.0/24
        route4 169.254.0.0/16
        inet6 fe80::a150:e699:1a23:b83f/64
        route6 fe80::/64
        route6 ff00::/8

enp3s0: unavailable
        "Realtek RTL8111/8168/8411"
        ethernet (r8169), 04:D9:F5:31:BF:D6, hw, mtu 1500

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
        servers: 192.168.42.129
        interface: usb0

Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.

Consult nmcli(1) and nmcli-examples(7) manual pages for complete usage details.

------UPDATED-------

route -n:

ubuntu@Linux:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.42.129  0.0.0.0         UG    20100  0        0 usb0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 usb0
192.168.42.0    0.0.0.0         255.255.255.0   U     100    0        0 usb0

ip a:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 04:d9:f5:31:bf:d6 brd ff:ff:ff:ff:ff:ff
4: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether e6:4a:fc:3a:7c:8b brd ff:ff:ff:ff:ff:ff
    inet 192.168.42.109/24 brd 192.168.42.255 scope global dynamic noprefixroute usb0
       valid_lft 3104sec preferred_lft 3104sec
    inet6 fe80::6e7f:9504:2062:a207/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

lsusb:

Bus 002 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

looking for /etc/network/interfaces but got this result:

ubuntu@Linux:/etc/network$ ls -la
total 32
drwxr-xr-x   6 root root  4096 Feb 10 01:50 .
drwxr-xr-x 134 root root 12288 Mar 29 00:19 ..
drwxr-xr-x   2 root root  4096 Mar 28 22:24 if-down.d
drwxr-xr-x   2 root root  4096 Mar 28 22:24 if-post-down.d
drwxr-xr-x   2 root root  4096 Mar 28 22:36 if-pre-up.d
drwxr-xr-x   2 root root  4096 Mar 28 22:36 if-up.d

/etc/netplan/01-network-manager-all.yaml:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

14
  • Hi and welcome. Please no pictures of text include it in the question so everyone can see it. Some users are on there phones and that is hard for them to see.
    – David
    Mar 28, 2021 at 11:01
  • 1
    what about ping -c4 8.8.8.8 Maybe a dns problem?
    – nobody
    Mar 28, 2021 at 12:09
  • Did you get the USB ethernet because it didn't work, possibly for the same DNS reason? If we determine that it is a DNS issue, I suspect that the internal ethernet will work as well.
    – chili555
    Mar 28, 2021 at 13:42
  • Before that it work well I use my phone as wifi adapter (USB Tethering) but now it's going like this
    – V Code
    Mar 28, 2021 at 14:27
  • If this DNS problem how I solve this ?
    – V Code
    Mar 28, 2021 at 14:27

2 Answers 2

4

It might be a driver problem. Have you installed the r8168 RealTek driver?

sudo apt-get update

sudo apt-get install r8168-dkms

** Edit **

Be aware that this driver should only be used for devices not yet supported by the in-kernel driver r8169. Installation of the r8168-dkms package will disable the in-kernel r8169 module. To re-enable r8169, the r8168-dkms package must be purged.

Also reading this thread might be helpful

4
  • so you mean adding r8169 into blacklist.conf ?
    – V Code
    Mar 29, 2021 at 6:27
  • then install r8168-dkms ?
    – V Code
    Mar 29, 2021 at 6:27
  • if this problem in r8169, how i remove r8169 and use r8168-dkms as my ethernet ?
    – V Code
    Mar 29, 2021 at 8:11
  • Installation of the r8168-dkms does NOT automatically disable the r8169 driver. You'd have to manually edit /etc/modprobe.d/r8168-dkms.conf file for that... but it's probably not necessary to do that.
    – heynnema
    Mar 29, 2021 at 13:50
3

Thanks for everyone who reply my question, I Solve my problem with this method:

if r8168-dkms installed remove first:

user@linux:~$ sudo apt purge r8168-dkms

make sure installing build-essential:

user@linux:~$ sudo apt-get install build-essential linux-headers-$(uname -r)

Blacklisting the r8169 driver:

user@linux:~$ sudo sh -c 'echo blacklist r8169 >> /etc/modprobe.d/blacklist.conf'

i use GBE Ethernet LINUX driver r8168 for kernel up to 5.6 (Unix(Linux)) for the driver, after downloading the driver open terminal and locate the file:

user@linux:~$ cd /path/to/file
user@linux:~$ tar xfvj r8168-8.048.03.tar.bz2
user@linux:~$ cd r8168-8.048.03

final step:

user@linux:~$ sudo ./autorun.sh

Check if driver is working using lsmod | grep r8 or ethtool:

user@linux:~$ cd ethtool -i <your_logical_name>

for me:

user@linux:~$ cd ethtool -i enp3s0

output:

driver: r8168
version: 8.048.03-NAPI
firmware-version: 
expansion-rom-version: 
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

then reboot.

4
  • 2
    The problem with this fix is that it'll have to be done at every kernel update. You shouldn't have manually blacklisted the r8169 module, and you should have installed the r8168-dkms, which will automatically rebuild itself with kernel updates, and will also take care of the r8169 driver, if required, by an edit to /etc/modprobe.d/r8168-dkms.conf. Look at dkms status to confirm that your installed driver is/is not there.
    – heynnema
    Mar 29, 2021 at 13:53
  • Why is the title of your question "USB Ethernet Connected but No Internet" when the problem was with the PCI ethernet?
    – heynnema
    Mar 29, 2021 at 13:55
  • In my case r8169 is not auto blacklisted when I installing r8168-dkms, and r8168-dkms it's not working even i tried dkms status it show r8168-dkms installed, but actually it's never working in my case
    – V Code
    Mar 31, 2021 at 6:11
  • What driver does sudo lshw -c network show for the ethernet port? r8168 or r8169? As I mention in my comment on the accepted answer, /etc/modprobe.d/blacklist.conf is not the correct place to blacklist r8169, but rather /etc/modprobe.d/r8168-dkms.conf, but even that's probably not necessary. So... is your card working now, or not? What's the current status?
    – heynnema
    Mar 31, 2021 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .