Score:0

Problem with the ethernet connection

rs flag

I'm having this problem with my ethernet internet connection.

My PC connects without problem, I can browse and watch videos on YouTube, the problem occurs when I download something greater than 50 MB, at that moment it disconnects and it is not possible to connect it again until I restart the computer.

My normal internet configuration is:

enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.0.2  netmask 255.255.255.0  broadcast 192.168.0.255
    inet6 fe80::fc03:59b7:dccd:1b8a  prefixlen 64  scopeid 0x20<link>
    ether 50:65:f3:1d:84:8a  txqueuelen 1000  (Ethernet)
    RX packets 22066  bytes 21353982 (21.3 MB)
    RX errors 0  dropped 61  overruns 0  frame 0
    TX packets 13205  bytes 3347539 (3.3 MB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 18  

    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 1000  (Bucle local)
    RX packets 2929  bytes 286008 (286.0 KB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 2929  bytes 286008 (286.0 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And when I download something it gives me this error:

enp4s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    ether 50:65:f3:1d:84:8a  txqueuelen 1000  (Ethernet)
    RX packets 631360277691  bytes 210552912953 (210.5 GB)
    RX errors 210453397455  dropped 2100  overruns 0  frame 841813589820
    TX packets 631360243863  bytes 210459851571 (210.4 GB)
    TX errors 210453397455  dropped 0 overruns 0  carrier 0  collisions 2104533

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 1000  (Bucle local)
    RX packets 2929  bytes 286008 (286.0 KB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 2929  bytes 286008 (286.0 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I would appreciate any advice or solutions to this problem :(

Thank you for reading :)

ar flag
Maybe `dmesg` could show some clues? Or the "/var/log/syslog" file? And `ip route`? Also, can other machines on the same router/gateway download normally?
Saki Osive avatar
de flag
Can you try this: Whatever file you wanna download, just right click and click ``Copy link address``. Then in the terminal run, ``wget -c the-address-that-you-copied``, and let us know the results.
heynnema avatar
ru flag
What version Ubuntu? Edit your question and show me `sudo lshw -C network` and `free -h` and `sysctl vm.swappiness` and `swapon -s` and `cat /etc/netplan/*.yaml`. Start comments to me with @heynnema or I'll miss them.
Score:0
br flag

Your Ethernet interface generates a lot of packet errors including collisions. Every third packet is received/transmitted with error. The interface is disabled by exhaustive number of errors probably.

Errors can be caused by these reasons:

  1. wrong media (Ethernet cable)
  2. wrong speed & duplex setting of port
  3. switch error
  4. network card error

Test #1. Check carefully your Ethernet cables. Search for Cat5E or Cat6 marks along cable. Lower category cables are improper. Replace cable by another one even though it looks good. Test connection again and watch error counters.

Test #2. Install ethtool sudo apt-get install ethtool and check speed and duplex of your enp4s0 interface:

sudo ethtool enp4s0

Example of command response with correct status of interface:

mypc:~$ sudo ethtool eth0
Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Supported pause frame use: Symmetric
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Advertised pause frame use: Symmetric
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: 1000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: off (auto)
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000007 (7)
                   drv probe link
    Link detected: yes
mypc:~$

Important lines are:

Advertised auto-negotiation: Yes

    Speed: 1000Mb/s
    Duplex: Full

Different values than listed above indicate problem:

  • Duplex: Half instead of Full
  • Speed 10 instead of 100Mb/s or 1000Mb/s

Test #3. Tens of years are used only switches in network communication, no hubs. Switches cannot generate collisions if they are connected and set by right way. Network device is wrong or failed if you see collisions.

Do you have some network box between your Ubuntu PC and an Internet router? Check this device. If it is hub, throw it away and buy switch with gigabit speed (10/100/1000). If PC is connected directly to the Internet router, try to use another port. Verify port setting in router.

Test #4. Borrow some PCIe Ethernet card (e.g. from another PC) and put it into slot on your motherboard. Test connection using this card. Try to borrow and test USB Ethernet adapter especially if your PC is laptop.

Wayne Vosberg avatar
bd flag
Agree - if it is not a hardware fault it is almost certainly a speed/duplex mismatch. Check what your switch/hub supports and use 'ethtool' to set the NIC accordingly. Compatible settings (not always intuitive) can be found here: https://www.cisco.com/c/en/us/support/docs/switches/catalyst-6500-series-switches/17053-46.html#auto_neg_valid
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.