Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
ping6 ipv6Address -s 1500

This command will result a fragment. Observed by wireshark, the 1st fragment packet's length is 1496 (from layer 3). Since the MTU is 1500, I am confused by this 1496 length. Where does it come from?

share|improve this question
    
Are you connecting over a tunnel service? –  grawity Oct 5 '11 at 6:08
    
No. If I use -s 1452, there will be no fragment and the total length is 1500. –  deepsky Oct 5 '11 at 7:22
1  
I dont know IP6, but with IP4 I have to set my TCP param MTUs to 1480 because my switcher, it is like a 15' truck wont fit under the bridge */clunk* but a 14' 11" one flies right through. And it still goes 99mph that way. top 1% in speed tests for my connection. so i dont worry about the minor difference –  Psycogeek Oct 5 '11 at 8:02
add comment

4 Answers

You would see this if you have VLAN tagging on an interface that doesn't support it natively. 802.1Q VLAN tags take an additional 4 bytes. If your NIC supports them natively, it supports 1522-byte (instead of older 1518-byte) Ethernet frames so you can still have a 1500 byte MTU. If your NIC does not support it natively, you can support it in software but you have to shrink the MTU to 1496 so the whole thing fits in the old 1518-byte frames your NIC supports.

share|improve this answer
    
There is no VLAN configured on my network. And the Ethernet frame contains no 802.1q information. It's 14Bytes observed from the wireshark. –  deepsky Oct 5 '11 at 7:23
4  
Actually, I think it's because any new segments created must have an 8-byte boundary, and still be less than the MTU. 1500 is 187 div 8 with a remainder of 4. Thus, 1500-4=1496 would have to be the new boundary. There is greater detail about fragmentation at erg.abdn.ac.uk/~gorry/eg3567/inet-pages/ip-fragmentatiion.html. –  Paul Oct 5 '11 at 7:43
    
I think this makes sense. Not enough reputation to up vote.... –  deepsky Oct 5 '11 at 8:41
add comment

This is just for my own reference about IPv6 MTU. i needed some question to add it to - and i cho-cho-choose you.

First is our Ethernet packet, which normally we ignore:

+-------------------------+
| Ethernet - 16 bytes     |
|  6 byte destination MAC |
|  6 byte source MAC      |
|  4 byte type            |
+-------------------------+
|                         |
/  1,500 byte payload     /
|                         |
+-------------------------+

Now we add IPv4 or IPv6 header:

IPv4                           IPv6
+-------------------------+    +-------------------------+
| Ethernet - 12 bytes     |    | Ethernet - 12 bytes     |
|  6 byte destination MAC |    |  6 byte destination MAC |
|  6 byte source MAC      |    |  6 byte source MAC      |
|  4 byte type            |    |  4 byte type            |
+-------------------------+    +-------------------------+
| IPv4 - 20 bytes         |    | IPv6 - 40 bytes         |
|  10  byte control flags |    |  6 byte control flags   |
|  2 byte total length    |    |  2 byte payload length  |
|  4 byte source addr     |    |  16 byte source addr    |
|  4 byte dest addr       |    |                         |
+-------------------------+    |  16 byte dest addr      |
|                         |    |                         |
|                         |    +-------------------------|
|                         |    |                         |
/ 1,480 payload           /    / 1,460 payload           /
|                         |    |                         |
+-------------------------+    +-------------------------+

Next we add my reality of a PPPoE connection, which takes 8 bytes out of the packet for the PPPoE PADS tag:

+-------------------------+
| Ethernet - 12 bytes     |
|  6 byte destination MAC |
|  6 byte source MAC      |
|  4 byte type            |
+-------------------------+
| PPPoE PADS - 8 bytes    |
+-------------------------+
|                         |
/ 1,492 payload           /
|                         |
+-------------------------+

Which reduces the MTU available for our IPv4 and IPv6 traffic:

