0

Reading about IP fragments found controversy between various teaching materials.

In book:

"Fragments need to be reassembled before they reach the transport layer at the destination."

"The designers of IPv4 felt that reassembling datagrams in the routers would introduce significant complication into the protocol and put a damper on router performance."

Online found at: http://www.wildpackets.com/resources/compendium/tcp_ip/ip_fragmentation

"Once the data reaches Router #2, it will then perform reassembly of the fragments exactly as previously described and pass the reassembled block of data onto the network with the new MTU"

One source says that reassembly happens at the destination host at network layer before passing extracted payload from reassembled IP datagram to transport layer.

Another says that router reassembles fragments into whole IP datagram and passes it to yet another router.

Where the reassembly really happens? Thanks.

Bulat M.
  • 117
  • 1
  • 6
  • It's quite clear that the final destination is the only one in a position to reliably reassemble fragmented packets, as it's not guaranteed that the MTU of the destination network is large enough for the packet size. – Sven Dec 19 '16 at 12:17

1 Answers1

0

Routers fragment packets, but they don't actually reassemble the fragments; that is up to the destination device. RFC 791, Internet Protocol, leaves open the possibility of routers doing reassembly, but that doesn't happen in practice, unless the router is the packet destination.

RFC 791, Internet Protocol, Section 3.2, Discussion:

The basic internet service is datagram oriented and provides for the fragmentation of datagrams at gateways, with reassembly taking place at the destination internet protocol module in the destination host. Of course, fragmentation and reassembly of datagrams within a network or by private agreement between the gateways of a network is also allowed since this is transparent to the internet protocols and the higher-level protocols. This transparent type of fragmentation and reassembly is termed "network-dependent" (or intranet) fragmentation and is not discussed further here.


Of course this only pertains to IPv4. IPv6 doesn't allow for router fragmentation.

Ron Maupin
  • 3,158
  • 1
  • 11
  • 16
  • There are exceptions to this, such as the configurable option to reassemble fragments at the egress of an IPSec tunnel. You might want to reassemble because most enterprise firewalls are configured to drop fragments and in this case you know where they were fragmented. Generally any device that performs reassembly is exposed to fragmentation attack. You would not want this vulnerability in your routers so you want them to pass fragments without re-assembly. Also, packets may be dropped at any point in a network. Why waste CPU doing more to a packet when it might not reach its destination? – marctxk Dec 19 '16 at 12:28
  • @Ron, why would router reassemble fragments into packets if it is not destination host and what is the purpose of it? "leaves open the possibility of routers doing reassembly" – Bulat M. Dec 19 '16 at 12:45
  • Did you read what I quoted? That is directly from the RFC. – Ron Maupin Dec 19 '16 at 12:53