1

Cannot connect to the Internet by wired connection on a netbook using Xubuntu 18.04, while WiFi works, from the same cable connected to WiFi router. Same wired connection works fine on my desktop PC.

Looking at syslog, it tries to connect, starts DHCPDISCOVER, times out after 45 seconds, and then repeats the cycle over and over.
An example of one such cycle: http://dpaste.com/3D283KH

ifconfig -a on netbook: http://dpaste.com/1H0NBGQ
wlp1s0 is WiFi connection that works, enp2s0 is wired connection that fails.
When I run ifconfig -a on desktop, I'm getting similar results: http://dpaste.com/0BDHJR4, but the interface name is eth0 instead of enp2s0.

From comment here:
$ lspci -nnk | grep -A2 Ethernet

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast
Ethernet controller [10ec:8136] (rev 02)
Subsystem: Device [1b50:4605]
Kernel driver in use: r8169


What I tried so far:

1) From this link:
in /etc/NetworkManager/NetworkManager.conf, change managed=false to managed=true and restart NetworkManager.
Did not help.

2) From the same link:
sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
and restart NetworkManager. Did not help.

3) From this comment:
sudo dhclient enp2s0

Nothing happens, it does not complain, does not return, just does nothing. Left it hanging for a few minutes, then stopped it with Ctrl+C.


Some background:

This same wired connection works fine on my desktop PC (Ubuntu MATE 14.04).

This same connection used to work on the same netbook a couple of months ago when it ran Ubuntu 18.04 - it didn't pick up right away, but started after some poking around.
I got the netbook again yesterday, had the same problem, installed Xubuntu 18.04 on it, still getting the same problem.
Ran apt-get update and upgrade on it after installation.

Thanks in advance!


EDIT: 'sudo lshw -C network' output (updated): http://dpaste.com/2N531EA

EDIT2: tracepath output: http://dpaste.com/1XJ90S9

# with cable connected directly
oae@oae:~$ tracepath www.ebay.com
# 'temporary error in name resolution"
tracepath: www.ebay.com: Временный сбой в разрешении имен

oae@oae:~$ tracepath 8.8.8.8
 1:  send failed
     Resume: pmtu 65535 

# connected via router
oae@oae:~$ tracepath www.ebay.com
 1?: [LOCALHOST]                      pmtu 1500
 1:  _gateway                                              1.090ms 
 1:  _gateway                                              0.867ms 
 2:  _gateway                                              0.890ms pmtu 1452
 2:  10.17.128.1                                           2.672ms 
 3:  10.218.60.217                                         2.732ms 
 4:  10.218.1.37                                           8.461ms 
 5:  10.218.1.101                                          8.100ms 
 6:  pob-cr01-ae1.0.kaz.mts-internet.net                   7.361ms asymm  7 
 7:  mag9-cr01-be6.16.msk.mts-internet.net                19.149ms 
 8:  mag9-cr01-be6.16.msk.mts-internet.net                18.753ms asymm  7 
 9:  oct-cr03-be1.78.spb.mts-internet.net                 30.630ms asymm  8 
10:  ae52.edge4.Stockholm2.Level3.net                     40.989ms asymm 14 
11:  ae52.edge4.Stockholm2.Level3.net                     57.871ms asymm 14 
12:  ae-13.r01.stocse01.se.bb.gin.ntt.net                 40.704ms asymm 14 
13:  ae-13.r01.stocse01.se.bb.gin.ntt.net                 42.363ms asymm 14 
14:  ae-0.akamai.stocse02.se.bb.gin.ntt.net               42.254ms asymm 16 
15:  ae-0.akamai.stocse02.se.bb.gin.ntt.net               46.866ms asymm 16 
16:  no reply
17:  no reply
...
23:  no reply
^C
  • Ended up with a workaround - connecting it via router. – egor83 Mar 13 at 14:42
2

First, undo the 3 changes you made to try and fix this problem.

Second, the r8169 driver is kind of flaky. Try using a different driver:

sudo apt-get update # update the software database

sudo apt-get install dkms r8168-dkms # install different driver

reboot # reboot the computer

Your ethernet card is a little different, and if for some reason this does not fix the problem, do:

sudo apt-get purge r8168-dkms # remove different driver

reboot # reboot the computer

Update #1:

# connected via router
$ tracepath www.ebay.com
 1?: [LOCALHOST]                      pmtu 1500
 1:  _gateway                                              1.090ms 
 1:  _gateway                                              0.867ms 
 2:  _gateway                                              0.890ms pmtu 1452

Need to check your MTU settings because of DSL modem.

There's a MTU setting in Ubuntu's network configuration, and a WAN MTU setting in your router.

For DSL, a common MTU setting is 1492. Just go ahead and try this value first and see if your web sites are now accessible.

To determine the correct setting, start with all MTU settings = 1500 and VPN = off. (VPN requires different testing).

In the terminal:

    ping [-c count] [-M do] [-s packet_size] [host]

The options used are:

  • c count: number of times to ping
  • M hint: Select Path MTU Discovery strategy. may be either do (prohibit fragmentation, even local one), want (do PMTU discovery, fragment locally when packet size is large), or dont (do not set DF flag).
  • s packet_size: Specifies the number of data bytes to be sent.

You should always start at 1472 and work your way down by 10 each time. Once you get a reply, go up by 1 until you get a fragmented packet. Take that value (last good value) and add 28 to the value to account for the various TCP/IP headers. Eg. let's say that 1452 was the proper packet size (where you first got an ICMP reply to your ping). The actual MTU size would be 1480, which is the optimum for the network we're working with.

    ping -c 4 -M do -s 1472 8.8.8.8 # this will probably show fragmentation

    ping -c 4 -M do -s 1462 8.8.8.8 # may show fragmentation

    ping -c 4 -M do -s 1452 8.8.8.8 # no fragmentation?

    ping -c 4 -M do -s 1453 8.8.8.8 # still no fragmentation?

reference: How to determine the proper MTU size with ICMP pings

Update #2:

Ended up connecting via a router. It works. MTU is still wrong.

| improve this answer | |

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.