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:
- wrong media (Ethernet cable)
- wrong speed & duplex setting of port
- switch error
- 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.