The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+25 votes
4.7k views

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$
asked in Computer Networks by Veteran (59.4k points)
edited by | 4.7k views
+3
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.
+3
Method 2 only. We don't need to consider the first part time as data from A-B will get accumulated in B.
0
Thanks  @Arjun :)
+1
@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
@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.
0
but rate of slowest link is 1mbps right??
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
how can we ignore time from a to b if data gets accumulated in b?
+10

This might help in visualising

0
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 ?

3 Answers

+37 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.
answered by Veteran (342k points)
edited by
0

here it is 512Mbps given, 260 * 8/(512 * 1000)  shouldn't this be  260 * 8/(512 * 1000000)?

Please clarify 

0

Is there any question of similar type ?

0

@Arjun sir,

rate at which application data is transferred to host Hc, thats why we have considered bandwidth between HB and HC.

is it correct ?

0
As, Host C is inside network C, Shouldn't the router at the beginning of Network C  combine those 3 packets as the capacity of Network C is 1000 Bytes ?  So, Host C receives 220 Bytes total ..
+1
The packets will be reassembled at the Destination, not at the routers.
0
Why are the data rates given at all, since they are not asking anything related to that ?

They are only asking how many total bytes will be transferred to the IP layer of the destination in order to deliver 180 bytes of Application data, which is obviously as answered will be 260 bytes.

@Arjun sir
+1
its 512kbps in statement and 512Mbps in diagram
0
@Arjun Sir,

When n/w B receives the 220 bytes of packet and remove the IP header, then it will have 200 TCP data(data+TCP header). So when n/w B will create the packets, don't you think this tcp header should be replicated to all the packets.

So each packet will be (60+20 byte tcp header+20 byte ip header), (60+20 byte tcp header+20 byte ip header), (60+20 byte tcp header+20 byte ip header).

Can you please tell me where I am wrong here?
0
What does the line " Consider only data packets" mean in this question???
0
To calculate throughput, what will be the size of useful data? Will it be 180B ( application layer data) or 200B (payload of IP datagram)?

Thanks.
0
I Still didn't got the reason why

"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) "

I mean from A to B we are sending data and that is also taking some time. Then why aren't we considering that time?
+1
@Ayush if we have 2 buckets and water is flowing is through them. If 2nd bucket is of smaller capacity than 1st one and it's below 1st then the speed of water will be limited by the smaller bucket right? Same is the case here.
0

 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

should be $[80 + 20,  80 + 20 , 40 + 20]$ right?

@Arjun sir

0
What if the Bandwidth are reversed is the case (in place of 1Mbps given is 512kbps and vice versa)then also, do we need to consider bottleneck bandwidth only or how?
+7 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.

answered by Loyal (8.6k points)
0
Why IP network B removes the header but dont put it back
0
fragmentation and de-fragmentation both must be done by network B.

but here why is it done only at the destination?
+3 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)
answered by Boss (10.3k points)
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

35,528 questions
42,803 answers
121,624 comments
42,167 users