🎓 BookMCQ
← Back to 22. Next Generation IP

📝 IPv6 extension headers (17 MCQs)

Optional Headers Following the IPv6 Base Header

IPv6 extension headers carry optional network-layer information without enlarging the fixed 40-byte base header for every packet. They are placed between the base header and the upper-layer header, and each is identified through a Next Header value. This arrangement supports functions such as options, routing, fragmentation, and security while keeping ordinary packet forwarding based on a stable header format. Each extension header can identify the next header in the chain.

Common Extension Header Types and Their Purposes

Common headers include Hop-by-Hop Options, Destination Options, Routing, and Fragment. Authentication Header and Encapsulating Security Payload provide IPsec security functions. The Hop-by-Hop header is intended for processing by nodes along the path, while most other extension headers are processed at the destination or specified routing points. Each header has its own format and Next Header field.

Following the Next Header Chain

A receiver reads the Next Header field in the IPv6 base header to identify the next header. If that header is another extension header, its own Next Header field identifies what follows. The chain continues until an upper-layer protocol such as TCP, UDP, or ICMPv6 is reached, or the packet indicates that no further header exists.

Example of an IPv6 Packet with Multiple Headers

An IPv6 packet may contain a base header whose Next Header value identifies a Routing header; that header may identify a Fragment header, which then identifies UDP. Each step tells the receiver how to interpret the next portion. The chain preserves a clear sequence without adding every optional field to the fixed base header.

Extension Headers and Efficient Packet Processing

Extension headers allow optional functions to be included only when required, linking IPv6 with fragmentation, routing features, and IPsec. Excessive or poorly handled extension-header chains can complicate packet inspection and forwarding, so networks may apply security and operational policies. The order of headers is specified by protocol recommendations, and their presence does not turn IP into a connection-oriented service.

Misconceptions About IPv6 Extension Headers

'Every router processes every extension header' is incorrect because most are processed at the destination or designated nodes; Hop-by-Hop has special path treatment. 'Extension headers replace the base header' is false because they follow it. 'TCP is an extension header' is wrong; TCP is an upper-layer transport header identified by Next Header.

Tracing Extension Header Sequences

For examination questions, trace the Next Header value through each header until reaching TCP, UDP, or ICMPv6. Identify the purpose of Hop-by-Hop, Routing, Fragment, and Destination Options headers. Distinguish IPsec headers from transport headers, and explain which nodes process each extension type during packet delivery. Also note that not all headers are processed by every router.

IPv6 Extension Header Terms

  • Next Header - Field identifying the following header.
  • Fragment header - Extension carrying fragment offset and identification.
  • Routing header - Carries routing-related information for IPv6.
  • Hop-by-Hop - Options header considered by nodes along path.
  • Destination Options - Options processed at designated destination nodes.
  • ESP - IPsec header providing packet confidentiality services.
5
Easy
7
Medium
5
Hard

📝 All IPv6 extension headers MCQs

Q1. An Open message reports a total Length of 9090 bytes. Given that the Marker field occupies 16 bytes, what is the size of the remaining fields in the message?

A.74 bytes ✅
B.68 bytes
C.90 bytes
D.106 bytes
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The Length field includes the entire message, so subtracting the 16‑byte Marker from the total 90 bytes leaves 90−16=7490 - 16 = 74 bytes for the remaining header and payload. This calculation directly yields the size of the non‑Marker portion, confirming option A.

Q2. Which statement correctly contrasts the handling of errors in Update and Notification messages?

A.Update messages embed error codes, while Notification messages ignore errors.
B.Update messages do not carry error information; Notification messages are sent exclusively to signal errors. ✅
C.Both messages use the same error fields but differ in packet size.
D.Notification messages carry routing updates along with errors.
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Update messages are used to convey routing information and never include error codes. When a problem is detected, the BGP speaker sends a separate Notification message that contains the error code (EC) and subcode (ES). Therefore, option B accurately describes the contrast.

Q3. In path‑vector routing, how does the AS_PATH attribute influence the selection of a route among multiple alternatives?

