CS FundamentalsVery hardProduct company interview · GATE level
A router receives an IPv4 fragment with header length field 5, total length 1196, fragment offset 294 and the More Fragments bit set. Numbering the original datagram's payload bytes from 0, which bytes does this fragment carry, and what fragment-offset value will the next fragment of the same datagram have?
- A. Bytes 2352 to 3547; next offset 444
- B. Bytes 294 to 1469; next offset 1470
- C. Bytes 2352 to 3527; next offset 441
- D. Bytes 2352 to 3527; next offset 442
Correct answer: C. Bytes 2352 to 3527; next offset 441
Header = 5 x 4 = 20 bytes, so the payload is 1196 - 20 = 1176 bytes. The offset is in units of 8 bytes: first byte = 294 x 8 = 2352, last byte = 2352 + 1176 - 1 = 3527. The next fragment starts at byte 3528, i.e. offset 3528/8 = 441. Treating the offset as a byte count gives 294 to 1469; using the total length 1196 as the payload gives 3547; 442 is an off-by-one, since 1176/8 = 147 exactly and 294 + 147 = 441.
More Computer Networks questions
- A sender protects the 10-bit message 1011001110 with a CRC using the generator 10011 (x^4 + x + 1) and transmits the resulting 14-bit…
- A 12-bit Hamming codeword protects 8 data bits. Positions are numbered 1 to 12 from the left, even-parity check bits sit at positions 1…
- A 100 Mbps CSMA/CD network has its two farthest stations 500 m of cable apart, with two repeaters on the path between them. Signals travel…
- Two Ethernet stations A and B collide. For A this is the 1st collision of its current frame, so it picks its backoff K uniformly from {0…
- Routers A, B and C run a basic distance-vector protocol with no split horizon or poisoned reverse. Link costs are A-B = 3, B-C = 2 and A-C…
- Five routers use distance-vector routing with link costs A-B = 1, B-C = 2, C-D = 1, D-E = 3, A-E = 12, A-D = 7 and B-D = 5. Initially each…