Take the 2-minute tour ×
Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

I heard routers alone do fragmentation. When a host is connected to the network with ethernet cable, how does it keep the MTU size as 1500? Will the host itself fragment and send only 1500 byte payloads in the ethernet cable?

share|improve this question
add comment

1 Answer 1

IPv6 Fragmentation

Only IPv6 hosts can fragment (ref RFC 2460 - IPv6 Specification, Section 4.5):

4.5 Fragment Header


   The Fragment header is used by an IPv6 source to send a packet larger
   than would fit in the path MTU to its destination.  (Note: unlike
   IPv4, fragmentation in IPv6 is performed only by source nodes, not by
   routers along a packet's delivery path -- see section 5.

IPv4 Fragmentation

IPv4 hosts optionally may fragment (ref RFC 1122 - Internet Host requirements, Section 3.3.3), and IPv4 routers must perform fragmentation.

Quoting RFC 1122 - Internet Host requirements, Section 3.3.3:

3.3.3  Fragmentation

         Optionally, the IP layer MAY implement a mechanism to fragment
         outgoing datagrams intentionally.

Quoting RFC 1812 - IP Router Requirements, Section 4.2.2.7

4.2.2.7 Fragmentation: RFC 791 Section 3.2


   Fragmentation, as described in [INTERNET:1], MUST be supported by a
   router.

Example:

It's fairly easy to illustrate how hosts fragment... for instance ping an internet host with a very large ping size (>1500 bytes)...

In terminal 1:

[mpenning@Bucksnort ~]$  ping -c 1 -s 65507 4.2.2.2

In terminal 2:

[mpenning@Bucksnort ~]$ sudo tshark -n -i eth0 icmp
  1   0.000000 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=0)
  2   0.000058 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=1480)
  3   0.000071 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=2960)
  4   0.000081 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=4440)
  5   0.000094 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=5920)
  6   0.000105 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=7400)
  7   0.000116 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=8880)
  8   0.000124 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=10360)
  9   0.000133 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=11840)
 10   0.000143 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=13320)
 11   0.000152 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=14800)
 12   0.000162 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=16280)
 13   0.000172 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=17760)
 14   0.000181 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=19240)
 15   0.000191 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=20720)
 16   0.000201 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=22200)
 17   0.000211 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=23680)
 18   0.000221 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=25160)
 19   0.000230 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=26640)
 20   0.000240 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=28120)
 21   0.000250 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=29600)
 22   0.000259 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=31080)
 23   0.000269 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=32560)
 24   0.000278 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=34040)
 25   0.000288 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=35520)
 26   0.000298 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=37000)
 27   0.000308 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=38480)
 28   0.000318 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=39960)
 29   0.000327 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=41440)
 30   0.000337 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=42920)
 31   0.000352 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=44400)
 32   0.000361 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=45880)
 33   0.000372 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=47360)
 34   0.000384 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=48840)
 35   0.000394 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=50320)
 36   0.000403 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=51800)
 37   0.000411 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=53280)
 38   0.000419 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=54760)
 39   0.000428 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=56240)
 40   0.000437 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=57720)
 41   0.000446 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=59200)
 42   0.000455 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=60680)
 43   0.000466 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=62160)
 44   0.000477 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=63640)
 45   0.000486 192.0.2.3 -> 4.2.2.2 ICMP Echo (ping) request
 46   0.044402 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=0)
 47   0.044439 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=1480)
 48   0.044899 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=2960)
 49   0.044910 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=4440)
 50   0.044916 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=5920)
 51   0.045149 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=7400)
 52   0.045399 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=8880)
 53   0.045409 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=10360)
 54   0.045415 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=11840)
 55   0.045649 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=13320)
 56   0.045899 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=14800)
 57   0.045908 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=16280)
 58   0.045915 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=17760)
 59   0.046148 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=19240)
 60   0.046163 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=20720)
 61   0.046402 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=22200)
 62   0.046421 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=23680)
 63   0.046650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=25160)
 64   0.046668 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=26640)
 65   0.046901 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=28120)
 66   0.046918 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=29600)
 67   0.047151 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=31080)
 68   0.047171 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=32560)
 69   0.047399 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=34040)
 70   0.047418 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=35520)
 71   0.047424 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=37000)
 72   0.047650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=38480)
 73   0.047900 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=39960)
 74   0.048149 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=41440)
 75   0.048165 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=42920)
 76   0.048172 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=44400)
 77   0.048178 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=45880)
 78   0.048398 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=47360)
 79   0.048650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=48840)
 80   0.048667 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=50320)
 81   0.048674 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=51800)
 82   0.048900 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=53280)
 83   0.048922 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=54760)
 84   0.049150 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=56240)
 85   0.049174 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=57720)
 86   0.049398 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=59200)
 87   0.049649 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=60680)
 88   0.049671 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=62160)
 89   0.049677 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=63640)
 90   0.049683 4.2.2.2 -> 192.0.2.3 ICMP Echo (ping) reply
share|improve this answer
    
Most modern OS do IPv4 path MTU discovery and thus set the Don't Fragment flag to all outgoing packets. –  BatchyX Apr 7 at 17:23
    
So when at host ., when i ping a very large packet ., it does fragment to default gateway?? –  Jinga Apr 7 at 17:24
    
@BatchyX, the question is not whether hosts perform PMTUD, it's whether they can fragment. –  Mike Pennington Apr 7 at 17:24
    
@Jinga, that is correct; if you ping with a large ping size, and request fragmentation then the ping will be fragmented to the MTU of your local link. –  Mike Pennington Apr 7 at 17:26
1  
@BatchyX, PMTUD is not in question here. FYI, my linux servers poll with SNMP all day long and DF is not set on these UDP frames; thus, your statement about DF being set on all frames is patently false. Please stop confusing the issue with extraneous PMTUD information. –  Mike Pennington Apr 7 at 17:44
show 1 more 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.