Unit 4: NETWORK LAYER: IP Header - Practice Quiz

CSE306 — Computer Networks 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the size of the standard IPv4 header without any options?

IPv4 Header Easy
A. 64 bytes
B. 20 bytes
C. 40 bytes
D. 32 bytes

2 Which field in the IPv4 header is used to prevent packets from endlessly circulating in a network?

IPv4 Header Easy
A. Time to Live (TTL)
B. Header Checksum
C. Protocol
D. Fragment Offset

3 What is the fixed length of the base IPv6 header?

IPv6 Header Easy
A. 32 bytes
B. 40 bytes
C. 20 bytes
D. 60 bytes

4 Which IPv4 header field is equivalent to the 'Hop Limit' field in the IPv6 header?

IPv6 Header Easy
A. Time to Live (TTL)
B. Header Length
C. Protocol
D. Type of Service

5 How many bits are there in an IPv6 address?

IPv6 Addressing Easy
A. 32 bits
B. 64 bits
C. 128 bits
D. 256 bits

6 Which of the following is the loopback address in IPv6?

IPv6 Addressing Easy
A. 127.0.0.1
B. ::1
C. FE80::1
D. ::0

7 What is the primary purpose of Network Address Translation (NAT)?

Network Address Translation (NAT) Easy
A. To calculate the shortest routing path
B. To assign MAC addresses to devices
C. To translate private IP addresses to public IP addresses
D. To encrypt network traffic

8 Which table does a NAT router maintain to keep track of translated addresses?

Network Address Translation (NAT) Easy
A. MAC Table
B. Routing Table
C. NAT Translation Table
D. ARP Table

9 Which device operates primarily at the Network Layer to forward packets between different networks?

NETWORK LAYER: Routing Easy
A. Router
B. Hub
C. Switch
D. Repeater

10 What is the main function of the routing table?

NETWORK LAYER: Routing Easy
A. To store MAC addresses of local devices
B. To assign IP addresses to hosts dynamically
C. To determine where to forward a packet based on its destination IP address
D. To translate domain names to IP addresses

11 Which of the following is an example of an Interior Gateway Protocol (IGP)?

Unicast routing protocols Easy
A. OSPF
B. HTTP
C. SMTP
D. BGP

12 What does BGP stand for in the context of routing protocols?

Unicast routing protocols Easy
A. Border Gateway Protocol
B. Basic Gateway Protocol
C. Broadband Gateway Protocol
D. Binary Gateway Protocol

13 What is the primary goal of a routing algorithm?

Routing algorithms Easy
A. To assign IP addresses to devices
B. To find the best path from a source to a destination
C. To encrypt data packets
D. To detect transmission errors

14 Which category of routing algorithm updates its routing decisions continuously based on network topology changes?

Routing algorithms Easy
A. Static Routing
B. Default Routing
C. Dynamic Routing
D. Fixed Routing

15 Which famous algorithm is commonly used to find the shortest path in network routing?

Routing Algorithm- Shortest path algorithm Easy
A. RSA Algorithm
B. Bubble Sort
C. Dijkstra's Algorithm
D. Binary Search

16 In Distance Vector Routing, what does a router share with its immediate neighbors?

Distance vector Routing Easy
A. Its MAC address
B. Its entire routing table
C. Only the state of its links
D. The entire network topology

17 What is the 'Count-to-Infinity' problem primarily associated with?

Distance vector Routing Easy
A. Distance Vector Routing
B. Static Routing
C. Link State Routing
D. Shortest Path Routing

18 In Link State Routing, what information does each router broadcast to all other routers in the network?

Link State routing Easy
A. The MAC addresses of its neighbors
B. The state of its directly connected links
C. Its IP address only
D. Its entire routing table

19 Which routing protocol is a classic example of Link State Routing?

Link State routing Easy
A. RIP
B. EIGRP
C. OSPF
D. BGP

20 What is the metric typically used by shortest path algorithms to determine the 'best' path?

Routing Algorithm- Shortest path algorithm Easy
A. Manufacturer name
B. Operating system version
C. Device color
D. Cost (e.g., delay, distance, or bandwidth)

21 An IPv4 datagram is fragmented into three pieces. The total length of the original datagram payload was 4000 bytes. If the first two fragments each carry 1480 bytes of payload, what will be the value of the fragment offset field in the third fragment's IPv4 header?

