Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Where I'm living now, the internet connection (wired) shows the following weird symptoms. They seem to be independent of whether I use host names or IP addresses.

  • Pinging works
  • Skype works
  • Wget connects, but never receives a response. (Keeps waiting at "HTTP Request sent, awaiting response" until timeout.)
    • Except for a small subset of domains, for which it works.
  • ssh commands (ssh host ls) works.
  • Interactive ssh works for a short while, but hangs quickly, e.g. during the first ls -- at the same point every time.
  • Under Windows, everything works fine.

What can I do to diagnose this further? So far, I've just been looking at the application layer. Since there is an apparent internet connection, there must be some way to tunnel Firefox, but I'd like to pin down the problem first.

It is very likely related to large packets not making their way through. I've found out that there is an MTU, but setting it for eth0 does not solve my problem. I think that I'm behind PPPOE and a router. The external IPs are the same on Windows and Linux.

Output of some commands:

ip link show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1024 qdisc mq state UP qlen 1000
    link/ether 00:26:aa:aa:aa:61 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether c4:17:aa:aa:aa:ff brd ff:ff:ff:ff:ff:ff
4: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 5e:49:aa:aa:aa:27 brd ff:ff:ff:ff:ff:ff

ip route show

192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.4  metric 1 
192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1 
169.254.0.0/16 dev eth0  scope link  metric 1000 
default via 192.168.1.1 dev eth0  proto static 

ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1024 qdisc mq state UP qlen 1000
    link/ether 00:26:2d:78:ac:61 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.4/24 brd 192.168.1.255 scope global eth0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether c4:17:fe:3b:56:ff brd ff:ff:ff:ff:ff:ff
4: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 5e:49:01:03:55:27 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
    inet6 fe80::5c49:1ff:fe03:5527/64 scope link 
       valid_lft forever preferred_lft forever

I can send pings up to size 1468.

tim@milagros:/$ ping -M do -c 1 -s 1470 stackexchange.com
PING stackexchange.com (64.34.119.12) 1470(1498) bytes of data.
   --- stackexchange.com ping statistics ---
   1 packets transmitted, 0 received, 100% packet loss, time 0ms

tim@milagros:/$ ping -M do -c 1 -s 1468 stackexchange.com
PING stackexchange.com (64.34.119.12) 1468(1496) bytes of data.
1476 bytes from stackoverflow.com (64.34.119.12): icmp_seq=1 ttl=52 time=176 ms
   --- stackexchange.com ping statistics ---
   1 packets transmitted, 1 received, 0% packet loss, time 0ms
   rtt min/avg/max/mdev = 176.539/176.539/176.539/0.000 ms



tim@milagros:~/projekt/perl$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:26:2d:78:ac:61  
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:161 errors:0 dropped:0 overruns:0 frame:0
          TX packets:194 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:143947 (143.9 KB)  TX bytes:67727 (67.7 KB)
          Interrupt:16 
share|improve this question
5  
I smell an MTU problem. Read my answer there to see an explanation. If you need help fixing the problem, you'll need to give more information about your setup. –  Gilles Apr 11 '11 at 20:04
    
@Gilles: I tried following those steps, even setting a much lower MTU than necessary, but it doesn't seem to solve the problem. ifconfig claims that the MTU indeed is set correctly. –  Tim N Apr 13 '11 at 7:46
    
@Tim: Then you need to describe your network setup. What OS are you running? How is the network configured on your machine (static configuration, Network Manager, …)? Are there other devices (router?) under your control between you and your ISP? By what method do you connect to your ISP? And how did the ping measure go? –  Gilles Apr 13 '11 at 8:08
    
@Tim, have you solved this issue? –  Mike Pennington May 2 '11 at 11:02
    
