3

I've been studying Software-defined networking and I have this question: Assume we have a topology of 2 hosts and 2 routers:

[H1]---->(R1)----->(R2)----->[H2]

A message M from H1 is ready to be tramsmitted to H2 so it is divided into P packets such that each p_i = M/P. When the first packet arrives to the first router R1, is there a way to determine the total number of remaining packets generated by the application on H1 given only the first packet p1.

1 Answer 1

2

The ability to determine how many more packets are expected is determined by the transport-layer protocol, or the application-layer protocols (off-topic). For instance, UDP is a best-effort, fire-and-forget, transport-layer protocol which has no such ability because the receiving UDP is not even really expecting to receive any more packets; that would be up to the application-layer protocol (off-topic).

A message from an application will be divided into segments by the transport-layer protocol. The segments, including the transport-layer header must fit in the payload of a packet of MTU size, which must then fit within the payload of a frame for the link.

You need to know the header size of the transport-layer protocol, and the payload size of the network protocol for that link type in order to determine how many packets are needed for the message.

It can get messier if one of the links in the path has a smaller MTU size than the original link. This can cause fragmentation where the larger packets need to be fragmented to traverse the link. The receiving host will need to reassemble the packets making up the fragments of the original packets. Each fragment is a packet, so are you counting them as packets?

2
  • You mentioned It can get messier if one of the links in the path has a smaller MTU size than the original link. This can cause fragmentation where the larger packets need to be fragmented to traverse the link. This implies the intermediate router should do the fragmentation but routers do not deal with transport layer, right ?
    – Mide
    Commented Jan 13, 2016 at 16:47
  • The routers strip off the frames to get to the packets, but they don't normally look at the transport layer (there are some exceptions like QoS). The router will fragment any packets (except those with the DF bit set) in order to send across a link with an MTU too small for the original packet. The router then calculates a new frame for the new link and applies to to any packets (including fragment packets) it send out the new link.
    – Ron Maupin
    Commented Jan 13, 2016 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.