IPv4 Header Medium
A. 2960
B. 1480
C. 185
D. 370

22 If the Header Length (HLEN) field in an IPv4 header contains the binary value 0111, what is the total size of the IPv4 header in bytes, and how many bytes of options are included?

IPv4 Header Medium
A. 32 bytes total, 12 bytes of options
B. 28 bytes total, 0 bytes of options
C. 28 bytes total, 8 bytes of options
D. 7 bytes total, 0 bytes of options

23 In the IPv6 base header, which field replaces the IPv4 'Time to Live' (TTL) field to prevent packets from endlessly circulating in the network?

IPv6 Header Medium
A. Traffic Class
B. Hop Limit
C. Flow Label
D. Next Header

24 Which of the following correctly describes how IPv6 handles packet fragmentation?

IPv6 Header Medium
A. Fragmentation is handled entirely by intermediate routers using the standard IPv6 base header.
B. Fragmentation is performed only by the source node, using a Fragment Extension Header.
C. Fragmentation is performed by the destination node during the reassembly process.
D. Fragmentation is not allowed in IPv6; packets exceeding the MTU are always silently dropped.

25 Which of the following is the correct, most compressed representation of the IPv6 address 2001:0db8:0000:0000:0001:0000:0000:0001?

IPv6 Addressing Medium
A. 2001:db8:0:0:1::1
B. 2001:db8::1:0:0:1 and 2001:db8:0:0:1::1 are both correct, but 2001:db8::1:0:0:1 is not the most compressed
C. 2001:db8::1:0:0:1
D. 2001:db8::1::1

26 An IPv6 Anycast address is syntactically indistinguishable from a Unicast address. How does a router know how to route a packet destined for an Anycast address?

IPv6 Addressing Medium
A. The router checks the 'Anycast Flag' in the IPv6 base header.
B. The router routes it to the nearest interface sharing that address based on routing protocol metrics.
C. The router broadcasts the packet to all interfaces, and the nearest one accepts it.
D. The router queries a DNS server to resolve the Anycast address to a specific MAC address.

27 In a scenario where multiple internal hosts use a single public IP address to access the Internet simultaneously, which specific mechanism does NAT utilize to distinguish between the return traffic for different internal hosts?

Network Address Translation (NAT) Medium
A. Using different MAC addresses for each internal host
B. Static NAT mapping
C. Modifying the IPv4 Protocol field
D. Port Address Translation (PAT) using Layer 4 port numbers

28 A NAT router modifies a packet originating from a private network. Which of the following fields in the IPv4 header MUST the NAT router recalculate before forwarding the packet?

Network Address Translation (NAT) Medium
A. Type of Service (ToS)
B. Fragment Offset
C. Identification
D. Header Checksum

29 Which of the following best differentiates a 'forwarding table' from a 'routing table' in modern routers?

NETWORK LAYER: Routing Medium
A. A routing table is built by control plane protocols, whereas a forwarding table is used by the data plane to actually switch packets.
B. There is no difference; they are exactly the same data structure.
C. A routing table is used exclusively for static routes, while a forwarding table is used for dynamic protocols like OSPF.
D. A routing table contains only MAC addresses, while a forwarding table contains IP addresses.

30 A network administrator needs a routing protocol to exchange routing information between two different Autonomous Systems (AS). Which protocol is designed specifically for this purpose?

Unicast routing protocols Medium
A. BGP (Border Gateway Protocol)
B. IS-IS (Intermediate System to Intermediate System)
C. RIP (Routing Information Protocol)
D. OSPF (Open Shortest Path First)

31 In the Routing Information Protocol (RIP), the maximum valid hop count is 15. What happens when a router running RIP receives a routing update for a network with a metric of 15?

Unicast routing protocols Medium
A. The router discards the update as the network is considered unreachable.
B. The router generates an ICMP Time Exceeded message.
C. The router accepts the update, but if it forwards traffic to that network, the metric becomes 16, representing infinity/unreachable.
D. The router resets the hop count to 0 and forwards it to the next neighbor.

32 Which of the following is a key characteristic that distinguishes dynamic routing algorithms from static routing?

Routing algorithms Medium
A. Dynamic algorithms do not use routing tables.
B. Static routing causes significantly higher network overhead due to periodic updates.
C. Dynamic algorithms automatically adapt to topology changes and link failures.
D. Dynamic routing algorithms only work for single-path topologies.

