Linux 2.6.39-rc7 - Wrong Maximum Segment Size being advertised

Discussion in 'Linux Networking' started by Mark Hobley, May 21, 2011.

  1. Mark Hobley

    Andy Furniss Guest

    Or as I have just tested and found to work for me -
    use the advmss parameter with the ip route command.
     
    Andy Furniss, May 22, 2011
    #21
    1. Advertisements

  2. Mark Hobley

    Mark Hobley Guest

    Right. The ip command is not making the change then. I just tried to fix
    this with route:

    route del 0.0.0.0
    SIOCDELRT: No such process
    route add 0.0.0.0 gw 10.0.0.1 netmask 0.0.0.0 mss 1392

    route -ne

    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    0.0.0.0 10.0.0.1 255.255.255.255 UGH 1392 0 0 eth0
    0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
    10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

    Hmmm. Not quite what I had in mind. How do I force the revised value into
    the right place in the table?

    Mark.
     
    Mark Hobley, May 22, 2011
    #22
    1. Advertisements

  3. Mark Hobley

    Mark Hobley Guest

    Ahhh, right. I just checked the man page and that might be what caused the
    problem. On the old version, if advmss was not specified, it used the same
    value as mss. On the upgrade, it takes the value from the interface
    information in the routing table, which in my case is not the right value,
    because I use larger packets on the LAN, than I do for externally bound
    traffic.

    Mark.
     
    Mark Hobley, May 22, 2011
    #23
  4. Mark Hobley

    Mark Hobley Guest

    I did that test a while ago. I think it works, if I set it against the nic.
    I didn't want to do that though, because it reduces the size of all the LAN
    traffic packets.
    Right. I will look at that yahoo test again.

    Cheers,

    Mark.
     
    Mark Hobley, May 23, 2011
    #24
  5. The non server versions of Windows use a smaller MTU (I recall 1300, but
    that may be wrong) to avoid pmtu blackholes, so yes, this is not
    impossible.

    M4
     
    Martijn Lievaart, May 23, 2011
    #25
  6. Mark Hobley

    Mark Hobley Guest

    Could I change this value through the /proc interface? Or is there a system
    call that I could use to change the MSS for the first entry in the table?

    Mark.
     
    Mark Hobley, May 25, 2011
    #26
  7. Mark Hobley

    Mark Hobley Guest

    Actually, it looks as though the ip command manipulates the table. The value
    it produces does not look right to me though:

    ip route change default via 10.0.0.1 mtu lock 1412 advmss 1392

    route -ne
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    0.0.0.0 10.0.0.1 0.0.0.0 UG 1432 0 0 eth0
    10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

    Huh! The value of MSS is now 1432 (which is bigger than the maximum
    transmission unit). I ordered 1392.

    Mark.
     
    Mark Hobley, May 25, 2011
    #27
  8. Mark Hobley

    Mark Hobley Guest

    Even with an MSS value in the table, the maximum segment size in the
    datagrams exceeds the maximum transmission unit that can be carried:

    ip route change default via 10.0.0.1 mtu lock 1412 advmss 1372
    route -ne

    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    0.0.0.0 10.0.0.1 0.0.0.0 UG 1412 0 0 eth0
    10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

    01:13:58.554039 IP markhobley.yi.org.34525 > rosettacode.org.www: Flags , seq 2344941968, win 14600, options [mss 1460,sackOK,TS val 65981322 ecr 0,nop,wscale 2], length 0
    01:13:59.163369 IP rosettacode.org.www > markhobley.yi.org.34525: Flags [S.], seq 1837671167, ack 2344941969, win 5792, options [mss 1380,sackOK,TS val 486273651 ecr 65981322,nop,wscale 7], length 0

    (Note that the MSS is too big in both directions.)

    Also, should the entry headed "MSS" in the routing table read "MTU"?

    Mark.
     
    Mark Hobley, May 29, 2011
    #28
  9. Mark Hobley

    Andy Furniss Guest

    try advmss lock 1372
    ip ro ls. As you say, route (depreciated by ip?) is showing + 40 for
    whatever reason. tcpdump will show what is really happening.


    Incoming mss is set by the other end - if it's smaller than your mtu
    tcp/ip stack will respect that. If it's larger the packets sent should
    still be limited by your mtu setting.

    Andy.
     
    Andy Furniss, May 29, 2011
    #29
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.