🎓 BookMCQ
← Back to 19. Network Layer Protocols

📝 IPv4 options field (13 MCQs)

Optional Header Information in IPv4

The IPv4 Options field provides additional control or diagnostic information beyond the standard 20-byte header. It is optional, and its presence is reflected by an Internet Header Length value greater than five. Options can support functions such as recording route information or timestamps, although many historically defined options are uncommon in modern Internet forwarding because they add processing complexity. They remain part of the IPv4 header.

Option Encoding and Header Alignment

An option can contain a type, length and option-specific data, while some one-byte options have no length field. The header must end on a 32-bit boundary, so padding bytes may follow the options. Since IHL is four bits and counts 32-bit words, the maximum IPv4 header is 60 bytes, leaving at most 40 bytes for options and padding.

How Options Travel Through Routers

The source host places selected options in the IPv4 header and updates IHL and Total Length accordingly. Routers inspect or process options when required, and some options may be updated during forwarding. Because option processing can require extra work at each hop, routers may handle such packets more slowly than ordinary datagrams without options.

Calculating the Header Length with Options

If an IPv4 header contains 8 bytes of options and the required padding, the total header length is 28 bytes. IHL is therefore 28 ÷ 4 = 7. With a Total Length of 900 bytes, the data field contains 872 bytes. The example illustrates how options increase header size and reduce the payload space.

Options, Diagnostics and Modern Forwarding

Record Route and Timestamp are examples of IPv4 options defined for diagnostic purposes, while source-routing options specify routing information. Their practical use is limited in many networks, and routers may restrict or filter them. Options are distinct from the Protocol field: options extend IPv4 header information, whereas Protocol identifies the next upper-layer protocol carried in the payload.

Misconceptions About IPv4 Options

'Every IPv4 packet includes options' is incorrect because the field is optional. 'Options can make the header unlimited in size' is incorrect because the maximum is 60 bytes. 'The Protocol field stores option codes' is incorrect because option types are encoded inside the Options field, separately from the Protocol identifier.

Interpreting IHL and Option-Length Questions

Students should identify the purpose of the Options field, distinguish one-byte options from variable-length options, and explain header padding. Calculate IHL from total header bytes and derive payload size from Total Length. Remember the 20-byte minimum, 60-byte maximum, 32-bit alignment requirement and the difference between IPv4 options and upper-layer protocol identification.

IPv4 Option-Encoding and Header-Length Terms

  • Option - Optional IPv4 header information.
  • IHL - Header length in 32-bit words.
  • Padding - Aligns header to 32-bit boundary.
  • Record Route - Records traversed router addresses.
  • Timestamp - Records selected timing information.
  • Source Routing - Specifies route information in header.
4
Easy
6
Medium
3
Hard

📝 All IPv4 options field MCQs

Q1. An administrator assigns MAC address E2:13:42:A1:23:34 to VLAN 1. Which of the following statements best describes the immediate effect on a frame sent from that station?

A.Frame is broadcast to all VLANs
B.Frame is forwarded only within VLAN 1 ✅
C.Frame is dropped
D.Frame is sent to router for NAT
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Because VLAN membership based on MAC addresses causes the switch to treat the source as belonging to VLAN 1. Consequently, the switch forwards the frame only to ports that are members of VLAN 1, isolating it from other VLANs and preventing unnecessary broadcast.

Q2. Suppose a switch is configured to place stations with IP addresses 181.34.23.67 and 181.34.23.72 in VLAN 1. If a host with IP 181.34.23.67 sends a packet to 181.34.23.112 (also in VLAN 1), what can be inferred about the packet's Layer‑2 handling?

A.It will be encapsulated with a multicast MAC
B.It will be encapsulated with a unicast MAC of the destination
C.It will be encapsulated with the broadcast MAC
D.It will be encapsulated with the source’s MAC address as the destination ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Since both source and destination IPs belong to the same VLAN, the switch uses the destination’s MAC address for unicast delivery. The packet is not treated as broadcast or multicast; the source MAC is retained only as the source address, while the destination MAC is looked up via ARP.

Q3. A network uses both MAC‑address and multicast‑IP criteria to define VLAN 2. If a station has MAC address F2:A1:23:BC:D3:41 but its multicast‑IP subscription is 239.1.2.3, which VLAN will its traffic be placed in, assuming no other rules?

A.VLAN 2 ✅
B.VLAN 1
C.No VLAN (traffic dropped)
D.Both VLAN 1 and VLAN 2
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When a VLAN is defined by the conjunction of MAC and multicast‑IP characteristics, traffic that satisfies either condition can be admitted. Because the MAC address matches the VLAN 2 list, the frame is placed in VLAN 2 regardless of the multicast group, so the correct placement is VLAN 2.

Q4. Compare the use of a 48‑bit MAC address versus a 32‑bit IP address for VLAN membership. Which of the following is a primary advantage of using MAC addresses?

A.Simpler subnet calculations
B.Easier integration with routing protocols
C.Direct correlation with physical hardware ✅
D.Compatibility with IPv6 addressing
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: MAC addresses are burned into network interface cards, providing a one‑to‑one mapping between a device and its hardware. This direct correlation simplifies identification and enforcement of VLAN policies without needing to consider IP subnetting or routing logic.