33 Which of the following solutions is NOT used to mitigate the 'Count-to-Infinity' problem commonly found in basic routing algorithms?

Routing algorithms Medium
A. Split Horizon
B. Poison Reverse
C. Link State Advertisements (LSA)
D. Defining a maximum metric (infinity)

34 In Dijkstra's shortest path algorithm, what does the set represent during the execution of the algorithm?

Routing Algorithm- Shortest path algorithm Medium
A. The set of all nodes in the network graph.
B. The set of directly connected neighbors of the source node.
C. The set of nodes whose shortest path from the source is definitively known.
D. The set of nodes that are currently unreachable.

35 Consider a network graph where link costs can be negative. Why might Dijkstra's algorithm fail to find the correct shortest path in this scenario?

Routing Algorithm- Shortest path algorithm Medium
A. The algorithm enters an infinite loop when encountering negative link costs.
B. Dijkstra's algorithm only supports hop-count metrics, not arbitrary cost values.
C. Dijkstra's algorithm assumes that adding an edge to a path can never decrease the total path cost.
D. Dijkstra's algorithm is a decentralized algorithm and cannot see the entire graph at once.

36 According to the Bellman-Ford equation used in Distance Vector Routing, the cost of the least-cost path from node to node is computed as:

Distance vector Routing Medium
A.
B.
C.
D.

37 How does the 'Split Horizon' rule improve the performance of Distance Vector routing?

Distance vector Routing Medium
A. It splits the routing table into smaller segments to speed up lookup times.
B. It forces routers to exchange routing tables only with routers in different Autonomous Systems.
C. It ensures that updates are sent only when a topology change occurs, rather than periodically.
D. It prevents a router from advertising a route back out the same interface from which the route was learned, preventing two-node routing loops.

38 In Link State routing, which mechanism is used to ensure that all routers in the domain eventually receive the same routing information?

Link State routing Medium
A. Reverse Path Forwarding (RPF)
B. Reliable Flooding of Link State Advertisements (LSAs)
C. Distance Vector exchanging
D. Spanning Tree Protocol (STP)

39 What is the primary computational advantage of Link State (LS) routing over Distance Vector (DV) routing?

Link State routing Medium
A. LS routing protocols do not require the use of any shortest-path algorithms.
B. LS routing requires significantly less memory on each router compared to DV routing.
C. LS routers only need to communicate with their immediate neighbors, drastically reducing network traffic.
D. LS routing is less susceptible to routing loops because each router computes the shortest path using a complete topology map.

40 When a router receives a packet destined for an IP address that does not match any specific subnet entry in its routing table, what action does it take?

NETWORK LAYER: Routing Medium
A. It encapsulates the packet into a DNS request to find the proper route.
B. It forwards the packet to the Default Route (e.g., 0.0.0.0/0), if configured.
C. It randomly selects a next-hop router to load balance unknown traffic.
D. It broadcasts the packet to all active interfaces.

41 An IPv4 datagram of size 4000 bytes (including a standard 20-byte header) is to be forwarded over a link with an MTU of 1500 bytes. Which of the following correctly describes the fragmentation offset and the More Fragments (MF) flag of the third fragment?

IPv4 Header Hard
A. Offset = 2960, MF = 0
B. Offset = 370, MF = 1
C. Offset = 185, MF = 0
D. Offset = 370, MF = 0

42 When a router receives an IPv4 packet and decrements the Time to Live (TTL) field by 1, how is the IPv4 header checksum most efficiently updated without recomputing the entire checksum?

IPv4 Header Hard
A. By applying an XOR operation between the old TTL and the new TTL.
B. By adding to the existing checksum using one's complement arithmetic.
C. By subtracting from the checksum using two's complement arithmetic.
D. By adding (0x0100) to the existing checksum using one's complement arithmetic.

43 In IPv6, if a packet requires Hop-by-Hop Options, Routing, and Fragment extension headers, what is the mandatory order in which these headers must appear after the main IPv6 header?

IPv6 Header Hard
A. Hop-by-Hop Options, Fragment, Routing
B. Routing, Hop-by-Hop Options, Fragment
C. Hop-by-Hop Options, Routing, Fragment
D. Fragment, Routing, Hop-by-Hop Options

