When a router receives a padded 64 byte Ethernet II(aka DIX) frame and it needs to send this over an dot1q sub-interface, then router will add a new Ethernet II header, IEEE 802.1q field and recalculate the FCS. The question is, should router put a 64 byte frame onto wire or 68 byte frame? For example router receives an ICMP "echo request" message which has 6+6+2 byte DIX header, 20 byte IPv4 header, 8 byte ICMP header, padding of zeros for 14 bytes and then the 4 byte FCS. Now if the router will forward this frame over 802.1q sub-interface, which means that 4-byte 802.1q field is added, then should the router preserve all the padding and send 68 byte frame to wire or should it cut off 4-bytes of padding and send the 64 byte frame? A reference to RFC would be great.
Ethernet – Length of 64 byte padded Ethernet II(aka DIX) frame after 802.1q payload is added
ethernetprotocol-theory
Related Solutions
Responding to individual concerns in the post...
Regarding Path MTU Discovery
Ideally i would be relying on Path MTU discovery. But since the ethernet packets being generated are too large for any other machine to receive, there is no opportunity for IP Packet too big fragmentation messages to be returned
Based on your diagram, I agree that PMTUD cannot function between two different PCs in the same LAN segment; PCs do not generate ICMP Error messages required by PMTUD.
Jumbo frames
Some vendors (such as Cisco) have switch models which support ethernet payloads larger than 1500 bytes. Officially IEEE does not endorse this configuration, but the industry has valid needs to judiciously deviate from the original 1500 byte MTU. I have storage LAN / backup networks which leverage jumbo frame for good reason; however, I made sure that all MTUs matched inside the same vlan when I deployed jumbo frames.
Mismatched MTUs within a broadcast domain
The bottom line is that you should never have mismatched ethernet MTUs inside the same ethernet broadcast domain; if you do, it's a bug or configuration error. Regardless of bug or error, you have to solve these problems, sometimes manually.
All that discussion leads to the next question...
Why is there a spec that intentionally creates invalid ethernet frames?
I'm not sure that I agree... I don't see how the IEEE 802.3 series, or RFC 894 create invalid frames. Host implementations or host misconfigurations create invalid frames. To understand whether your implementation is following the spec, we need a lot more evidence...
This diagram is at least prima facie evidence that your MTUs are mismatched inside a broadcast domain...
+------------------+ +----------------+ +------------------+
| Realtek PCIe GBe | | NetGear 10/100 | | Realtek 10/100 |
| (on-board) | | Switch | | (on-board) |
| | +----------------+ | |
| Windows 7 | ^ ^ | |
| | | | | |
| 192.168.1.98/24 |-----------+ +------------| 192.168.1.10/24 |
| MTU = 1504 bytes | | MTU = 1500 bytes |
+------------------+ +------------------+
How should an 802.3-compliant implementation respond to MTU mismatches?
What was it they [the writers of 'the spec'] expected people to do with devices that generate these too large packets?
MTU 1504 and MTU 1500 within the same broadcast domain is simply a misconfiguration; it should never be expected to work any more than mismatched IP netmasks, or mismatched IP subnets can be expected to work. Your company will have to knuckle-down and fix the root-cause of the MTU mismatches... at this time it's hard to say whether the root cause is user error, an implementation bug, or some combination of the above.
If the affected Windows machines are successfully logging into to an Active Directory Domain, one could write Windows login scripts to automatically fix MTU issues based on some well-constructed tests inside the domain login scripts (assuming the Domain Controller isn't part of the MTU issues).
If the machines are not logging into a domain, manual labor is another option.
Other possibilities to contain the damage
Use a layer3 switchNote 1 to build a custom vlan for anything that has broken MTUs and set the layer3 switch's ethernet MTU to match the broken machines; this relies on PMTUD to resolve MTU issues at the IP layer. Layer3 switches generate the ICMP errors required by PMTUD.
This option works best if you can re-address the broken machines with DHCP; and you can identify the broken machines by mac-address.
... why did they bump it up to 1504 bytes, and create invalid packets, in the first place?
Hard to say at this point
802.1ad vs 802.1q
How is IEEE 802.1ad (aka VLAN Tagging, QinQ) valid, when the packets are too large?
I haven't seen evidence so far that you're using QinQ; from the limited evidence I have seen so far, you're using simple 802.1q encapsulation, which should work correctly in Windows, assuming the NIC driver supports 802.1q encap.
End Notes:
Note 1Any layer 3 switch should do... Cisco, Juniper, and Brocades all could perform this kind of function.
Router will respond with ICMP and drop the packet if it can't fragment the packet further, or it's prohibited to do so with the Don't Fragment bit set.
And yes, as you pointed out, PMTUD often breaks in real world, as people do filter ICMP messages - either in transit, or at their internet edges, shooting themselves in the foot.
Here's a great writeup on PMTUD and fragmentation for your reference: http://www.cisco.com/c/en/us/support/docs/ip/generic-routing-encapsulation-gre/25885-pmtud-ipfrag.html
Related Topic
- Ethernet – Minimum possible size of Ethernet/IGMP frames
- Ethernet – RS_FEC OVERHEADS ON 25GBASE-R
- Ethernet – What all fields is the FCS/CRC in the trailer of the ethernet frame calculated over
- Ethernet – Confusions regarding byte and bit ordering of Ethernet Frame
- Ethernet – What exactly is fragment free switching
- Ethernet – what’s the difference between trailer and padding field in ethernet frame captured by wireshark
Best Answer
Routers work at layer-3. Your ICMP message would be extracted from it's layer-2 container (which is bigger than the l3 payload) and processed as such. The next-hop would be presented 28 bytes to be encoded for whatever layer-2 it might be. Thus, in theory, a 64byte padded frame would be transmit.
In a switch, yes, an 802.1q tag would be inserted into the otherwise as-is frame. (adding 4 bytes.)