user2818969
user2818969

Reputation: 57

Why the size of data link layer protocol header is not included?

Consider three IP networks A, B and C. Host HA in networks A sends messages each containing 180 bytes of application data to a host HC in network C. The TCP layer prefixes a 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 : 1000 bytes B : 100 bytes C : 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).

    Q). 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. 
    (a) 200
    (b) 220
    (c) 240
    (d) 260

I came across many solution to this problem they are not considering eathernet header or something else at data link layer.A similar solution is given below

(D) Data from network A = 180 bytes application data + 20 bytes TCP header + 20 bytes IP header. IP header will get stripped off in network B. Thus, B will split (180 + 20) bytes = 200 bytes of data in 3 segments, viz. (80 + 80 + 40) to allow room for 20 bytes IP header. Thus, total IP header overhead = (20 * 3) bytes = 60 bytes. Total data to be delivered to network C = (80 + 80 + 40 + 60) bytes = 260 bytes.

Upvotes: 0

Views: 3741

Answers (2)

Sahil Singh
Sahil Singh

Reputation: 3787

The key here is to understand that IP uses non transparent fragmentation, thus when a 220 byte packet [20 byte network layer header+20 byte transport layer header+180 byte application data] Enters network B, because of maximum packet size being 100 bytes in network B, It gets fragmented. For the network layer the 200 byte portion [20 byte tcp header and 180 byte application data] will be the data portion since network layer doesn't bother about headers of layers above it. Thus in network B the 220 byte packet is fragmented as: 220[20|200]=100[20|80]+100[20|80]+60[20|80]

Now when these fragments leave network B and enter network C, even though Network C can support larger packet size, these packets are not reassembled by Network B because of non transparent fragmentation. Thus the host in network C receives 3 fragmnets and thus 100+100+60=260 bytes.

Tip: IP uses non transparent fragmentation. ATM uses transparent fragmentation. Thus ans would have been different if the networks were ATM networks.

Upvotes: 0

Barmar
Barmar

Reputation: 780787

The question says:

how many bytes ... are delivered to the IP layer

The link layer header is stripped off before deliverying the frame to the IP layer, so you don't need to count it.

Furthermore, the question didn't say what link layer is being used, so how could you possibly know how big its header is?

Upvotes: 2

Related Questions