- Get link
- X
- Other Apps
Suppose a message of size 15000 bytes is transmitted from a source to a destination using IPv4 protocol via two routers as shown in the figure. Each router has a defined maximum transmission unit (MTU) as shown in the figure, including IP header. The number of fragments that will be delivered to the destination is ______. (Answer in integer)
The correct answer is 7.
The initial 15000-byte message is fragmented by Router-1 (MTU=5000) into 4 packets. When these 4 packets reach Router-2 (MTU=3000), the three large packets are too big and must be re-fragmented into 2 packets each (3x2=6). The last small packet passes through without change. The total fragments arriving at the destination are 6 + 1 = 7.
This problem requires understanding how IP packets are fragmented when they encounter a network link with a smaller Maximum Transmission Unit (MTU). We will track the message as it passes through each router.
Key Assumptions
- IPv4 Header: We assume a standard IPv4 header of 20 bytes (as no options field is mentioned).
- MTU Includes Header: The problem states the MTU includes the IP header. This means the total size of a packet (Header + Data) cannot exceed the MTU.
- Data Payload: The maximum data a single fragment can carry is
MTU - Header Size. While technically the data size must be a multiple of 8, for most GATE problems this can be ignored unless it's critical. We will proceed with the simpler calculation, which yields the correct answer.
Fragmentation at Router-1 (MTU = 5000 bytes)
The first router, R1, receives a large datagram carrying 15000 bytes of data.
Number of fragments needed to carry 15000 bytes:
= ceil(15000 / 4980) = ceil(3.012...) = 4 Fragments
The fragments created by R1 are:
- Fragment 1: 4980 bytes data + 20 byte header = 5000 bytes
- Fragment 2: 4980 bytes data + 20 byte header = 5000 bytes
- Fragment 3: 4980 bytes data + 20 byte header = 5000 bytes
- Fragment 4: 60 bytes data (15000 - 3*4980) + 20 byte header = 80 bytes
So, 4 packets leave R1 and head towards R2.
Re-fragmentation at Router-2 (MTU = 3000 bytes)
R2 receives these 4 packets and inspects their size against its own MTU of 3000 bytes.
Now, we check each incoming fragment:
- Process Fragment 1 (5000 bytes): Too large. It must be re-fragmented.
Data to re-fragment: 4980 bytes.
Number of new fragments = ceil(4980 / 2980) = ceil(1.67...) = 2 fragments. - Process Fragment 2 (5000 bytes): Same as above. Re-fragmented into 2 fragments.
- Process Fragment 3 (5000 bytes): Same as above. Re-fragmented into 2 fragments.
- Process Fragment 4 (80 bytes): Size (80) is less than MTU (3000). It passes through unchanged as 1 fragment.
Final Count
The total number of fragments that finally arrive at the destination is the sum of all fragments leaving R2.
- Kurose, J. F., & Ross, K. W. (2016). Computer Networking: A Top-Down Approach. Pearson. (Chapter 4: The Network Layer: Data Plane).
- Tanenbaum, A. S., & Wetherall, D. J. (2011). Computer Networks. Pearson. (Chapter 5: The Network Layer).
- Get link
- X
- Other Apps
Comments
Post a Comment
Ask you doubt here