44 What is the primary implication of a router altering the 20-bit Flow Label field in an IPv6 header during transit?

IPv6 Header Hard
A. It breaks IPsec Authentication Header (AH) integrity checks.
B. It triggers an ICMPv6 Parameter Problem message.
C. It violates RFC 6437, as the Flow Label must be delivered unchanged to maintain flow state.
D. It is permissible only if the router is performing NAT64.

45 What is the Solicited-Node Multicast Address for an IPv6 interface assigned the global unicast address 2001:db8:85a3::8a2e:370:7334?

IPv6 Addressing Hard
A. ff02::1:ff00:7334
B. ff02::1:ff37:7334
C. ff02::1:ff8a:2e37
D. ff02::1:ff70:7334

46 A host generates an IPv6 interface identifier using the modified EUI-64 format from its MAC address 00:1A:2B:3C:4D:5E. What will be the resulting 64-bit interface identifier?

IPv6 Addressing Hard
A. 001a:2bff:fe3c:4d5e
B. 021a:2bfe:ff3c:4d5e
C. 021a:2bff:fe3c:4d5e
D. 021a:2b3c:4d5e:ffff

47 In the context of STUN and WebRTC, which type of NAT creates a unique external port mapping not just for the internal IP/port, but specifically for each distinct external destination IP and port combo, thus breaking standard UDP hole punching?

Network Address Translation (NAT) Hard
A. Full Cone NAT
B. Symmetric NAT
C. Port-Restricted Cone NAT
D. Restricted Cone NAT

48 A network utilizes 'Hairpinning' (NAT loopback). An internal host tries to reach internal host using host 's external (public) IP. Which of the following best describes the packet modification at the NAT router?

