159 views
Consider a TCP message that contains 1024 bytes of data and 20 bytes of TCP header is passed to IP for delivery across two networks interconnected by a router (i.e., it travels from the source host to a router to the destination host). The first network has an MTU of 1024 bytes and the second has an MTU of 576 bytes. If all packets are correctly delivered, the number of bytes, including headers, are delivered to the IP layer at the destination for TCP message, in the best
case is _________ bytes. (Assume all IP headers are 20 bytes)
| 159 views
0
1124 Bytes?
0
How??
0
I was considering segmentation of the data at L4 also... but since the question is asking about the best case, so we need not consider that. magma soln is correct with a edit that 1044B goes to IP of sender insead of 1024B.

+1 vote

At sender A to Router :

TCP data={1024+20}=1044

IP= packet 1(1004+20) , packet 2(40+20)    {here MTU is 1024}

Router To Receiver : now router send data to receiver according to MTU

Packet11 (556+20) ,  Packet12 (448+20) , Packet 2(40+20)    (here packet 1 coming from sender is divided into two packets {Packet11 and Packwt12} and packet 2 is send same because packet 2 has less then MTU)

so data recieved at reciever IP layer={556+20+448+20+40+20=1104 B}

by Active (3.4k points)
selected
0

answer  got is right but you have done several  mistake

you calculated that

TCP data={1024+20}=1044   this is right but

------------------------------------------------------------------------------------------------------------------------------------------

IP= packet 1(1004+20) , packet 2(40+20)    {here MTU is 1024}   this is wrong

-------------------------------------------------------------------------------------------------------------------------------------------

why?

because in packet 1 (1004+20) (actually it is fragment 1 you have written it packet ) and 1004 is not divisible by 8 so to make it divisible by 8 we take first fragment (1000+20)=1020 and second fragment (44+20) you should not one thing that there is no need to make the last fragment data  divisible by 8

same should be done at router also and calculate further you will get same final answer that is 1104

if you did not understand than goto this link

https://gateoverflow.in/206387/fragmentation

0
Can you please explain why are we not adding padding bits in the last fragment to make it a multiple of 8?
0
we do the padding so that in the next fragment we can write offset  which should be divisible  by 8. but the length of last fragment we dont need to write anywhere

moreover last fragment length is calculated =total length - sum of all fragment length
+1 vote

Ans : 1084  B

by Boss (13.6k points)
0
But the given ans is 1104 bytes......
0
1024+20 is passed to IP for delivery. So adding that would give 1104B ans.
0
How 1024+20 I could not get you .Please elaborate

1