GATE / CS ARCHIVE

GATE CSE 2014 SET 3 / QUESTION 27

GATE CSE 2014 Set 3 Q27

Computer Networks · IP Addressing, Fragmentation & Address Resolution · Full GATE CSE 2014 Set 3 paper

GATE 2014 Set 3, Q27 2 marks · NAT
Report issue

IP Addressing, Fragmentation & Address Resolution

Question 27, GATE 2014: Each IPv4 host has a battery-backed real-time clock with 1-second resolution and a globally unique IPv4 address. Each must generate up to 1000 unique identifiers per second. Design a 50-bit global ID; after how many seconds does a host's identifier time field wrap around?
Tap to enlarge
Answer & solution

Official answer: 256

Step 1: In the conventional fixed-field construction, reserve 32 bits for the globally unique IPv4 address so different hosts cannot collide. Step 2: To distinguish up to 1000 IDs generated in the same second, reserve ceil(log₂1000)=10 counter bits, because 2⁹<1000≤2¹⁰. Step 3: This leaves 50−32−10=8 bits for the timestamp in seconds. The timestamp cycles through 2⁸=256 values, so wraparound occurs after 256 seconds. This construction assumes no clock rollback and no counter reuse within a second; global uniqueness is limited by the timestamp wrap interval.

Original paper, page 59 · Answer key