🎓 BookMCQ
← Back to 22. Next Generation IP

📝 IPv6 address representation hexadecimal notation (12 MCQs)

Writing 128-Bit IPv6 Addresses in Hexadecimal

An IPv6 address contains 128 bits, conventionally written as eight groups of four hexadecimal digits called hextets. Each hextet represents 16 bits, so hexadecimal notation keeps addresses readable compared with a 128-character binary string. Colons separate the groups, and hexadecimal digits range from 0 through 9 and A through F. Address notation is case-insensitive and represents the same binary value regardless of letter case.

Omitting Leading Zeros Within Hextets

Leading zeros may be omitted independently from each hextet without changing its value. A group such as 003A can therefore be written as 3A, while 0000 becomes 0. This shortening rule does not permit removing zeros from the right side of a group, because doing so would change its numerical value and consequently the represented 16-bit pattern.

Using Double-Colon Compression for Consecutive Zero Groups

One consecutive sequence of all-zero hextets may be replaced by a double colon, written ::. This compression can appear only once in an address, because a second occurrence would make the number of omitted groups ambiguous. When expanding an address, count the visible hextets and insert enough zero groups to restore the required total of eight.

Expanding a Compressed Address into Eight Hextets

Consider 2001:0DB8:0000:0000:0000:FF00:0042:8329. Removing leading zeros and compressing the three consecutive zero groups produces 2001:DB8::FF00:42:8329. The double colon represents exactly three 0000 hextets here, restoring all eight groups when expanded. Both forms identify precisely the same 128-bit address and can be used interchangeably in network configuration.

Connecting IPv6 Notation with Prefix Lengths

IPv6 addresses are commonly written with a prefix length, such as 2001:DB8:1234:1::25/64. The /64 indicates that the first 64 bits form the network prefix, while the remaining bits identify an interface within that subnet. Prefix length is separate from hexadecimal shortening; compression changes only presentation and never changes the address or prefix boundary.

Misunderstandings About Zero Compression and Address Meaning

'Double colon can be used several times' is incorrect because only one compressed zero run is allowed. 'Uppercase letters create a different address' is false because hexadecimal notation is case-insensitive. 'A shortened address contains fewer bits' is also wrong; omitted zeros are restored conceptually, and every IPv6 address remains exactly 128 bits long.

Practising IPv6 Expansion and Compression Questions

For examination problems, identify the eight-hextet structure, remove only leading zeros, and locate the longest suitable consecutive zero run. Expand compressed forms by counting missing groups, then verify that eight hextets are present. Practise attaching prefix lengths without treating them as part of the hexadecimal address, and convert one hextet between hexadecimal and 16-bit binary.

IPv6 Address Notation Terminology

  • Hextet - A 16-bit hexadecimal address group.
  • Colon notation - Separates IPv6 hextets in written addresses.
  • Leading zero - Zero at a hextet's left side.
  • Zero compression - Replaces consecutive zero hextets with ::.
  • Prefix length - Number of network-prefix bits.
  • Interface identifier - Identifies an interface within its subnet.
3
Easy
5
Medium
4
Hard

📝 All IPv6 address representation hexadecimal notation MCQs

Q1. In the Path Vector algorithm, what does the variable Path[y]Path[y] store for destination yy?

A.Distance metric
B.Sequence of autonomous system (AS) numbers ✅
C.Next‑hop IP address
D.Interface identifier
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The variable Path[y]Path[y] holds the complete list of AS numbers that a packet traverses to reach destination yy. By recording each AS along the route, routers can detect and prevent loops, making the path vector distinct from simple distance metrics.

Q2. If a router detects a change in its vector, what immediate action does the algorithm prescribe?

A.Update the routing table locally
B.Discard the path
C.Send the vector {Path[1],Path[2],…,Path[y]}\{Path[1],Path[2],\dots,Path[y]\} to all neighbors ✅
D.Log the change for later analysis
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: When a change is observed, the algorithm triggers an advertisement of the updated vector to every neighboring router. This propagation ensures that all routers receive the new information promptly, allowing the network to converge to a consistent state after the topology alteration.

Q3. Suppose a router receives two Path vectors for destination yy: Path1={A,B,C}Path_1=\{A,B,C\} and Path2={A,D,C}Path_2=\{A,D,C\}. The algorithm selects the best path based on hop count, preferring the lexicographically smaller vector when counts tie. Which path is chosen?

A.Path1Path_1 ✅
B.Path2Path_2
C.Both are equally preferred
D.Neither is selected
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Both vectors contain three hops, so the hop‑count criterion alone cannot decide. The algorithm then applies a deterministic tie‑breaker, often the lexical order of the AS sequence. Since {A,B,C}\{A,B,C\} precedes {A,D,C}\{A,D,C\} lexicographically, the router selects Path1Path_1 as the best path.

Q4. How does a Path Vector protocol prevent routing loops compared with a traditional Distance‑Vector protocol?