Q5. Evaluate the impact on network scalability when VLAN membership is defined by a combination of MAC, IP, and multicast IP criteria versus using only MAC addresses. Which statement best reflects the outcome?

A.Combination reduces scalability due to increased processing
B.Combination improves scalability by providing finer granularity ✅
C.Both approaches have identical scalability
D.Using only MAC addresses limits scalability more than the combination
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Adding IP and multicast criteria allows administrators to group devices more precisely, reducing the number of VLANs required for diverse services. Although processing overhead grows slightly, the finer granularity typically improves overall scalability by avoiding unnecessary VLAN proliferation.

Q6. Given two VLAN configurations: Config X uses only MAC address criteria, while Config Y uses MAC plus IP criteria. If an attacker spoofs a MAC address present in Config X but not the associated IP address in Config Y, which configuration offers stronger protection against unauthorized access?

A.Config X
B.Both equally
C.Neither
D.Config Y ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: Config Y requires both a matching MAC and a matching IP address. Spoofing only the MAC fails the IP check, so the frame is rejected. Config X relies solely on MAC, so the spoofed address would be accepted, making Config Y the more secure option.

Q7. Apply the principle of VLAN isolation: If two hosts share the same IP subnet but belong to different VLANs defined by distinct MAC address lists, what must occur for them to communicate?

A.Traffic must pass through a router or layer‑3 device ✅
B.Switch will forward frames directly
C.Hosts must change their MAC addresses
D.No communication is possible under any circumstance
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: VLANs are Layer‑2 domains; even if hosts share an IP subnet, frames are confined to their respective VLANs. To exchange traffic, the frames must be routed at Layer 3, typically via a router or a multilayer switch that performs inter‑VLAN routing.

Q8. Synthesize a policy that uses multicast IP addresses to assign VLAN membership for streaming video services. Which of the following best describes how the policy works?

A.Each host is manually assigned a VLAN based on its MAC
B.VLAN is assigned per static IP range
C.Hosts joining the multicast group 239.0.0.0/24 are automatically placed in the video VLAN ✅
D.VLAN assignments ignore multicast and rely on DHCP options
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: When a host subscribes to a multicast group within the designated range (e.g., 239.0.0.0/24), the switch interprets this IGMP membership as a signal to place the port into the predefined video VLAN, enabling dynamic, service‑oriented VLAN assignment.

Q9. A network engineer wants to design a dynamic VLAN assignment scheme that reacts to both MAC address changes and multicast IP subscriptions. Which of the following mechanisms best achieves this adaptability?

A.Static ACLs on the switch
B.A RADIUS server that evaluates MAC and IGMP membership ✅
C.Manual configuration of each port
D.Use of spanning‑tree protocol
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: A RADIUS (or similar AAA) server can receive attributes such as the client’s MAC address and its current IGMP group memberships, then return a VLAN assignment. This allows real‑time adaptation without manual reconfiguration, satisfying both criteria.

Q10. Which of the following is a 48‑bit MAC address example used for VLAN 1 in the provided text?

A.00:1A:2B:3C:4D:5E
B.11:22:33:44:55:66
C.AA:BB:CC:DD:EE:FF
D.E2:13:42:A1:23:34 ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: The passage explicitly lists E2:13:42:A1:23:34 as one of the MAC addresses that the administrator can stipulate for VLAN 1, making it the correct example.

Q11. If a VLAN is defined by the IP range 181.34.23.64/28, which of the following IP addresses would be excluded from VLAN 1 membership?

A.181.34.23.70
B.181.34.23.80 ✅
C.181.34.23.75
D.181.34.23.63
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A /28 prefix covers addresses from 181.34.23.64 through 181.34.23.79. Therefore, 181.34.23.80 lies outside the defined range and would not be included in VLAN 1 membership.

Q12. Analyze the effect of combining MAC‑address and multicast‑IP criteria on broadcast traffic within a VLAN. Which outcome is most likely?

A.Broadcast frames are limited to members satisfying both criteria ✅
B.Broadcast frames are sent to all ports regardless of criteria
C.Multicast traffic is converted to unicast
D.VLAN membership is ignored for broadcast frames
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When both MAC and multicast‑IP attributes are required for VLAN membership, the switch treats broadcast frames as belonging to the VLAN only if the source fulfills both conditions. This reduces unnecessary broadcast propagation to ports that do not meet the combined criteria.

Q13. Consider a scenario where a host changes its IP address but retains its MAC address. In a VLAN scheme that uses both MAC and IP attributes, what is the expected result for the host's VLAN assignment?

A.Host remains in the original VLAN
B.Host is removed from all VLANs
C.Host is assigned to a default VLAN
D.Host may be reassigned based on the new IP while still satisfying MAC criteria ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Because the VLAN definition includes both MAC and IP, a change in IP can cause the host to match a different VLAN rule set, while the unchanged MAC still satisfies the MAC component. Thus, the host can be moved to a new VLAN that aligns with its updated IP address.

🔗 Related Topics (MCQs)