in Computer Networks edited by
23,019 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

4 Comments

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

32 Comments

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

Please clarify 

0
0

Is there any question of similar type ?

0
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
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 ..
0
0
The packets will be reassembled at the Destination, not at the routers.
5
5
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
0
0
its 512kbps in statement and 512Mbps in diagram
1
1
@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?
1
1
What does the line " Consider only data packets" mean in this question???
2
2
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
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
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.
9
9

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

I did it in following way, since fragmentation is done by source router before sending to network B. Correct me if my concept is wrong.

0
0

Here, 

the bandwidth is only given to confuse the students, solve it like this.

1.  At network A,

     180 bytes + 20 bytes (TCP header) + 20 bytes (IP header)=220 bytes.

data travels from A to B,

2. At network B,

    As MTU is 100 bytes , it will divide the packets according to its capability.

     Also, here the 20 bytes of TCP header is not removed since

     "TCP IS ON TRANSPORT LAYER AND IT IS A PORT TO PORT  PROTOCOL OR END TO END DELIVERY SO TCP HEADER  CAN ONLY BE MODIFIED  BY THE RECEIVER OR SENDER"

     so the packets are divided into,

      80bytes+20 bytes IP header, 80 bytes payload +20 IP header ,40 bytes payload+20 IP header 

      =260

3. Sent to network C

 so C gets 260 bytes of data.

 

 

      

2
2
In some questions and also in general we don't consider the TCP header as fragmentation is done at the network layer. But here we are adding the TCP header to the calculation. What should be the reason?
1
1
Why does Network B remove the 20Bytes IP header?

Please do reply.
0
0
Since when Network A sends the packet, it sets the destination address to C, but at network B it is removed since now due to fragmentation, packet is divided and now, new packet which is formed by B will have a new source address which is B and new destination address which is C. I hope this clears your doubt.
0
0
Ok. So, B will subsequently add a new header with updated source address and destination address and send the packet to C.

Is my interpretation right?
0
0
Yes.
0
0
Thank you:)
0
0
@Arjun sir, what if Network C has max. packet size =100 bytes instead of Network B.?
0
0
Here only the data packets are considered, right? But 260 bytes includes the IP header also, shouldn’t it be 200? @Arjun sir, @dd sir
1
1
Can we say that the extra overhead caused by fragmentation is 60B?
0
0

@Abhrajyoti00 overhead due to “fragmentation”  should be 40B only as 20B IP header was already present on the packet.

1
1

@JAINchiNMay Oh yes :)

0
0

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

hey someone tell me what is this??? What if 1mb follows 512kb

0
0

@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