Eagor's Forums » CEN6520 - Project 2 » When is the segment put back together?
Author Topic: When is the segment put back together?
Steven Eagen
Posts: 14
  Date Posted: 2005-01-30 22:59

David Mauk asked:

When will we know that we have the completed segment put back together? (At the point when we see more-flag as 0?) What does that say about our design? Are we supposed to assuming that the fragments (from the same segment) will all come to us in order? (If a fragment is missing what do we do with the incomplete segment we are reassembling?)
 
jesse_sweetland
Posts: 14
Date Posted: 2005-01-31 06:54

I think reassembly should only happen on the client.

Communication between an edge router and its client should be no different than from one router to another router with one exception: the MTU is theoretically unlimited (65521 bytes in practice). The client should pass a fragment to the router containing a full header so that the router knows where to forward the data. If needed, the router then fragments the 1 "fragment" it receives from the client to accomodate the MTUs between it and other routers. If the MTU on the next hop is greater than or equal to the size of the incoming fragment, nothing needs to be done with that fragment--it can be passed along untouched. I think it would be too much overhead to have the routers attempt reassembly (fragment, reassemble, fragment, reassemble, fragment, reassemble, etc.). I think the last router should pass along the fragments it receives to the client for reassembly.

For example:

ClientA sends 500B segment as 514 byte fragment to Router1 (more flag = 0). The MTU between Router1 and Router2 is 100B, so the segment is broken into 6 fragments: 100B, 100B, 100B, 100B, 100B, and 84B (including 14B headers). The MTU between Router2 and Router3 is 150B, so Router2 makes no changes to the fragments and simply forwards them to Router3. The MTU between Router3 and ClientB is unlimited, so Router3 forwards the fragments unchanged to ClientB. ClientB then reassembles the fragments into the original segment.
Steven Eagen
Posts: 14
Date Posted: 2005-01-31 08:42

The program description states:

"A router is responsible for both fragmentation and reassembly of packets. Remember a packet
is not reassembled until it reaches its final destination router. Each router will maintain a routing table to facilitate routing and determine when fragmentation/assembly is necessary."
jesse_sweetland
Posts: 14
Date Posted: 2005-01-31 20:17

I stand corrected. The question now is how will a router know when to reassemble the fragments? It will need to know that it is an edge router and that it is communicating with a client. Based on the project description, I imagine we would just assume based on the names in the routing table...
Steven Eagen
Posts: 14
Date Posted: 2005-02-01 10:12

Using the first test case: Client 1 sends a segment to Client 3: segment size = 500 bytes.

Assuming we are only going to run clients on the same machine as the router they connect to is running on.

Using my routing table routing.txt

Client 1 sends a segment to coral which is A.
A sends fragments to C
C sends fragments to F
F sends fragments to E
E is our destination so reassemble packets.
E sends segment to client 3

Jesse broke down the fragmentation in this post.