A.It prefers routes with the longest AS_PATH.
B.It prefers routes with the shortest AS_PATH. ✅
C.It ignores AS_PATH length entirely.
D.It selects routes randomly.
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The AS_PATH records each autonomous system traversed. BGP applies the principle of preferring the route with the fewest AS hops, assuming fewer administrative domains imply lower policy complexity. Hence the shortest AS_PATH is favored, making option B correct.

Q4. What numeric Type value identifies a Keepalive message in BGP?

A.1
B.2
C.3
D.4 ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: BGP defines four message types: Open (1), Update (2), Notification (3), and Keepalive (4). The Keepalive message’s Type field is therefore set to 4, which corresponds to option D.

Q5. How many bytes does the Marker field occupy in a BGP message header?

A.8 bytes
B.12 bytes
C.16 bytes ✅
D.24 bytes
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The BGP specification reserves a 16‑byte Marker field for authentication purposes. This fixed size is independent of the message type, so the correct answer is 16 bytes, option C.

Q6. An Update message reports a total Length of 100100 bytes. The Withdrawn‑Routes length (UR_len) is 30 bytes and the Path‑Attribute length (PA_len) is 20 bytes. Assuming the Length field already includes the fixed 19‑byte header, what is the size of the optional (variable) fields?

A.50 bytes ✅
B.40 bytes
C.30 bytes
D.20 bytes
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Subtract the known variable sections (UR_len + PA_len = 30 + 20 = 50) from the total length (100). The remaining 50 bytes correspond to the optional fields. The fixed 19‑byte header is already accounted for, so we do not subtract it again. Hence option A is correct.

Q7. How does increasing the Hold Time value affect BGP session stability compared to decreasing the Keepalive interval?

A.Larger Hold Time makes the session less tolerant to missed Keepalives.
B.Larger Hold Time gives more leeway for missed Keepalives, improving stability, while a shorter Keepalive interval detects failures faster. ✅
C.Both larger Hold Time and shorter Keepalive interval reduce stability.
D.Hold Time and Keepalive interval are unrelated.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The Hold Time defines how long a router will wait without receiving a Keepalive before declaring the peer down. Raising this value provides a larger window for missed Keepalives, enhancing resilience to transient delays. Conversely, reducing the Keepalive interval causes Keepalives to be sent more frequently, allowing quicker detection of true failures. Thus option B correctly captures the trade‑off.

Q8. When establishing a BGP session, which ordered sequence of messages correctly follows the protocol specification?

A.Update → Open → Keepalive → Notification
B.Open → Keepalive → Update → Notification
C.Open → Update → Keepalive → Notification ✅
D.Open → Keepalive → Notification → Update
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The BGP session begins with an Open message to negotiate capabilities. Once the Open exchange succeeds, peers may send Update messages containing routing information. Keepalive messages are exchanged periodically to maintain the session, and a Notification is sent only when an error occurs. Therefore the correct order is Open, then Update, then Keepalive, and finally Notification if needed, which is option C.

Q9. A Notification message carries error code EC = 2 and subcode ES = 5. Which of the following best describes the nature of the error?

A.Open message error – unsupported version.
B.Update message error – malformed attribute. ✅
C.Notification message error – unknown error.
D.Keepalive message error – timer expired.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: In BGP, error code 2 corresponds to Update Message errors, and subcode 5 indicates an Invalid Network Field. Thus the Notification is signalling a problem with an Update message, making option B the accurate description.

Q10. Why must the Option length (O_len) field be a multiple of 4 bytes in BGP messages?

A.To align with 32‑bit word boundaries for efficient processing. ✅
B.Because BGP uses 4‑byte checksums.
C.To match the size of IPv4 addresses.
D.It is an arbitrary design choice.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Network protocols often require fields to be padded to 32‑bit (4‑byte) boundaries so that hardware and software can read them as whole words, reducing the need for byte‑wise operations. BGP follows this convention, so O_len must be a multiple of 4, which justifies option A.

Q11. How do path attributes such as LOCAL_PREF and MED influence route advertisement across multiple autonomous systems?

A.LOCAL_PREF is shared only within an AS, while MED is compared across AS borders to influence inbound traffic. ✅
B.Both attributes are ignored outside the originating AS.
C.MED overrides LOCAL_PREF in all cases.
D.LOCAL_PREF and MED have no effect on route selection.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: LOCAL_PREF is a well‑known discretionary attribute propagated throughout a single autonomous system to indicate preference for exit points; higher values are preferred. MED (Multi‑Exit Discriminator) is exchanged between neighboring ASes and is considered when choosing among multiple entry points from the same external AS. Thus option A correctly captures their distinct scopes and impacts.