@Mike: No. I've got some more info, namely that I'm behind a PPPOE router and that there is an MTU (~1300, don't remember). Setting the MTU does not solve anything, though. I'm currently running Windows 7, and everything over there works fine. –  Tim N May 2 '11 at 11:15
show 7 more comments

1 Answer 1

Tim, I respectfully urge you to ignore your doubts about changing MTU. Your issue has MTU problem written all over it and I have been a professional network engineer for over 15 years.

To prove whether MTU helps, conduct tests from your linux machine using ping with the DF bit set in the IP header...

ping -M do -s 1232 <some pingable internet ip address>

I calculated the -s parameter assuming your PPPoE IP MTU is 1300 bytes. If that ping succeeds, then use -s 1432 and watch what happens... if the ping it now fails, you have conclusive proof that there is an MTU issue (assuming you have not set your Ethernet link MTU lower).

Also remember that MTU must be set on both sides of the link... so you would need to do this on your modem as well.

EDIT

Tim, you still have not run the commands I asked you to. Let me give you an example of what is wrong with what you did (I need to modify the destination host to stackexchange.com, due to firewalling for IP fragmentation in my path to 8.8.8.8)

Negative example (using your ping flags)

[mpenning@Bucksnort ~]$ ping -c 1 -s 65507 64.34.119.12
PING 64.34.119.12 (64.34.119.12) 65507(65535) bytes of data.
65515 bytes from 64.34.119.12: icmp_seq=1 ttl=51 time=53.2 ms

--- 64.34.119.12 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 53.246/53.246/53.246/0.000 ms
[mpenning@Bucksnort ~]$

Rhetorical question: how did a 64KB ping packet get through a 1500-byte ethernet segment? (see End note A) I can't help unless you post the information I am asking for. This is the same example, with ping -M do

Positive example

[mpenning@Bucksnort ~]$ ping -M do -c 1 -s 65507 64.34.119.12
PING 64.34.119.12 (64.34.119.12) 65507(65535) bytes of data.
From 24.102.60.3 icmp_seq=1 Frag needed and DF set (mtu = 1500)

--- 64.34.119.12 ping statistics ---
0 packets transmitted, 0 received, +1 errors

[mpenning@Bucksnort ~]$

ping -M do provides information about the maximum MTU along the path (in this case, we know the first-hop ethernet segment has an IP MTU of 1500-bytes).

End Notes:

A. Your pings can be completed as a series of IP fragments, because by-default ping allows IP fragmentation. If you are trying to find the maximum packet size that will pass through a link, you must modify the IP header (which I illustrated with -M do) to ensure you don't get a bunch of fragmented responses stitched together at the end. Using ping -c 1 -s 65507 64.34.119.12:

[mpenning@Bucksnort ~]$ sudo tshark -n -i eth0 icmp
  1   0.000000 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=0)
  2   0.000058 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=1480)
  3   0.000071 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=2960)
  4   0.000081 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=4440)
  5   0.000094 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=5920)
  6   0.000105 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=7400)
  7   0.000116 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=8880)
  8   0.000124 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=10360)
  9   0.000133 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=11840)
 10   0.000143 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=13320)
 11   0.000152 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=14800)
 12   0.000162 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=16280)
 13   0.000172 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=17760)
 14   0.000181 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=19240)
 15   0.000191 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=20720)
 16   0.000201 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=22200)
 17   0.000211 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=23680)
 18   0.000221 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=25160)
 19   0.000230 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=26640)
 20   0.000240 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=28120)
 21   0.000250 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=29600)
 22   0.000259 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=31080)
 23   0.000269 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=32560)
 24   0.000278 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=34040)
 25   0.000288 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=35520)
 26   0.000298 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=37000)
 27   0.000308 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=38480)
 28   0.000318 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=39960)
 29   0.000327 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=41440)
 30   0.000337 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=42920)
 31   0.000352 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=44400)
 32   0.000361 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=45880)
 33   0.000372 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=47360)
 34   0.000384 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=48840)
 35   0.000394 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=50320)
 36   0.000403 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=51800)
 37   0.000411 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=53280)
 38   0.000419 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=54760)
 39   0.000428 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=56240)
 40   0.000437 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=57720)
 41   0.000446 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=59200)
 42   0.000455 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=60680)
 43   0.000466 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=62160)
 44   0.000477 24.102.60.3 -> 64.34.119.12 IP Fragmented IP protocol (proto=ICMP 0x01, off=63640)
 45   0.000486 24.102.60.3 -> 64.34.119.12 ICMP Echo (ping) request
 46   0.044402 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=0)
 47   0.044439 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=1480)
 48   0.044899 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=2960)
 49   0.044910 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=4440)
 50   0.044916 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=5920)
 51   0.045149 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=7400)
 52   0.045399 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=8880)
 53   0.045409 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=10360)
 54   0.045415 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=11840)
 55   0.045649 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=13320)
 56   0.045899 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=14800)
 57   0.045908 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=16280)
 58   0.045915 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=17760)
 59   0.046148 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=19240)
 60   0.046163 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=20720)
 61   0.046402 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=22200)
 62   0.046421 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=23680)
 63   0.046650 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=25160)
 64   0.046668 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=26640)
 65   0.046901 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=28120)
 66   0.046918 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=29600)
 67   0.047151 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=31080)
 68   0.047171 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=32560)
 69   0.047399 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=34040)
 70   0.047418 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=35520)
 71   0.047424 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=37000)
 72   0.047650 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=38480)
 73   0.047900 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=39960)
 74   0.048149 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=41440)
 75   0.048165 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=42920)
 76   0.048172 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=44400)
 77   0.048178 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=45880)
 78   0.048398 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=47360)
 79   0.048650 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=48840)
 80   0.048667 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=50320)
 81   0.048674 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=51800)
 82   0.048900 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=53280)
 83   0.048922 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=54760)
 84   0.049150 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=56240)
 85   0.049174 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=57720)
 86   0.049398 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=59200)
 87   0.049649 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=60680)
 88   0.049671 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=62160)
 89   0.049677 64.34.119.12 -> 24.102.60.3 IP Fragmented IP protocol (proto=ICMP 0x01, off=63640)
 90   0.049683 64.34.119.12 -> 24.102.60.3 ICMP Echo (ping) reply
share|improve this answer
    
I completely agree with you that there is some MTU problem. What I've done is test different-sized pings to find just where the limit is. However, when I set the MTU for eth0 (ifconfig eth0 mtu 1232, I think), it does not change the problem. Setting an MTU much lower than the limit doesn't, either. I did not realise that I had to set the MTU for the other side of the link -- how does Windows 7, which seems to auto-tune its MTU, do that? –  Tim N May 2 '11 at 12:28
    
@Tim, I can't answer your question about Windows 7 yet... there are a few possibilities... 1) an isp technician or isp software set it. 2) Differences in how they are handling Path MTU Discovery... there could be other dynamics in play, but let's get the output of the pings and figure out where to go from there –  Mike Pennington May 2 '11 at 12:32
    
Sure, I'll get it this evening. –  Tim N May 2 '11 at 12:34
    
@Tim, please edit with the results of your pings if you're still interested in debugging. –  Mike Pennington May 3 '11 at 3:37
    
@Mike: Certainly. I've added the output. Windows and Linux have the same IP. I found that the MTU I mentioned earlier was caused by my setting the MTU for eth0! With ifconfig eth0 mtu 1500, ping size seems capped on 1468, which, with the headers, is very close to 1500. –  Tim N May 3 '11 at 5:30
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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