A.It includes the full AS path in each update ✅
B.It uses only hop‑count as a metric
C.Both rely on identical loop‑avoidance techniques
D.Only Distance‑Vector protocols prevent loops
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A Path Vector protocol attaches the entire sequence of AS numbers to each advertisement. When a router receives a vector that already contains its own AS number, it knows a loop would form and discards the update. Distance‑Vector protocols lack this explicit path information, making them more prone to looping without additional safeguards.

Q5. Why is RIP generally unsuitable for large‑scale networks despite being based on the distance‑vector algorithm?

A.RIP supports unlimited hop counts
B.RIP converges instantly after changes
C.RIP limits routes to 15 hops and converges slowly ✅
D.RIP uses link‑state flooding instead of vectors
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: RIP caps the maximum metric at 15 hops, which restricts its applicability in expansive topologies where longer paths are common. Moreover, its periodic update interval (typically 30 seconds) leads to slower convergence after failures, causing transient routing inconsistencies that are unacceptable in large, dynamic networks.

Q6. Which statement correctly differentiates the update mechanisms of RIP and OSPF?

A.RIP sends updates only when a link changes, while OSPF sends them every 30 seconds
B.OSPF sends periodic updates, whereas RIP uses event‑driven updates
C.RIP transmits periodic full‑table updates, while OSPF generates event‑driven link‑state advertisements ✅
D.Both protocols employ the same periodic broadcast method
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: RIP routinely broadcasts its entire routing table at fixed intervals (usually every 30 seconds), regardless of topology changes. In contrast, OSPF employs a link‑state approach where routers emit LSAs only when a change occurs, reducing unnecessary traffic and enabling faster, more precise convergence.

Q7. Applying the path‑vector principle, how does BGP avoid routing loops?

A.By advertising only the next‑hop address
B.By including the complete AS path in each update ✅
C.By limiting the hop count to a fixed value
D.By ignoring received path information
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: BGP attaches the full list of AS numbers traversed by a route to every advertisement. When a router receives an update that already lists its own AS, it recognises that forwarding the route would create a loop and therefore discards the advertisement, ensuring loop‑free propagation.

Q8. How could the basic path‑vector algorithm be extended to carry the MED (Multi‑Exit Discriminator) attribute?

A.MED replaces the AS‑path vector entirely
B.MED is appended as an extra attribute alongside the AS path ✅
C.MED is ignored by the algorithm
D.MED is used to break ties only after the AS path is evaluated
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: To incorporate MED, routers attach it as an additional field to the existing path‑vector message. The AS‑path remains the primary loop‑avoidance mechanism, while the MED value is consulted when multiple paths have identical AS‑path lengths, allowing administrators to influence inbound traffic preferences across neighboring ASes.

Q9. When a router prepends its own AS number to the Path vector before forwarding, what effect does this have on later routing decisions?

A.It increases the hop count of the route
B.It enables downstream routers to detect potential loops ✅
C.It decreases the route metric
D.It has no impact on routing behavior
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: By adding its own AS identifier to the front of the vector, the router ensures that any downstream router receiving the update can see that the route has already passed through that AS. If the downstream router later encounters its own AS number in the vector, it can infer a loop and reject the route, preserving loop‑free routing.

Q10. Given Pathw[y]={2,3}Path_w[y]=\{2,3\} and myself=1myself=1, the algorithm evaluates Path[y]=best{Path[y],(myself+Pathw[y])}Path[y]=\text{best}\{Path[y],(myself+Path_w[y])\}. Assuming Path[y]Path[y] was initially empty, what is the resulting Path[y]Path[y]?

A.\{1,2,3\} ✅
B.\{2,3\}
C.\{1\}
D.\{\}
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The expression concatenates the router’s own identifier (1) with the received path {2,3}\{2,3\}, forming {1,2,3}\{1,2,3\}. Since the original Path[y]Path[y] is empty, the “best” function selects the newly constructed vector, resulting in the complete path {1,2,3}\{1,2,3\}.

Q11. Transmitting full path vectors to all neighbors has security implications. Which threat is most directly mitigated by the presence of the AS‑path information?

A.IP address spoofing
B.Route hijacking attempts ✅
C.Distributed denial‑of‑service attacks
D.The need for authentication protocols
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The AS‑path attribute reveals the exact sequence of autonomous systems a route has traversed. An attacker attempting to hijack a prefix would need to forge a plausible AS‑path that does not contain the victim’s own AS number; otherwise, routers will discard the announcement, reducing the likelihood of successful hijacking.

Q12. Design a scenario where a misconfiguration creates a path‑vector loop despite the algorithm’s loop‑avoidance. Which additional mechanism could reliably detect such a loop?

A.Use a decreasing TTL field
B.Deploy route‑flap damping
C.Implement AS‑path filtering on inbound updates ✅
D.Increase the periodic update interval
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: If a router incorrectly advertises a path that omits its own AS number, downstream routers may accept it, forming a loop. Applying AS‑path filtering on inbound updates—rejecting any route that lacks the router’s own AS identifier—provides a safety net that catches such configuration errors, ensuring loops are identified and eliminated.

🔗 Related Topics (MCQs)