Q12. If two routers receive Update messages that list overlapping withdrawn routes, what is the correct procedure for each router to resolve the conflict?

A.Retain any route that appears in both messages.
B.Apply the most recent Update based on timestamp.
C.Remove the overlapping routes regardless of source, then process remaining updates. ✅
D.Ignore the withdrawn routes and keep existing entries.
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Withdrawn routes indicate that the sender no longer considers those prefixes reachable. When overlapping withdrawals are received, each router must delete the specified routes from its routing table before applying any newly advertised paths. This ensures consistency and prevents stale entries, making option C the proper approach.

Q13. A network must transmit 10,000 bytes of NLRI using BGP Update messages. Each message can carry at most 4,096 bytes of payload after the fixed 19‑byte header. What is the minimum number of Update messages required?

A.2
B.3 ✅
C.4
D.5
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: First compute the usable payload per message: 4,096 − 19 = 4,077 bytes. Dividing the total NLRI size (10,000) by 4,077 gives approximately 2.45, meaning three full messages are needed to carry all data. Two messages would provide only about 8,154 bytes, insufficient. Hence the minimum is three messages, option B.

Q14. Considering convergence time and scalability, which routing protocol—RIP (distance‑vector) or OSPF (link‑state)—is more appropriate for a large ISP backbone, and why?

A.RIP, because its simple hop count metric scales better.
B.OSPF, because its link‑state database enables faster convergence and supports hierarchical design. ✅
C.RIP, due to its lower CPU usage.
D.Both perform equally in large networks.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: OSPF maintains a complete view of the network via LSAs, allowing rapid recomputation of shortest‑path trees when topology changes, which yields fast convergence. Its area concept reduces database size, enhancing scalability for extensive ISP backbones. RIP’s periodic whole‑table broadcasts and maximum hop count of 15 limit both convergence speed and network size, making OSPF the superior choice, as expressed in option B.

Q15. Propose a change to the BGP Extension Header that would allow authentication data to be included without increasing overall message size. Which of the following modifications best achieves this?

A.Replace the 16‑byte Marker with a 4‑byte hash and reuse the freed bytes for payload.
B.Add a separate Authentication TLV after the header, expanding the message.
C.Compress the entire BGP message using gzip before transmission.
D.Embed a digital signature in the existing Option field, keeping total length constant. ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: Embedding authentication information within an existing optional TLV (Type‑Length‑Value) field allows the sender to carry a signature or MAC without adding new bytes to the message. By reusing space already allocated for optional data, the total length remains unchanged. Option D captures this approach, whereas the other choices either increase size or alter essential fixed fields.

Q16. If a BGP Update includes a Path Attribute with PA_len = 0, what logical inference can be drawn about that attribute's effect on routing decisions?

A.The attribute is present but carries no data, so it is ignored.
B.The attribute is malformed and will trigger a Notification error.
C.The attribute conveys a default value, influencing route preference.
D.The attribute is optional and its absence does not affect routing. ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: A zero‑length Path Attribute indicates that the attribute is not present in the message. Since BGP treats missing optional attributes as having no impact, routing decisions rely on other attributes. Therefore the correct inference is that the attribute’s absence does not affect routing, matching option D.

Q17. How do BGP Notification error handling mechanisms differ from TCP reset processing in terms of detection, propagation, and recovery?

A.Both use the same three‑step handshake for error recovery.
B.BGP sends a detailed Notification with error codes, while TCP simply aborts the connection without explicit reason. ✅
C.TCP provides automatic retransmission, whereas BGP requires manual re‑establishment after a Notification.
D.BGP and TCP handle errors identically.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: When BGP detects a protocol violation, it transmits a Notification message containing specific error codes (EC) and subcodes (ES), informing the peer of the exact problem before closing the session. TCP, on the other hand, issues a RST segment that abruptly terminates the connection without detailing the cause, leaving recovery to higher‑layer mechanisms. Option B correctly contrasts these behaviors.

🔗 Related Topics (MCQs)