📝 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.
📝 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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?
📖 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.