546 views

Suppose a network:-

Suppose a TCP message contains 492 B of data and TCP header is of size 20B then deliver it to IP. IP header is 20 B.

Assume link A-R1 has the maximum frame size of 700 B including a frame size of 14 B, link R1-R2 can support a maximum frame size of 256 B including an 8 B of the frame header and link R2-B can support a maximum of 256 B including a 12 B frame header.

Then calculate the no of fragments at each link and show the format of fragments in each link.

0
Do R2 need to wait until all fragments  arrived or can it start sending the fregment as soon as it receives?
0
You can choose any of the options you want but that doesn't matter here as we are not calculating time.

TCP data size = 492 B
TCP header size = 20 B
IP header size = 20 B
So packet size = 492 B + 20 B + 20 B = 532 B

 20 B 512 B

Now our data will travel from A - R1

Maximum frame size allowed = 700 B (include frame header)
Frame Header Size = 14 B
So maximum packet size allowed = 700 B - 14 B = 686 B
Since 532 B < 686 B, so no need of fragmentation.

Now our data will travel from R1 - R2

Maximum frame size allowed = 256 B (include frame header)
Frame Header Size = 8 B
So maximum packet size allowed  = 256 B - 8 B = 248 B
Since 532 B > 248 B, so here we will do fragmentation

Maximum fragment data allowed = 248 B - 20 B = 228 B
But we know that fragment must carry data in multiple of 8.
So, First fragment will carry a data of 224 B and IP header of 20 B i.e 244 B
second second fragment will carry a data of 224 B and IP header of 20 B i.e 244 B
Third fragment will carry a data of 64 B and IP header of 20 B i.e 84 B

Now our data will travel from R2 - B

Maximum frame size allowed = 256 B (include frame header)
Frame Header Size = 12 B
So maximum packet size allowed = 256 B - 12 B = 244 B
Since 244 B = 244 B, so here we don't do any fragmentation

selected
0

Frame Header Size = 14 B

do you mean to say DLL header?
0
yes, frames are related with data link layer, that's why they have mention "maximum frame size including frame header" in question. So Frame header means DLL header.
0
We have a packet coming from the left side having an IP header of 20 B reaches to Router X, now on the right side of router X the IP header is of 40 B then before delivering this packet on the right side, router will first detached the IP header of the left's side network and then attach the IP header of 40 B of right's side and then deliver it to there.

Is the above working is true or false.
0
According to me, you can't change IP header size, What sender has sent, all of the field will be there in IP header.  IP header size increase if you add some more fields into header field, and i don't think, router will put anything new inside the IP header. So according to me IP header is fix, router can't specify he need IP header of 40 B, whenever we talk about MTU, we are taking about a packet as whole.
If you came across any such statement where it tells that router can change IP header size, do let me know as well.
+1

Router by taking the packet from the left side and check on the right side what is the MTU value and then set the DF and MF bit accordingly and it can also attach some option and padding bits so may be that is the reason why IP header size is different on either sides.

Secondly,

Since 532 B < 686 B, so no need of fragmentation

the criteria of comparison should be 512<666 i.e. excluding the IP header and compare on the fragment data part not whole fragment.

Packet View:-

 14 20 512

2 packets of

 8 20 224

and 1 packet of

 8 20 64

2 packets of

 8 20 224

and 1 packet of

 8 20 64

...

0

Maximum fragment data allowed = 248 B - 20 B = 228 B

why are you subtracting 20 B ?? 256-8 =248 is already a frame size then what is mean by 20 B here??

+1
Given is 256 B as FRAME size, not the PACKET size. And it include 8 B of FRAME header. So subtracting 8 gives 248 B which is IP PACKET size including IP HEADER, so subtracting 20 B from this which gives 228 B.

Mind the PDU's of the layer.

DLL -> FRAME

NETWORK LAYER -> PACKET.
0
Okk got it thank you
At $A$ only 1 segment $<frame \space header \space byte, data \space bytes>$ will be generated of the form $<14,532>$

At $R1$ $3$ segment $<frame \space header \space byte, data \space bytes>$ will be generated of the form $<8,248>, <8,248>, <8,36>$ After padding by $R1$ - $<8,40>$

At $R2$ $5$ segment $<frame \space header \space byte, data \space bytes>$ will be generated of the form $<12,240>, <12,240>, <12,8>, <12,8>, <12, 36>$ After padding by $R2$ - $<12,40>$
edited by
+1
At R1 3rd packet should be <8,40> but not <8,36> because 36 is not multiple of 8. similarly 5th packet at R2 also. To do this we need to add 4 padding bits in both the packets.

As soon as we add padding bits the data size at R1 is increased by 1. and need adjustment.
0
I think $R2$ & $R3$ will pad we don't need to change bytes at R1. Right?
0
You mean to say link L2 and L3 because we dont have router R3.

right
0
@Bikram Sir, @Aghori I have few doubts regarding this question and they are

1. Host is which layer device?

2. If host is not layer 3 device then why it is given in the question IP header is of 20 bytes. If it is level 3 device the why we not attach while sending it on link 1.
+1
host is another name of system/computer/user machine.
0
agree and which layer computer is?
0
Personal Computer is not a connecting device to be eligible for a layer device. Connecting devices are layering devices. In any case, I think you can simulate computer to behave like any connecting device. IMO.
0
Yeah, we can simulate our Pc computer/ laptop by turning them into a mobile hotspot, then they will also behave like connecting device.

I think they support from Application layer through Transport layer and then after segment( in TCP) or datagram(in UDP) they are transfered to router then router encapsulate the whole segment/ datagram into packet by attaching them with IP header, and then followed by datalink layer and then physical layer.
0

which layer computer is?

It is in Physical layer.

0
@Bikram Sir, by "router is layer 3 device" does it mean to say data will pass from physical layer to network layer and then return to physical layer?
0

data will pass from physical layer to network layer and then return to physical layer?

yes, we can think like this..

1
2