MTU confusion



  • Hi,

    I run my pfSense virtualized on a KVM host. pfSense version is 2.4.2-RELEASE-p1 (amd64).
    My WAN port is connected to a VDSL Modem (Germany / Netcologne). It's a Draytek Vigor 130.

    By googling I found out that my provider uses MTU of 1492 which seems common to me.
    I set the WAN interface up as PPPoE with MTU 1492 in "General Settings".

    When I take a look at the interface after it becomes online it says MTU 1442. I don't understand. That's a discrepancy of 50 Bytes.

    log entries in /var/log/ppp.log:

    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: LayerStart
    Feb  1 11:21:42 srv201 ppp: [wan_link0] PPPoE: Connecting to 'netac'
    Feb  1 11:21:42 srv201 ppp: PPPoE: rec'd ACNAME "netdsl"
    Feb  1 11:21:42 srv201 ppp: [wan_link0] PPPoE: connection successful
    Feb  1 11:21:42 srv201 ppp: [wan_link0] Link: UP event
    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: Up event
    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: state change Starting --> Req-Sent
    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: SendConfigReq #1
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   PROTOCOMP
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   MRU 1492
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   MAGICNUM 0xf71eed90
    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: rec'd Configure Request #21 (Req-Sent)
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   MRU 1492
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   AUTHPROTO PAP
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   MAGICNUM 0x4d8f3cd7
    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: SendConfigAck #21
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   MRU 1492
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   AUTHPROTO PAP
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   MAGICNUM 0x4d8f3cd7
    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: state change Req-Sent --> Ack-Sent
    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: rec'd Configure Ack #1 (Ack-Sent)
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   PROTOCOMP
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   MRU 1492
    Feb  1 11:21:42 srv201 ppp: [wan_link0]   MAGICNUM 0xf71eed90
    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: state change Ack-Sent --> Opened
    Feb  1 11:21:42 srv201 ppp: [wan_link0] LCP: auth: peer wants PAP, I want nothing
    

    Now I try to ping via IPv4 and IPv6 to the outside world. IPv6 is native ( dual stack).
    Using IPv4 I get packets through up to the size of 1472 bytes. Everything that's bigger than 1473 doesn't fit. I force those packets not to fragment.
    Using IPv6 I get packets through up to the size of 1394. Everything bigger than 1395 won't do.

    Can someone please enlighten me? I always thought I would have understood how MTU works.

    Edit:
    1394 for IPv6 seems legit. When I add 48 Bytes for (IPv6 and ICMP Header) I get exactly 1442 Bytes.
    So it looks to me that my MTU actually is 1442.



  • Where do you see 1442?  I don't see it in that info you included.  Also, when you ping, specifying the size, it's the payload size you're setting, not packet.  So, out of 1492, you lose the IP and ICMP headers, for a total of 28 bytes on IPv4.  On IPv6, it would be 48 bytes.

    Fire up Wireshark, to see what's really on the wire.  It will show Ethernet frame size, as well as the various header sizes.



  • When I do "ifconfig pppoe1" on the CLI I get MTU of 1442, also the WebGUI displays that value when I go on "Interfaces".
    After all I fear my Modem might set that MTU down to that low value. I cannot veriy remotely though.

    Thank you so far.



  • Based on the PPP log you've pasted, you should be seeing an MTU on your PPPoE interface of 1492.
    For example, my PPP log shows:

    
    Mar  1 09:26:52 trogdor ppp: [wan_link0] LCP: SendConfigReq #5
    Mar  1 09:26:52 trogdor ppp: [wan_link0]   MRU 1508
    Mar  1 09:26:52 trogdor ppp: [wan_link0]   MAGICNUM 0x4b076e9b
    Mar  1 09:26:52 trogdor ppp: [wan_link0] LCP: rec'd Configure Ack #5 (Req-Sent)
    Mar  1 09:26:52 trogdor ppp: [wan_link0]   MRU 1508
    Mar  1 09:26:52 trogdor ppp: [wan_link0]   MAGICNUM 0x4b076e9b
    Mar  1 09:26:52 trogdor ppp: [wan_link0] LCP: state change Req-Sent --> Ack-Rcvd
    Mar  1 09:26:53 trogdor ppp: [wan_link0] LCP: rec'd Configure Request #98 (Ack-Rcvd)
    Mar  1 09:26:53 trogdor ppp: [wan_link0]   MRU 1500
    Mar  1 09:26:53 trogdor ppp: [wan_link0]   AUTHPROTO PAP
    Mar  1 09:26:53 trogdor ppp: [wan_link0]   MAGICNUM 0x6e8ba1e8
    Mar  1 09:26:53 trogdor ppp: [wan_link0] LCP: SendConfigAck #98
    Mar  1 09:26:53 trogdor ppp: [wan_link0]   MRU 1500
    Mar  1 09:26:53 trogdor ppp: [wan_link0]   AUTHPROTO PAP
    Mar  1 09:26:53 trogdor ppp: [wan_link0]   MAGICNUM 0x6e8ba1e8
    
    

    And my pppoe interface reflects this:

    
    [2.4.2-RELEASE][admin@trogdor]/var/log: ifconfig pppoe0 | grep mtu
    pppoe0: flags=88d1 <up,pointopoint,running,noarp,simplex,multicast>metric 0 mtu 1500</up,pointopoint,running,noarp,simplex,multicast> 
    

    The fact you can ping up to 1472 shows you have an MTU of at least that, so the 1442 number you're showing us doesn't make sense to me.

    Are the logs you've pasted all from the same connection/time??



  • Hi,

    the modem isn't the source of the problem. Since it doesn't handle the pppoe session the settings for MTU are greyed out.

    Here's a snippet of my pfsense config file:

            <ppps><ppp><ptpid>0</ptpid>
                            <type>pppoe</type>
                            <if>pppoe0</if>
    
                            <username>myusername@netaachen.de</username>
                            <password>youwontbelieveit</password>
                            <provider>netaachen</provider>
                            <idletimeout>0</idletimeout></ppp> 
                    <ppp><ptpid>1</ptpid>
                            <type>pppoe</type>
                            <if>pppoe1</if>
                            <ports>vtnet0</ports>
                            <username>myusername@netaachen.de</username>
                            <password>youwontbelieveit</password>
                            <provider>netac</provider></ppp></ppps> 
            <interfaces><wan><enable></enable>
                            <if>pppoe1</if>
    
                            <spoofmac></spoofmac>
                            <ipaddr>pppoe</ipaddr>
                            <ipaddrv6>dhcp6</ipaddrv6>
    
                            <dhcp6-ia-pd-len>16</dhcp6-ia-pd-len>
                            <dhcp6usev4iface></dhcp6usev4iface>
                            <mtu>1492</mtu></wan> 
     [...]</interfaces> 
    

    What's REALLY weird is that the password I find in the config is different to the one I find in my tcpdump/wireshark recordings. WTF? How can that be?
    Session is coming up fine though.
    What I haven't found is some RFC explanation about how MTU is being negotiated.

    This is what my interface is saying btw:

    pppoe1: flags=88d1 <up,pointopoint,running,noarp,simplex,multicast>metric 0 mtu 1442</up,pointopoint,running,noarp,simplex,multicast>
    

    Ping6 seems to verify that, since 1442 - 40 (IPv6) - 8 (ICMP6) are actually 1394 which is the maximum packet size I can ping6.
    Confusion starts to grow. :-\

    Edit:
    I took a closer look at the tcpdump and what I found is that the Router Advertisement is saying 1442. Why would the provider want to do this? It looks like a faulty setup Router Advertiser to me.



Log in to reply