0

I have replaced my router with a new one. Internet speed is the same, but I have problem that certain pages load for too long. Google searches appear instantly, for example, but Youtube and Facebook need 10 seconds or more to load. I can't even access Messenger on Facebook. When I play video on Youtube it runs smoothly, but I have to wait very long for page to load.

enp2s0: flags=4163 mtu 1500 inet 192.168.10.100 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::f036:3f4e:b7d4:d8eb prefixlen 64 scopeid 0x20 ether ac:e2:d3:7e:89:4e txqueuelen 1000 (Ethernet) RX packets 743620 bytes 1063295359 (1.0 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 376777 bytes 36479304 (36.4 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

  • Are you using cable or DSL? What is your MTU setting in the router? – heynnema Jun 21 '18 at 23:54
  • I'm using DSL and I get internet over student dormitory proxy server. enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.10.100 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::f036:3f4e:b7d4:d8eb prefixlen 64 scopeid 0x20<link> ether ac:e2:d3:7e:89:4e txqueuelen 1000 (Ethernet) RX packets 743620 bytes 1063295359 (1.0 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 376777 bytes 36479304 (36.4 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 – user123139 Jun 22 '18 at 0:20
  • please update your question to add the additional information there instead of the comments – Eskander Bejaoui Jun 22 '18 at 0:35
2

Your problem is with the MTU setting for your DSL connection.

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 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

  • Thank you for reply. When I set MTU 1492 situation is not noticeably improved. So, I set MTU at 1500 at went with 1472 and didn't get fragmentation. When I have fragmentation reply should be something like: Message too long? For 1472 packet size at MTU= 1500 I get the following reply: --- 8.8.8.8 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3049ms – user123139 Jun 22 '18 at 15:49
  • Set 1492 in both the Ubuntu machine, the router, and reboot both. Then retry the tests. That's just a quickie test with one of the most common MTU sizes. You may have to do the entire test sequence to actually determine the correct MTU. Your ping example was 100% bad. Please remember to accept my answer if it was helpful, and solves your problem. Thanks! – heynnema Jun 22 '18 at 17:22
  • I either get this response, or the response Message is too long. I tried whole sequence of the tests. At MTU=1492, I got this reply at 1492-28, and the rest of them were "The Message is too long". And it always has 100% packet loss, i also tried with different addresses. The problem is also that I cannot enter my router settings, I have discovered that my router has a bit unusual address, but I cannot enter that because it loads forever and then displays gateway_timeout. – user123139 Jun 22 '18 at 18:06
  • My girlfriend is connecting over the same router, and it works fine for her. She has MTU=1500, but she uses Windows. – user123139 Jun 22 '18 at 18:17
  • You don't use 1492-28. 28 gets added to the MTU found during testing. If you're getting a gateway error at the router, more settings are wrong in the router. – heynnema Jun 22 '18 at 18:55

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.