Default MTU Size for Interfaces incorrect?

  • Hiya,

    This one I'm not sure I can reproduce because I saw it when I first set up pfSense 2.0BETA4 back on like September 15th, and am hesistant to tweak the settings further because I've got some stuff running on the box now.  But this is the basic gist:

    I noticed that on the Interfaces config menu for each interface, there is the "MTU" field, which indicates that if you leave the field blank, it will default to MTU size 1500 bytes.  However, when tracing traffic on the interfaces via the shell, I saw that MTU size was 8500-9000 bytes.  None of the networks I am connecting to use jumbo frames, and all use 1500 byte MTUs by default.  Since I was not wanting to use jumbo frames, I manually set the MTU on each interface to 1500 bytes via the pfSense web interface and it successfully propagated the change.

    Again, I'm not in a place where I can try and reproduce this, but just thought I'd throw it out there in case it is still an issue.  It should be easy to check though.

  • Where do you see 8500-9000? On a normal default install that doesn't specify MTU:
    em0: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500</up,broadcast,running,promisc,simplex,multicast>

  • That's where I saw it, just as you showed.  I also saw it while watching packets.  One thing about my setup is that I'm using Myricom 10G fiber cards, not sure if that causes the OS or the Myricom driver to do something different…  On the other hand, I could be totally braindead on this, so if no one else sees it then likely I was hallucinating.  ;)

  • This seems to be confirmed:  the mxge driver defaults to jumbo frames, at least on the 10G cards:

    ifconfig mxge0
    flags=48943 <up,broadcast,running,promisc,simplex,multicast,monitor>metric 0 mtu 9000

    A friend of mine looked at the source and saw this:

    static int mxge_initial_mtu = ETHERMTU_JUMBO;

    Now, we only checked on one other FreeBSD box, but this would seem to indicate that it may be standard.

    If so - maybe it would be good to have pfsense manually set the MTU to 1500 bytes even if it is that way by default on most cards?  Or maybe put something in that checks the driver?  Mostly not a big deal I guess, but the note that says "If you leave this field blank, an MTU of 1500 bytes will be assumed" isn't entirely correct for all interface types…</up,broadcast,running,promisc,simplex,multicast,monitor>

  • Rebel Alliance Developer Netgate

    I'd be more inclined to fix the note than force it to 1500, but that's me. (In fact, I just committed a fix for the note :-)

  • Hey, that works!  ;)

    I emailed the author of the driver, and sure enough:

    The driver is quite old (hardware appeared in 2005), and pre-dates
    support for offloads like TSO and LRO.  At the time I wrote the driver,
    the only way to get line rate from 10GbE was to use a jumbo MTU, hence
    we defaulted our MTU to a jumbo MTU on all our of supported platforms.
    I'd considered switching the MTU to 1500 bytes, but I have not done
    so because I worry about issues with current users who expect a 9000b
    MTU, and whose configurations might be broken by suddenly switching
    to a 1500b MTU.

    Anyway, thanks for fixing the note!  I'm sure there aren't many 10G Myricom users out there, but the few that are thank you.  ;)

  • I'm sure there aren't many 10G Myricom users out there, but the few that are thank you.

    Just to be clear - I'm sure there are lots of Myricom 10G users out there, just not many who are using such a card with pfSense.  ;)

Log in to reply