in Computer Networks edited by
23,014 views
66 votes
66 votes

Consider three IP networks $A, B$ and $C$. Host $H_A$ in network $A$ sends messages each containing $180$ bytes of application data to a host $H_C$ in network $C$. The $\text{TCP}$ layer prefixes $20$ byte header to the message.

This passes through an intermediate network $B$.The maximum packet size, including $20$ byte IP header, in each network is:

  • A: $\text{1000 bytes}$
  • B: $\text{100 bytes}$
  • C: $\text{1000 bytes}$

The network $A$ and $B$ are connected through a $1$ Mbps link, while $B$ and $C$
 are connected by a $512$ Kbps link (bps = bits per second).        

Assuming that the packets are correctly delivered, how many bytes, including headers, are delivered to the $IP$ layer at the destination for one application message, in the best case? Consider only data packets.

  1. $200$
  2. $220$
  3. $240$
  4. $260$
in Computer Networks edited by
23.0k views

23 Comments

edited by
Can we say the rate at which application data is transferred = application data / total time taken for it to reach host C ?

 

Here are two method which comes in my mind.

Method 1.

application data = 180 Bytes

and total time taken for it to reach host C = Tab + Tbc

Tab = 220*8/1M

Tbc = (100 + 100 + 60 )8/0.5M

Effective Rate ac = 180*8 / Tac = 180/ (220+260*2)  Mbps = 180/740 Mbps = 243 Kbps

or

Method 2

Effective Rate = useful data/ total data * rate of slowest link (512 Kbps) = 180 / 260 * 512 = 354 Kbps

@Arjun Sir plz reply.
5
5
Method 2 only. We don't need to consider the first part time as data from A-B will get accumulated in B.
8
8
Thanks  @Arjun :)
0
0
@Arjun Sir, will result be the same if we consider first link to be of 512kbps while second one to be of 1mbps?? I mean , in this situation packets won't be accumulated at B...so... So I mean , do we need to consider slowest among two links in this situation also??
1
1
@Tushar: No, then we will consider 1 Mbps line bandwidth. Since question is asking data rate at which application data is tranferrred to host Hc. You may ask why not  then consider time of 512kbps line but then what about time taken by packets to travel within the Networks. Also in Network B, packets got fragmented but at the end of Network B packets will get combined again for sending to another network.
1
1
but rate of slowest link is 1mbps right??
0
0
@Arjun Sir, what if network B has max packet size of 1000 B then we will wait for entire packet to reach and then we will add time for transmission through 512kbps????
0
0
how can we ignore time from a to b if data gets accumulated in b?
0
0

This might help in visualising

64
64
Effective Rate = useful data/ total data * rate of slowest link (512 Kbps) = 180 / 260 * 512 = 354 Kbps.

Is this correct formula ? Do we always need to multiply rate of slowest link by efficiecy ?
0
0
Why defragmentation is not done at b itself.
0
0
Data should be divisible by 8, but 180 is not divisible by 8.
0
0
A send data 200(data+TCP header) not 180
0
0

  Why network layer's header is not added in network B

1
1
How is the 20 bytes of TCP Header distributed in the three packets in network B ?? Shouldn't it be present in all the three packets ?? or is it present in a single packet ??
1
1
So, the link bandwidths of $1 Mbps$ and $500 Kbps$ are totally unnecessary to solve the question since $B$ cannot handle packets larger than $100$ Bytes right?

They would need to be considered if the MTU in network $B$ was larger than $512 Kbps$ .

No one cares.
0
0
edited by
2
2
why 80+20,80+20,40+20???

mtu of b= 100 byte and it is not dividing by 8 so we should consider 96, 96,8? please someone clarify
1
1
data is not being fragmented at network A as it’s mss is 1000
0
0
if we do defragmentation at every node, the message you are sending on whatsapp will get delivered tomorrow.
1
1
Right
0
0
Tcp header goes with first packet
0
0
Data+header=100 byte,so data =80 as 20 byte header
0
0

3 Answers

85 votes
85 votes
Best answer
Packet $A$ sends an $IP$ packet of $180$ bytes of data $+ 20$ bytes of TCP header $+ 20$ $bytes$ of IP header to $B$.