Network Address Translation (NAT) Hard
A. The router alters only the destination IP to host B's internal IP.
B. The router alters both the source IP (to its own internal IP) and the destination IP (to host B's internal IP).
C. The router drops the packet because private IP addresses cannot route to public IPs on the same interface.
D. The router alters only the source IP to its public IP.

49 A router's forwarding table contains the following entries: 192.168.0.0/16 via Interface 1, 192.168.128.0/17 via Interface 2, and 192.168.192.0/18 via Interface 3. A packet arrives destined for 192.168.200.5. Which interface will it use, and why?

NETWORK LAYER: Routing Hard
A. It will be load-balanced between Interface 2 and 3.
B. Interface 1, because /16 encompasses the entire class C range.
C. Interface 3, due to Longest Prefix Match (LPM).
D. Interface 2, because 128.0/17 covers 200.5 and has a higher priority than /18.

50 Consider a router configured with policy-based routing (PBR). If a packet matches both a destination-based route in the routing table (RIB) and a PBR route-map specifying a next-hop based on the source IP, what is the default behavior in most commercial routers (e.g., Cisco)?

NETWORK LAYER: Routing Hard
A. The router applies ECMP, load-balancing between the PBR next-hop and the RIB next-hop.
B. The packet is dropped due to routing ambiguity.
C. The PBR route-map takes precedence, overriding the destination-based RIB entry.
D. The RIB route takes precedence because destination routing is strictly prioritized at the network layer.

51 In the Border Gateway Protocol (BGP), what is the primary purpose of the 'iBGP split-horizon' rule, and what architectural solution is typically implemented to bypass its scaling limitations?

Unicast routing protocols Hard
A. It prevents routes learned from eBGP from being advertised to iBGP; solved by Next-Hop-Self.
B. It prevents loops between different ASes; solved by using the AS-PATH attribute.
C. It ensures symmetric routing; solved by Multi-Exit Discriminator (MED).
D. It prevents routing loops within a single AS by dropping routes learned from one iBGP peer if sent to another; solved by Route Reflectors or BGP Confederations.

52 In OSPF, a Not-So-Stubby Area (NSSA) allows the injection of external routes while retaining stub area characteristics. Which LSA type is uniquely generated by an ASBR within an NSSA to advertise these external routes, and what happens to it at the Area Border Router (ABR)?

Unicast routing protocols Hard
A. Type 5 LSA; the ABR floods it unchanged into the backbone (Area 0).
B. Type 4 LSA; the ABR translates it into a Type 3 LSA for inter-area routing.
C. Type 7 LSA; the ABR translates it into a Type 3 LSA to hide external topology.
D. Type 7 LSA; the ABR translates it into a Type 5 LSA before flooding it into the backbone.

53 Which of the following scenarios describes a topology where the 'Split Horizon with Poisoned Reverse' mechanism fails to prevent the Count-to-Infinity problem?

Routing algorithms Hard
A. A linear network (A-B-C-D) where the connection between A and B fails.
B. Split Horizon with Poisoned Reverse is mathematically proven to prevent Count-to-Infinity in all network topologies.
C. A two-node network where the link between the nodes fails.
D. A three-node network with a routing loop involving all three nodes (a ring topology).

54 Consider a Distance Vector routing network. Node X routes traffic to Destination D via Node Y. Node X's current distance to D is . If X receives an update from Node Z indicating a path to D with cost , under which specific condition MUST X unconditionally accept Z's update, regardless of whether ?

Routing algorithms Hard
A. X must accept it if Z has a lower router ID than Y.
B. X must never accept an update that increases its cost.
C. X must accept it if the sequence number from Z is strictly less than X's current sequence number.
D. X must accept it if Z is the current next-hop for destination D (i.e., Y = Z).

55 In an implementation of Link-State Routing, Dijkstra's algorithm is run using a Fibonacci Heap priority queue. For a network with routers and links, what is the asymptotic time complexity of computing the shortest path tree?

Routing Algorithm- Shortest path algorithm Hard
A.
B.
C.
D.

56 Equal-Cost Multi-Path (ECMP) routing requires routers to identify multiple shortest paths of identical cost. How must Dijkstra's algorithm be modified to support ECMP?

Routing Algorithm- Shortest path algorithm Hard
A. Instead of keeping a single predecessor for each node, a set/list of predecessors must be maintained for nodes when discovering an equal-cost path.
B. The priority queue must pop all nodes with the same cost simultaneously.
C. The algorithm must run a second time in reverse (Destination to Source) to verify symmetric paths.
D. The distance array must be changed to allow negative weights.

57 In the Distributed Bellman-Ford algorithm used by Distance Vector routing, a link cost increases significantly. Why does this trigger the 'Bad News Travels Slowly' phenomenon?

Distance vector Routing Hard
A. Routers must wait for hold-down timers to expire before processing any updates.
B. The algorithm requires a full topology sync, consuming massive bandwidth.
C. Negative edge weights cause the algorithm to stall until the network administrator clears the route.
D. Nodes iteratively rely on each other's outdated information, incrementing metrics gradually until infinity is reached.

58 What happens if a negative weight cycle exists in a routing domain utilizing the Bellman-Ford algorithm, and how is this handled in practical Distance Vector protocols like RIP?

Distance vector Routing Hard
A. The algorithm computes a path of zero cost. RIP handles this by setting a floor value of 0.
B. The algorithm flips the negative weights to positive. RIP uses absolute values of link metrics.
C. The algorithm terminates early. RIP handles this using split horizon.
D. The algorithm fails to converge as path costs decrease infinitely. RIP avoids this inherently because network links cannot have negative latencies or costs.

59 In Link State routing, Sequence Numbers are used to distinguish new LSAs from old ones. To prevent the sequence number wrap-around problem (where an LSA with a small sequence number is incorrectly deemed newer after the space wraps), which specific arithmetic space is typically employed by modern protocols like OSPF?

Link State routing Hard
A. Linear sequence space with an absolute hard stop at , requiring router reboot.
B. Linear sequence space starting from 0x80000001 to 0x7FFFFFFF, using signed 32-bit integers with a MaxAge timer.
C. Unsigned 64-bit sequence space to ensure wrap-around never practically happens.
D. Lollipop sequence space, starting with negative numbers and transitioning to a circular space.

60 During a massive network instability event (a 'broadcast storm' of topology changes), how do Link State (LS) and Distance Vector (DV) protocols fundamentally differ in their computational degradation at the router level?

Link State routing Hard
A. LS degrades primarily in memory due to table expansions; DV degrades in CPU due to complex matrix multiplications.
B. LS suffers severe CPU spikes due to repeated Dijkstra executions; DV suffers network congestion due to full routing table exchanges.
C. LS limits updates to immediate neighbors, saving CPU; DV floods the entire network, saving memory.
D. Both protocols suffer identically because they both use Bellman-Ford algorithms under the hood.