NEOCODE

IP Header & IPv6 Addressing MCQs

IP Header MCQs

1. What is the size of an IPv4 header without options?

Correct Answer: b) 20 bytes

Explanation:
The standard IPv4 header is 20 bytes long when no options are present. This includes all mandatory fields like version, header length, TTL, protocol, source and destination addresses, etc.

2. Which field in the IPv4 header ensures error checking of the header?

Correct Answer: a) Checksum

Explanation:
The Header Checksum field (16 bits) is used for error-checking of the IPv4 header. It's recalculated at each router since the TTL field changes.

3. What does the Protocol field in the IP header indicate?

Correct Answer: c) The transport layer protocol (e.g., TCP or UDP)

Explanation:
The Protocol field (8 bits) identifies the transport layer protocol encapsulated in the IP packet. Common values are 6 for TCP and 17 for UDP.

4. What is the purpose of the Identification field in the IPv4 header?

Correct Answer: a) To identify fragmented packets for reassembly

Explanation:
The Identification field (16 bits) uniquely identifies packets from the same source. When fragmentation occurs, all fragments share the same ID so the destination can reassemble them correctly.

5. What is the maximum number of fragments possible in IPv4?

Correct Answer: d) 65535

Explanation:
The Fragment Offset field is 13 bits, allowing for 8192 possible offsets. However, the Identification field is 16 bits, allowing for up to 65535 unique fragments in theory.

6. What is the purpose of the Differentiated Services (DS) field in an IP header?

Correct Answer: b) Marks priority and Quality of Service (QoS) settings

Explanation:
The DS field (originally called Type of Service) is used for QoS marking. It can indicate priority levels and request specific handling like low delay, high throughput, or high reliability.

7. In an IPv4 header, what is the length of the Source and Destination IP address fields?

Correct Answer: b) 32 bits each

Explanation:
IPv4 addresses are 32 bits long, so both the Source and Destination Address fields in the header are 32 bits each.

8. What happens when the "Don't Fragment (DF)" flag is set in an IPv4 packet?

Correct Answer: b) The packet is dropped if fragmentation is required

Explanation:
When the DF flag is set (1), routers are not allowed to fragment the packet. If fragmentation would be required to forward the packet (e.g., MTU is too small), the router drops the packet and may send an ICMP "Fragmentation Needed" message back to the sender.

IPv6 Addressing MCQs

9. What is the length of an IPv6 address?

Correct Answer: c) 128 bits

Explanation:
IPv6 addresses are 128 bits long (compared to IPv4's 32 bits), providing a vastly larger address space (2^128 addresses).

10. IPv6 does not support which of the following?

Correct Answer: a) Fragmentation at routers

Explanation:
In IPv6, fragmentation is handled only by the source node using Path MTU Discovery. Routers do not perform fragmentation, which improves routing efficiency.

11. What type of address is FE80::1?

Correct Answer: b) Link-local

Explanation:
FE80::/10 is the prefix for IPv6 link-local addresses. These addresses are only valid on the local network segment and are not routable.

12. Which address type is unique across the entire Internet in IPv6?

Correct Answer: c) Global unicast

Explanation:
Global unicast addresses (typically starting with 2000::/3) are globally unique IPv6 addresses that can be routed across the entire Internet.

13. What is the main advantage of IPv6 over IPv4?

Correct Answer: b) Larger address space

Explanation:
The primary advantage of IPv6 is its 128-bit address space (compared to IPv4's 32-bit), providing approximately 3.4×10³⁸ unique addresses to overcome IPv4 address exhaustion.

14. How many bits are used for the subnet prefix in IPv6?

Correct Answer: c) 64 bits

Explanation:
IPv6 addresses typically use the first 64 bits for the network prefix (including global routing prefix and subnet ID) and the last 64 bits for the interface identifier.

15. Which type of IPv6 address is used for one-to-nearest communication?

Correct Answer: c) Anycast

Explanation:
Anycast addresses deliver packets to the "nearest" interface (in routing terms) among a group of interfaces sharing the same address. This is useful for services like DNS where you want to reach the closest server.

16. What does the "::" notation represent in an IPv6 address?

Correct Answer: b) A sequence of consecutive zeros

Explanation:
The "::" notation is used in IPv6 to compress one or more consecutive 16-bit blocks of zeros. For example, 2001:0db8:0000:0000:0000:0000:1428:57ab can be written as 2001:db8::1428:57ab.