IPv4                           IPv6
+-------------------------+    +-------------------------+
| Ethernet - 12 bytes     |    | Ethernet - 12 bytes     |
|  6 byte destination MAC |    |  6 byte destination MAC |
|  6 byte source MAC      |    |  6 byte source MAC      |
|  4 byte type            |    |  4 byte type            |
+-------------------------+    +-------------------------+
| PPPoE PADS - 8 bytes    |    | PPPoE PADS - 8 bytes    |
+-------------------------+    +-------------------------+
| IPv4 - 20 bytes         |    | IPv6 - 40 bytes         |
|  10  byte control flags |    |  6 byte control flags   |
|  2 byte total length    |    |  2 byte payload length  |
|  4 byte source addr     |    |  16 byte source addr    |
|  4 byte dest addr       |    |                         |
+-------------------------+    |  16 byte dest addr      |
|                         |    |                         |
|                         |    +-------------------------|
|                         |    |                         |
/ 1,472 payload           /    / 1,452 payload           /
|                         |    |                         |
+-------------------------+    +-------------------------+

And then, in my case, i'm using Hurricane Electric's 6in4 tunneling, since my ISP doesn't offer native IPv6 connectivity. This means that my IPv6 traffic is wrapped in an IPv4 packet:

IPv4                           IPv6
+-------------------------+    +-------------------------+
| Ethernet - 12 bytes     |    | Ethernet - 12 bytes     |
|  6 byte destination MAC |    |  6 byte destination MAC |
|  6 byte source MAC      |    |  6 byte source MAC      |
|  4 byte type            |    |  4 byte type            |
+-------------------------+    +-------------------------+
| PPPoE PADS - 8 bytes    |    | PPPoE PADS - 8 bytes    |
+-------------------------+    +-------------------------+
| IPv4 - 20 bytes         |    | IPv4 - 20 bytes         |
|  10  byte control flags |    |  10  byte control flags |
|  2 byte total length    |    |  2 byte total length    |
|  4 byte source addr     |    |  4 byte source addr     |
|  4 byte dest addr       |    |  4 byte dest addr       |
+-------------------------+    +-------------------------+
|                         |    | IPv6 - 40 bytes         |
|                         |    |  6 byte control flags   |
|                         |    |  2 byte payload length  |
|                         |    |  16 byte source addr    |
|                         |    |                         |
|                         |    |  16 byte dest addr      |
|                         |    |                         |
|                         |    +-------------------------|
|                         |    |                         |
/ 1,472 payload           /    / 1,432 payload           /
|                         |    |                         |
+-------------------------+    +-------------------------+

But the important number is the MTU, which is the size that IPv4 or IPv6 has available to itself (including its headers):

IPv4                           IPv6
+-------------------------+    +-------------------------+
| Ethernet - 12 bytes     |    | Ethernet - 12 bytes     |
|  6 byte destination MAC |    |  6 byte destination MAC |
|  6 byte source MAC      |    |  6 byte source MAC      |
|  4 byte type            |    |  4 byte type            |
+-------------------------+    +-------------------------+
| PPPoE PADS - 8 bytes    |    | PPPoE PADS - 8 bytes    |
+-------------------------+    +-------------------------+
|                         |    | IPv4 - 20 bytes         |
/ MTU = 1492              /    |  10  byte control flags |
|                         |    |  2 byte total length    |
+-------------------------+    |  4 byte source addr     |
                               |  4 byte dest addr       |
                               +-------------------------+
                               |                         |
                               / MTU = 1472              |
                               |                         |
                               +-------------------------+

Next is the confusion about the payload size, used when pinging someone with the do not fragment flag. ICMP operates over IP, and adds its own header overhead:

IPv4                           IPv6
+-------------------------+    +-------------------------+
| Ethernet - 12 bytes     |    | Ethernet - 12 bytes     |
|  6 byte destination MAC |    |  6 byte destination MAC |
|  6 byte source MAC      |    |  6 byte source MAC      |
|  4 byte type            |    |  4 byte type            |
+-------------------------+    +-------------------------+
| IPv4 - 20 bytes         |    | IPv6 - 40 bytes         |
|  10  byte control flags |    |  6 byte control flags   |
|  2 byte total length    |    |  2 byte payload length  |
|  4 byte source addr     |    |  16 byte source addr    |
|  4 byte dest addr       |    |                         |
+-------------------------+    |  16 byte dest addr      |
| ICMP - 8 bytes          |    |                         |
+-------------------------+    +-------------------------|    
|                         |    | ICMP - 8 bytes          |
|                         |    +-------------------------+
|                         |    |                         |
/ 1,472 ping payload      /    / 1,452 ping payload      /
|                         |    |                         |
+-------------------------+    +-------------------------+

Note: This is why you can ping with 1,452 byte payload before you need to fragment.

In my case, with the overhead of a PPPoE PADS tag:

