Results 1 to 5 of 5

Thread: loopback interface MTU size

  1. #1
    Join Date
    Feb 2012
    Beans
    4

    Question loopback interface MTU size

    Hi all.

    I have some files on an apache server (localhost) and i'm using simple AJAX commands to pull the files from the server. Whilst doing this, I am running wireshark to analyze the way in which the packets are received and acknowledged.

    To replicate ethernet stardards, I set the MTU at 1500 using the following command:
    sudo ifconfig lo mtu 1500

    Following that, ifconfig states:

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:1500 Metric:1
    RX packets:3187 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3187 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:9154900 (9.1 MB) TX bytes:9154900 (9.1 MB)


    However when running wireshark, packets are of sizes in excess of 1500 such as: 8694, 5814, 7734 etc

    Any idea why the packers would be larger than the MTU specified?

  2. #2
    Join Date
    Feb 2012
    Beans
    4

    Re: loopback interface MTU size

    up

  3. #3
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: loopback interface MTU size

    Quote Originally Posted by free2rhyme2k View Post
    Hi all.

    I have some files on an apache server (localhost) and i'm using simple AJAX commands to pull the files from the server. Whilst doing this, I am running wireshark to analyze the way in which the packets are received and acknowledged.

    To replicate ethernet stardards, I set the MTU at 1500 using the following command:
    sudo ifconfig lo mtu 1500

    Following that, ifconfig states:

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:1500 Metric:1
    RX packets:3187 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3187 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:9154900 (9.1 MB) TX bytes:9154900 (9.1 MB)


    However when running wireshark, packets are of sizes in excess of 1500 such as: 8694, 5814, 7734 etc

    Any idea why the packers would be larger than the MTU specified?
    The loopback adapter is a virtual NIC; no hardware at all. It does not use Ethernet. You can see this with the Link encap statement using the command ifconfig from the CLI.

    Code:
    lo     Link encap:Local Loopback
    eth0   Link encap:Ethernet  HWaddr 00:13:54:58:1a:6e
    The MTU sets the max size of packets transmitted over the wire via a layer 2 (link layer) protocol such as Ethernet.
    -BAB1

  4. #4
    Join Date
    Feb 2012
    Beans
    4

    Re: loopback interface MTU size

    What you are suing makes sense, basically that the mtu gets set at a layer which isn't used when using the loopback interface (that's what I understood anyway). That being the case, changing the mtu should have no impact on packet sizes at all, however when I do set a lot mtu, it does decrease the packet sizes, but not to values that are less than the selected mtu.

    Eg - I select 1500 and packets are typically around 8000.
    I select 1000 and packets are typically around 6000 - 7000.

    It appears to be relatively arbitrary how the mtu affects the packet sizes captured in the trace but changing the mtu does have 'some' effect.

  5. #5
    Join Date
    Oct 2009
    Location
    Elgin, IL USA
    Beans
    2,638
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: loopback interface MTU size

    Even with regular ethernet devices the mtu may be higher than set, if the specific connection is capable.

    For example when I was playing with a mail server on DSL, I could send it small test e-mails from the internet, but for larger e-mail with attachments, sendmail kept timing out awaiting data transfer because packets larger than the mtu of PPPoE would get fragmented, and therefore, rejected. So the sender kept trying to resend every 60 seconds when sendmail timed out.

    The server was behind an old broadband router unaware that traffic had to fit through a 1492 mtu hole (PPPoE has an 8-byte header which shrinks its mtu). Once I set the mtu of the sendmail nic to mtu 1492 the stalled mail came through. That only seems to be a potential issue for servers receiving uninitiated connections, not client applications

    However, from ping testing with data payload, while internet traffic was limited to the set mtu 1492, local LAN traffic used the full 1500.
    i5 650 3.2 GHz, 8 GB, nvidia GTX 750 Ti, 32" 1080p | i7-4700MQ, 8 GB, Intel HD 4600/nvidia GTX 765M, 15.6" 1080p | etc.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •