NEOCODE

IP Packet Forwarding MCQs

Forwarding of IP Packets

1. What is the primary role of forwarding in networking?

Correct Answer: a) To determine the best path for a packet

Explanation:
Packet forwarding is the process by which networking devices (primarily routers) determine the optimal path for sending packets toward their destination based on the destination IP address and routing information.

2. Which device is responsible for forwarding IP packets?

Correct Answer: b) Router

Explanation:
Routers are specifically designed to forward IP packets between different networks. While switches forward frames at layer 2, routers operate at layer 3 using IP addresses to make forwarding decisions.

3. The process of forwarding packets based on the destination IP address is called:

Correct Answer: b) Routing

Explanation:
Routing refers to the process of selecting paths in a network along which to send IP packets based on their destination addresses. This is distinct from switching which operates at layer 2 using MAC addresses.

4. In direct packet forwarding, the packet is:

Correct Answer: b) Sent directly to the destination host

Explanation:
Direct forwarding occurs when the source and destination hosts are on the same network segment. The packet is sent directly without needing to go through any routers.

5. What happens if a router does not have a specific route to forward a packet?

Correct Answer: b) It sends the packet to the default route

Explanation:
When no specific route exists in the routing table for a destination, routers use the default route (0.0.0.0/0) if one is configured. This is typically the path to an upstream provider or core router.

6. Which algorithm is commonly used for shortest path routing?

Correct Answer: d) Both a and b

Explanation:
Dijkstra's algorithm is used by OSPF (link-state protocol) while Bellman-Ford is used by RIP (distance-vector protocol). Both find shortest paths but with different approaches - Dijkstra's uses a greedy method while Bellman-Ford uses relaxation.

7. Which of the following is used for next-hop determination in forwarding?

Correct Answer: b) Routing table

Explanation:
The routing table contains information about network paths and is used to determine the next hop (next router) for a packet. MAC tables are for layer 2 switching, ARP cache maps IPs to MACs, and DNS resolves domain names.

8. What is the function of a default gateway?

Correct Answer: a) It provides a path for packets when no specific route exists

Explanation:
The default gateway is the router that handles traffic destined for networks not explicitly listed in the routing table. It's essentially the "gateway of last resort" for packets.

9. Which type of forwarding updates the routing table dynamically?

Correct Answer: b) Dynamic forwarding

Explanation:
Dynamic forwarding uses routing protocols (like OSPF, RIP, or BGP) to automatically update routing tables based on network changes. Static forwarding requires manual configuration of routes.

10. What is the purpose of the Time-to-Live (TTL) field in an IP packet?

Correct Answer: a) To prevent packets from looping indefinitely

Explanation:
The TTL field is decremented by each router that forwards the packet. When it reaches zero, the packet is discarded. This prevents packets from circulating endlessly in routing loops.