NEOCODE

Network Layer MCQs

Network Layer Design Issues

1. What is the main function of the network layer in the OSI model?

Correct Answer: b) Routing and addressing

Explanation:
The network layer is primarily responsible for routing packets from source to destination and providing logical addressing (like IP addresses). Error detection/correction is handled by the data link layer, encryption by the presentation layer, and process-to-process communication by the transport layer.

2. Which of the following is NOT a network layer function?

Correct Answer: d) Flow control

Explanation:
Flow control is a function of the transport layer (like in TCP), not the network layer. The network layer handles routing (determining paths), packet forwarding (sending packets along paths), and logical addressing (IP addresses).

3. Which protocol is used for logical addressing at the network layer?

Correct Answer: b) IP

Explanation:
IP (Internet Protocol) provides logical addressing (IP addresses) at the network layer. TCP and UDP are transport layer protocols, while ARP operates between network and data link layers to map IP addresses to MAC addresses.

4. What is the purpose of fragmentation in the network layer?

Correct Answer: c) To allow large packets to be transmitted over smaller frame sizes

Explanation:
Fragmentation breaks large packets into smaller pieces that can fit within the Maximum Transmission Unit (MTU) of underlying networks. This is necessary because different network technologies support different maximum frame sizes.

5. Which of the following is a connectionless network layer protocol?

Correct Answer: b) IP

Explanation:
IP is connectionless - each packet is routed independently without establishing a connection first. TCP is connection-oriented (transport layer), while ATM and MPLS are connection-oriented technologies at lower layers.

6. What is the primary role of ARP (Address Resolution Protocol)?

Correct Answer: a) Resolves IP addresses to MAC addresses

Explanation:
ARP maps network layer addresses (IP) to data link layer addresses (MAC). DNS resolves domain names to IP addresses. Routing protocols find paths, and encryption is handled by higher layers or specialized protocols.

7. How many bits are there in an IPv4 address?

Correct Answer: a) 32

Explanation:
IPv4 addresses are 32 bits long, typically represented as four 8-bit octets in dotted-decimal notation (e.g., 192.168.1.1). IPv6 addresses are 128 bits long, while MAC addresses are 48 bits.

8. Which IPv6 address type is used for one-to-many communication?

Correct Answer: c) Multicast

Explanation:
Multicast is for one-to-many communication where packets are delivered to multiple interfaces. Unicast is one-to-one, anycast is one-to-nearest (of many), and IPv6 doesn't have broadcast (multicast replaces it).

9. What is the maximum number of IP addresses in a /24 subnet?

Correct Answer: b) 256

Explanation:
A /24 subnet has 8 host bits (32-24), allowing 2^8 = 256 total addresses. Typically 254 usable addresses as 1 is network address and 1 is broadcast address, but the question asks for total IP addresses.

10. Which protocol is responsible for dynamically assigning IP addresses?

Correct Answer: a) DHCP

Explanation:
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses and other network configuration parameters to devices. DNS is for name resolution, ARP for address resolution, and ICMP for control messages.

11. What is the loopback address in IPv4?

Correct Answer: a) 127.0.0.1

Explanation:
The loopback address (127.0.0.1) is used to test network software without physically sending packets. The entire 127.0.0.0/8 block is reserved for loopback. 0.0.0.0 represents "this host", and 255.255.255.255 is the broadcast address.