$IP$ layer of $B$ now removes $20$ $bytes$ of $IP$ header and has $200$ bytes of data. So, it makes $3$ IP packets - $[80 + 20,  80 + 20 , 40 + 20]$ and sends to $C$ as the Ip packet size of $B$ is $100$. So, $C$ receives $260$ bytes of data which includes $60$ bytes of $IP$ headers and $20$ bytes of TCP header.

For data rate, we need to consider only the slowest part of the network as data will be getting accumulated at that sender (data rate till that slowest part, we need to add time if a faster part follows a slower part).

So, here $180$ bytes of application data are transferred from $A$ to $C$ and this causes $260$ $bytes$ to be transferred from $B$ to $C$.

Correct Answer: $D$
edited by
by

4 Comments

@RamaSivaSubrahmanyam It simply means that if you have many networks with different bandwidths, then take the slowest bandwidth as the bottle neck bandwidth

0
0

Hey! I am asking this" data rate till that slowest part, we need to add time if a faster part follows a slower part"  .

it's well known that if two buckets maintains two different rates slowest rate will be the output rate...

but i need above one... 

0
0
No ACK packets to be consider
0
0
21 votes
21 votes

Explanation: Network B receives 220 bytes of data (180 bytes of application layer data + 20 bytes of TCP header + 20 bytes of IP header) from network A. As maximum packet size of network B is 100 bytes (data of 80 bytes + 20 bytes IP header), for network B, out of 220 Bytes, 200 bytes would be of data or payload (180 bytes of application layer data + 20 bytes of TCP header) and 20 bytes of IP header. Network B now removes the 20 bytes header. Out of 200 bytes of data, it uses 80 bytes of data. Thus 1st packet leaving B would be of 100 bytes (Data: 80 bytes, IP header: 20 bytes). Now we have 120 bytes of data remaining. Thus the 2nd packet leaving B would be of 100 bytes (Data: 80 bytes, IP header: 20 bytes). Now we have 40 bytes of data remaining. Thus the 3rd packet leaving B would be of 60 bytes (Data: 40 bytes, IP header: 20 bytes).

Hence, total of 100 + 100 + 60 bytes = 260 bytes would be received by the destination.

4 Comments

Why IP network B removes the header but dont put it back
1
1
fragmentation and de-fragmentation both must be done by network B.

but here why is it done only at the destination?
0
0
Why the defragmentation is not done when packet is leaving the network B. Why the defragmentation is done only at sender.
0
0
nice explanation!!
1
1
7 votes
7 votes
180B application data + 20B TCP header = 200B
For network layer, 200B data is to be sent with 20B header in each packet.

No problem with A, C.
B has maximum packet size 100.

We will split  200 as  80+80+40
(80+20), (80+20), (40+20)= 260  (Ans)
by

4 Comments

@Ahwan

Can you please let me know that why defragmentation is not done at b itself. Why we are doing the degragmentation at the destination.
0
0
Defragmentation can't be done at middle of the path because multiple packets may take different paths but finally reaches to the destination, that's the reason reassembly algorithm will be applied at destination only.
1
1
Why are we removing the IP header at B?
2
2
At network B we have to do the fragmentation because data coming from network A to network B is of 220 bytes (180 bytes+ 20 bytes IP header + 20 bytes TCP header) and maximum transmittable unit at network  B is 100 bytes (i.e. IP header =20 bytes and Payload =80 byes) In fragmentation we have to consider only payload {Since network B got 220 bytes from network A therefore ip header=20 bytes payload=200 bytes} according to payload size we should  perform fragmentation {actually we are not removing ip header we are just not considering it in fragmentation process that means in each fragmented packets payload size should not exceeds than 80 bytes and payload size of all fragmented packets total should be 200 bytes} So, network B fragment data like [80+20,80+20,40+20] {where no fragmented packet payload size exceeds than 80 bytes and payload size of all fragmented packets put together=200 bytes}

Here actually network A sends packet with one ip header to B but cause fragmentation at network B total 3 headers (in which 2 headers are overhead) added ( because each fragment going to have ip header cause of datagram service) that is an overhead. that’s why even 180 bytes of application data are transferred from A to C but network C receives ( 80+20+80+20+40+20 =260 bytes ) because of overhead that arises cause of fragmentation
0
0
Answer:

Related questions