IPv4                           IPv6
+-------------------------+    +-------------------------+
| Ethernet - 12 bytes     |    | Ethernet - 12 bytes     |
|  6 byte destination MAC |    |  6 byte destination MAC |
|  6 byte source MAC      |    |  6 byte source MAC      |
|  4 byte type            |    |  4 byte type            |
+-------------------------+    +-------------------------+
| PPPoE PADS - 8 bytes    |    | PPPoE PADS - 8 bytes    |
+-------------------------+    +-------------------------+
| IPv4 - 20 bytes         |    | IPv6 - 40 bytes         |
|  10  byte control flags |    |  6 byte control flags   |
|  2 byte total length    |    |  2 byte payload length  |
|  4 byte source addr     |    |  16 byte source addr    |
|  4 byte dest addr       |    |                         |
+-------------------------+    |  16 byte dest addr      |
| ICMP - 8 bytes          |    |                         |
+-------------------------+    +-------------------------|    
|                         |    | ICMP - 8 bytes          |
|                         |    +-------------------------+
|                         |    |                         |
/ 1,464 ping payload      /    / 1,444 ping payload      /
|                         |    |                         |
+-------------------------+    +-------------------------+

And my additional overhead of 6in4:

IPv4                           IPv6
+-------------------------+    +-------------------------+
| Ethernet - 12 bytes     |    | Ethernet - 12 bytes     |
|  6 byte destination MAC |    |  6 byte destination MAC |
|  6 byte source MAC      |    |  6 byte source MAC      |
|  4 byte type            |    |  4 byte type            |
+-------------------------+    +-------------------------+
| PPPoE PADS - 8 bytes    |    | PPPoE PADS - 8 bytes    |
+-------------------------+    +-------------------------+
| IPv4 - 20 bytes         |    | IPv4 - 20 bytes         |
|  10  byte control flags |    |  10  byte control flags |
|  2 byte total length    |    |  2 byte total length    |
|  4 byte source addr     |    |  4 byte source addr     |
|  4 byte dest addr       |    |  4 byte dest addr       |
+-------------------------+    +-------------------------+
| ICMP - 8 bytes          |    | IPv6 - 40 bytes         |
+-------------------------+    |  6 byte control flags   |    
|                         |    |  2 byte payload length  |
|                         |    |  16 byte source addr    |
|                         |    |                         |
|                         |    |  16 byte dest addr      |
|                         |    |                         |
|                         |    +-------------------------|
|                         |    | ICMP - 8 bytes          |
|                         |    +-------------------------+
|                         |    |                         |
/ 1,464 ping payload      /    / 1,424 ping payload      /
|                         |    |                         |
+-------------------------+    +-------------------------+

And you see why i can only ping with a payload of 1,424 bytes.

share|improve this answer
add comment

The maximum transmission unit (MTU) of a communications protocol of a layer is the size in bytes of the largest protocol data unit that the layer can pass onwards. For the example of IP over DSL connections using PPPoA/VC-MUX, again choosing to fill 31 ATM cells as before, we obtain a desired optimal reduced MTU figure of 1478 = 31*48-10 taking into account an overhead of 10 bytes consisting of a Point-to-Point Protocol overhead of 2 bytes, and an AAL5 overhead of 8 bytes. This gives a total cost of 31*53=1643 bytes transmitted via ATM from a 1478 byte packet passed to PPPoA. In the case of IP sent over ADSL using PPPoA the figure of 1478 would be the total length of the IP packet including IP headers. So in this example, keeping to a self-imposed reduced MTU of 1478 as opposed to sending IP packets of total length 1500 saves 53 bytes per packet at the ATM layer at a cost of a 22 byte reduction of the length of IP packets.

RFC 2516 prescribes a maximum MTU for PPPoE/DSL connections of 1492 bytes: the 1500 byte maximum ethernet payload minus 8 bytes of PPPoE headers (2 bytes for the PPP overhead, and 6 bytes for the PPPoE header). This will not necessarily fill an integer number of ATM cells. The data link layer is layer 2 of the seven-layer OSI model of computer networking. It corresponds to, or is part of the link layer of the TCP/IP reference model. You do measure in layer 3, so that the difference is obvious. Because of the kind of network you are making use of 4 bytes are used for network management purposes.

share|improve this answer
add comment

Are you using DSL? The PPPoE header consumes 8 bytes.

share|improve this answer
add comment

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.