Routing Table Components

48 questions

Question 1Question

An enterprise router has populated its IPv4 routing table with the following entries:

text
D 10.50.0.0/16 [90/2560512] via 10.1.1.1, 01:12:40, GigabitEthernet0/0
O 10.50.12.0/24 [110/20] via 10.1.1.2, 00:45:12, GigabitEthernet0/1
S 10.50.12.80/28 [1/0] via 10.1.1.3
S 10.50.12.80/29 [250/0] via 10.1.1.4

The router receives a packet with a destination IP address of 10.50.12.8510.50.12.85. Which next-hop IP address will the router select to forward this packet?

Show answer & explanation

Answer: 10.1.1.4

Answer

10.1.1.4 via the longest prefix match route 10.50.12.80/29
When a router processes a packet destination address, it searches the routing table for all matching network prefixes and selects the route with the longest prefix length (most specific mask). The destination address 10.50.12.85 falls within the range 10.50.12.80 - 10.50.12.87 defined by 10.50.12.80/29. Because /29 is longer than /28, /24, and /16, the router forwards the packet using the next-hop 10.1.1.4 regardless of its high administrative distance value of 250.

Step-by-Step Solution

1
Determine which routing table entries match the destination IP address 10.50.12.85.
All four entries (10.50.0.0/16, 10.50.12.0/24, 10.50.12.80/28, and 10.50.12.80/29) contain the IP address 10.50.12.85 within their subnet range.
10.50.12.80/29 spans 10.50.12.80 through 10.50.12.87, which includes 10.50.12.85.
2
Compare the prefix lengths (subnet masks) of all matching entries.
/29 is longer (more specific) than /28, /24, and /16.
Cisco routers use the Longest Prefix Match (LPM) rule as the primary criteria for forwarding decisions.
3
Identify the next-hop address associated with the longest matching prefix.
The route 10.50.12.80/29 points to next-hop 10.1.1.4.
Administrative distance is only evaluated when comparing routes with identical prefix lengths from different sources, not when selecting among matching routes of varying prefix lengths.

Key Concept

Longest Prefix Match (LPM) rule in IPv4 routing decision logic
Estimated Time:1m 15s
Question 2Question

Refer to the following partial output from a Cisco router's IPv4 routing table:

text
Gateway of last resort is not set

172.24.0.0/16 is variably subnetted, 4 subnets, 3 masks
O 172.24.32.0/21 [110/65] via 10.1.1.2, 00:12:45, GigabitEthernet0/0/1
D 172.24.32.0/22 [90/307200] via 10.1.1.6, 02:41:10, GigabitEthernet0/0/2
O IA 172.24.35.0/24 [110/120] via 10.1.1.10, 00:05:22, GigabitEthernet0/0/3
S 172.24.0.0/16 [1/0] via 10.1.1.1

Which next-hop IP address and exit interface will the router select to forward a packet destined for 172.24.35.10172.24.35.10?

Show answer & explanation

Answer: 10.1.1.10 via GigabitEthernet0/0/3

Answer

10.1.1.10 via GigabitEthernet0/0/3
When a router makes a forwarding decision, it evaluates all matching table entries and selects the route with the most specific match—the longest prefix length. The route entry 172.24.35.0/24 covers 172.24.35.10 with a /24 prefix length, which is longer (more specific) than /22, /21, or /16. Therefore, traffic is forwarded to next-hop 10.1.1.10 via interface GigabitEthernet0/0/3.

Step-by-Step Solution

1
Identify all candidate routes that match the destination IP address 172.24.35.10.
The destination address falls into four matching subnet ranges: 172.24.32.0/21, 172.24.32.0/22, 172.24.35.0/24, and 172.24.0.0/16.
Before comparing routing metrics or administrative distance, a router determines which entry ranges include the destination address.
2
Determine the prefix length (subnet mask bits) for each candidate route.
Prefix lengths are /16, /21, /22, and /24.
Cisco IOS routing logic enforces the Longest Prefix Match rule above administrative distance or metric considerations.
3
Select the route with the most specific match (highest number of network prefix bits).
172.24.35.0/24 has the longest prefix match (/24). The associated next-hop is 10.1.1.10 out interface GigabitEthernet0/0/3.
A /24 mask provides a more specific route match than /22, /21, or /16.

Key Concept

Longest Prefix Match Rule in Routing Table Lookup
Question 3Question

A core router receives a packet destined for IP address 172.16.42.95. The router's IPv4 routing table contains four candidate paths to reach this destination:

text O 172.16.40.0/21 [110/65] via 10.1.1.1, 00:14:22, GigabitEthernet0/0/0 D 172.16.42.0/24 [90/307200] via 10.2.2.2, 01:05:10, GigabitEthernet0/0/1 S 172.16.42.64/26 [1/0] via 10.3.3.3 O 172.16.42.80/28 [110/30] via 10.4.4.4, 00:02:45, GigabitEthernet0/0/2

Which next-hop IP address will the router use to forward the packet?

Show answer & explanation

Answer: 10.4.4.4

Answer

The router will forward the packet to next-hop IP address 10.4.4.4 via GigabitEthernet0/0/2 because it has the longest prefix match (/28) containing the destination address 172.16.42.95.
When a router makes a forwarding decision, it evaluates all routing table entries that match the destination IP address and selects the entry with the longest prefix mask (the most specific route). For destination 172.16.42.95, the route 172.16.42.80/28 has a 28-bit mask, which is more specific than /26, /24, or /21. Therefore, the router forwards the packet to next-hop 10.4.4.4.

Step-by-Step Solution

1
Determine which prefixes in the routing table actually match the destination IP address 172.16.42.95.
172.16.40.0/21 covers 172.16.40.0 to 172.16.47.255 (Match). 172.16.42.0/24 covers 172.16.42.0 to 172.16.42.255 (Match). 172.16.42.64/26 covers 172.16.42.64 to 172.16.42.127 (Match). 172.16.42.80/28 covers 172.16.42.80 to 172.16.42.95 (Match).
Before comparing metrics or administrative distances, the router identifies all valid matching routes.
2
Compare the prefix lengths (subnet masks) of all matching routes to apply the Longest Prefix Match rule.
Prefix lengths are /21, /24, /26, and /28. The /28 prefix length is the longest (most specific).
The Cisco IOS forwarding decision always uses the longest prefix match first, regardless of routing source or administrative distance.
3
Identify the next-hop IP address associated with the longest matching route (172.16.42.80/28).
The next-hop address associated with 172.16.42.80/28 is 10.4.4.4.
The router forwards the packet out the exit interface towards 10.4.4.4.

Key Concept

Longest Prefix Match Rule in Routing Table Lookups
Question 4Question

A Cisco router displays the following routing table output:

text
Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks
O 10.75.0.0/16 [110/20] via 192.168.12.2, 00:14:22, GigabitEthernet0/0
D 10.75.96.0/19 [90/307200] via 192.168.13.2, 01:42:05, GigabitEthernet0/1
S 10.75.100.0/24 [1/0] via 192.168.14.2, 03:02:10, GigabitEthernet0/2
O IA 10.75.100.32/27 [110/65] via 192.168.15.2, 00:05:10, GigabitEthernet0/3

The router receives an IP packet destined for 10.75.100.5010.75.100.50. Which next-hop IP address and outgoing interface will the router select to forward this packet?

Show answer & explanation

Answer: 192.168.15.2 via GigabitEthernet0/3

Answer

Next-hop address 192.168.15.2 via interface GigabitEthernet0/3
When a router receives a packet, it compares the destination IP address against all entries in its routing table and selects the route with the longest prefix match (most specific subnet mask). The destination address 10.75.100.50 matches four routes in the routing table: /16, /19, /24, and /27. The /27 route (10.75.100.32/27) has the most matching network bits (27 bits), so the router forwards the packet to next-hop 192.168.15.2 out interface GigabitEthernet0/3.

Step-by-Step Solution

1
Identify all candidate routes that encompass destination IP 10.75.100.50
The address 10.75.100.50 falls within 10.75.0.0/16, 10.75.96.0/19 (10.75.96.0 - 10.75.127.255), 10.75.100.0/24 (10.75.100.0 - 10.75.100.255), and 10.75.100.32/27 (10.75.100.32 - 10.75.100.63).
A packet destination must match the subnet range of a candidate route entry.
2
Apply the Longest Prefix Match (LPM) rule across all matching routes
The prefix lengths are /16, /19, /24, and /27. The longest prefix match is /27 (10.75.100.32/27).
Cisco routers always prefer the route with the most specific prefix (longest subnet mask) regardless of administrative distance or metric.
3
Extract the next-hop IP and outgoing interface from the longest prefix match route entry
The entry 10.75.100.32/27 specifies next-hop 192.168.15.2 via interface GigabitEthernet0/3.
The router uses the forward destination components listed in the winning routing table entry.

Key Concept

Longest Prefix Match Rule
Estimated Time:1m 15s
Question 5Question

An administrator reviews the routing table of a Cisco router and observes the following specific route entry:

text
O 172.31.50.0/26 [110/65] via 10.1.1.2, 00:04:12, GigabitEthernet0/1

Which two statements correctly interpret the components of this routing entry? (Select two.)

Select all that apply

Show answer & explanation

Answer: The administrative distance of this route is 110, identifying OSPF as the routing protocol source.; The metric value for reaching the destination network via this path is 65.

Answer

The statement identifying the administrative distance as 110 (indicating OSPF) and the statement identifying the metric value as 65 are correct.
In Cisco IOS routing tables, a route entry displays the route source code ('O' for OSPF), destination subnet prefix, and bracketed values [Administrative Distance / Metric]. For the route entry provided, 110 is the Administrative Distance and 65 is the OSPF route metric. The egress interface is GigabitEthernet0/1, and 10.1.1.2 is the next-hop router IP address.

Step-by-Step Solution

1
Analyze the prefix code prefixing the routing entry.
The code 'O' indicates the route was dynamically learned through Open Shortest Path First (OSPF).
Routing codes at the beginning of an entry indicate the source protocol.
2
Examine the bracketed numbers [110/65].
The structure is formatted as [Administrative Distance / Metric]. Therefore, AD = 110 and Metric = 65.
Cisco IOS routing entries consistently format believable path trustworthiness (AD) first and protocol metric second.
3
Identify destination subnet and forwarding descriptors.
172.31.50.0/26 is the target subnet, 10.1.1.2 is the next-hop IP address, and GigabitEthernet0/1 is the egress interface.
The 'via' keyword introduces the next-hop IP address for remote networks.

Key Concept

Routing Table Components
Question 6Question

A network administrator is inspecting an IPv4 routing table on a Cisco router to understand how paths to remote networks are chosen. Match each routing table component on the left with its corresponding function or definition on the right.

Click a left item, then click its matching right item

Items

Administrative Distance (AD)
Routing Metric
Next-Hop IP Address
Destination Prefix and Subnet Mask

Matches

Show answer & explanation

Answer

Administrative Distance matches trustworthiness of the route source; Routing Metric matches path cost calculated by a specific protocol; Next-Hop IP Address matches the immediate adjacent router interface address; Destination Prefix and Subnet Mask matches the target network range against which traffic is matched.
Each routing table component serves a distinct role in packet forwarding decisions: Administrative Distance rates protocol trustworthiness, Routing Metric measures path cost for a single protocol, Next-Hop IP specifies the adjacent forwarding device, and Destination Prefix/Mask defines the destination network range.

Step-by-Step Solution

1
Identify the role of Administrative Distance (AD)
AD measures source trustworthiness (lower value = preferred route source)
Different route sources (OSPF, RIP, Static) are compared using AD first.
2
Identify the role of Routing Metric
Metric measures path cost within the same protocol
When multiple routes exist from the same routing protocol, the router uses the lowest metric.
3
Identify the role of Next-Hop IP Address
Refers to the IP address of the adjacent router
Specifies where Layer 2 framing should direct the packet next.
4
Identify the role of Destination Prefix and Subnet Mask
Specifies the target network range
The router compares destination IP addresses against the prefix length using longest prefix match.

Key Concept

Routing Table Components and Roles
Question 7Question

A network administrator executes the show ip route command on a Cisco router and observes the following routing entry:

O 10.150.1.0/24 [110/20] via 192.168.12.2, 00:10:42, GigabitEthernet0/0

Which component of this routing table entry is represented by the value 110?

Show answer & explanation

Answer: The administrative distance of the route

Answer

The value 110 represents the administrative distance of the route.
In Cisco IOS routing tables, routes learned via dynamic protocols display bracketed values in the format [Administrative Distance / Metric]. The first number, 110, is the administrative distance, which indicates the reliability of the routing source (110 is the default AD for OSPF).

Step-by-Step Solution

1
Examine the bracketed notation [110/20] in the routing table entry.
Identify the standard Cisco routing table notation format [Administrative Distance / Metric].
Cisco IOS displays the administrative distance first, followed by the metric, enclosed in square brackets.
2
Correlate the first value (110) with its corresponding routing component.
110 is identified as the Administrative Distance (AD) for an OSPF-learned route.
Administrative distance measures the trustworthiness of a routing information source.

Key Concept

Routing Table Component Interpretation (Administrative Distance vs. Metric)
Question 8Question

A Cisco router receives an IPv4 packet destined for host 10.200.15.42. The router inspects its routing table and finds the following entry routes:

text
O 10.200.15.0/24 [110/20] via 172.16.1.1, GigabitEthernet0/0/1
S 10.200.0.0/16 [1/0] via 172.16.2.1, GigabitEthernet0/0/2
D 10.200.15.32/28 [90/307200] via 172.16.3.1, GigabitEthernet0/0/3
B 10.200.15.40/30 [200/0] via 172.16.4.1, GigabitEthernet0/0/4

Which next-hop IP address and outgoing interface will the router select to forward the packet?

Show answer & explanation

Answer: 172.16.4.1 via GigabitEthernet0/0/4 because the 10.200.15.40/30 route has the longest prefix match.

Answer

The router forwards the packet to next-hop 172.16.4.1 via interface GigabitEthernet0/0/4 because the 10.200.15.40/30 prefix offers the longest prefix match.
When a router receives an IP packet, it compares the destination IP address (10.200.15.42) against all entries in its routing table. The matching entries cover the following ranges:
- 10.200.0.0/16 (/16)
- 10.200.15.0/24 (/24)
- 10.200.15.32/28 (/28: 10.200.15.32 to 10.200.15.47)
- 10.200.15.40/30 (/30: 10.200.15.40 to 10.200.15.43)

Because 10.200.15.42 falls within the /30 range, and /30 is the most specific prefix (longest prefix match), the router selects the entry pointing to 172.16.4.1 via GigabitEthernet0/0/4. Administrative Distance is not evaluated across different prefix lengths.

Step-by-Step Solution

1
Identify all candidate routes in the routing table that encompass the destination IPv4 address 10.200.15.42.
Candidate routes are 10.200.0.0/16, 10.200.15.0/24, 10.200.15.32/28 (range 10.200.15.32–10.200.15.47), and 10.200.15.40/30 (range 10.200.15.40–10.200.15.43). All four entries match the destination address.
Before comparing routing metrics or administrative distance, the router identifies every route that includes the target IP address within its range.
2
Apply the Longest Prefix Match (LPM) rule to choose among matching entries.
Prefix lengths are /16, /24, /28, and /30. The /30 route has the longest mask length (30 set subnet bits).
Cisco IOS packet forwarding decision logic prioritizes prefix specificity above all other metrics, including Administrative Distance and routing protocol metrics.
3
Determine the next-hop IP and outgoing interface from the winning route entry.
The entry 10.200.15.40/30 points to next-hop 172.16.4.1 via GigabitEthernet0/0/4.
The router uses the next-hop parameters specified by the chosen LPM entry to perform Layer 2 frame encapsulation and egress transmission.

Key Concept

Longest Prefix Match (LPM) Rule
Estimated Time:1m 15s
Question 9Question

A Cisco router receives an IPv4 packet destined for 10.25.8.1210.25.8.12. The router inspects its routing table and finds the following matching route entries:

text
S 10.25.0.0/16 [1/0] via 172.16.1.1
O 10.25.8.0/23 [110/30] via 172.16.2.1
D 10.25.8.0/27 [90/2170112] via 172.16.3.1
S* 0.0.0.0/0 [1/0] via 172.16.0.1

Which next-hop IP address will the router choose to forward this packet?

Show answer & explanation

Answer: 172.16.3.1

Answer

The router will forward the packet to next-hop 172.16.3.1 based on the longest prefix match rule.
The destination IP address 10.25.8.12 falls within the subnet range of 10.25.8.0/27 (10.25.8.0 to 10.25.8.31). Because /27 has the largest prefix length among all matching routes (/27 > /23 > /16 > /0), the router uses this route and forwards the packet to 172.16.3.1.

Step-by-Step Solution

1
Evaluate which subnet prefixes match the destination IP address 10.25.8.12.
The destination address 10.25.8.12 matches 10.25.0.0/16, 10.25.8.0/23 (range 10.25.8.0–10.25.9.255), 10.25.8.0/27 (range 10.25.8.0–10.25.8.31), and 0.0.0.0/0.
Before making a forwarding decision, all matching routing entries must be identified.
2
Compare the prefix lengths of all matching routes to determine the most specific route.
The prefix length of /27 is longer (more specific) than /23, /16, and /0.
Cisco routers always prefer the route with the longest prefix match (most specific subnet mask), regardless of administrative distance or routing protocol metric.
3
Identify the next-hop address associated with the longest prefix route entry.
The entry 10.25.8.0/27 specifies the next-hop address 172.16.3.1.
The forwarding engine forwards the traffic out to the next-hop specified by the winning route.

Key Concept

Longest Prefix Match (LPM) Rule
Question 10Question

An administrator examines an IPv4 routing table entry on a Cisco router:

`D 192.168.50.0/24 [90/2170112] via 10.1.1.2, 00:04:12, GigabitEthernet0/1`

Which two statements correctly describe the components of this routing entry? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: The value 90 represents the administrative distance of the route source.; The IP address 10.1.1.2 identifies the next-hop router address to forward packets destined for 192.168.50.0/24.

Answer

The correct statements are that the value 90 represents the administrative distance of the route source, and the IP address 10.1.1.2 identifies the next-hop router address for forwarding packets.
In a Cisco IP routing table entry formatted as `[AD/Metric] via Next-Hop`, the first number inside the square brackets (90) is the administrative distance, which reflects the trustworthiness of EIGRP routes. The IP address following 'via' (10.1.1.2) represents the next-hop forwarding address.

Step-by-Step Solution

1
Parse the bracketed numbers [90/2170112] in the routing table output.
The first number inside the brackets (90) is the Administrative Distance (AD), and the second number (2170112) is the Metric (cost).
Cisco IOS routing tables always display route metrics in the standard format [Administrative Distance / Metric].
2
Identify the next-hop address following the 'via' keyword.
The IP address 10.1.1.2 is identified as the next-hop router IP.
The 'via' field specifies the neighboring router interface to which packets matching the prefix must be sent.
3
Interpret the source code prefix 'D'.
'D' represents EIGRP dynamic routing protocol, not a static route.
The routing table legend uses 'S' for static routes and 'D' for EIGRP routes.

Key Concept

Interpretation of Cisco IP routing table entry components including administrative distance, metric, next-hop address, and route source codes.
Estimated Time:45s
Question 11Question

An administrator executes the command `show ip route` on a Cisco router and observes the following routing table entry:

`O 10.40.0.0/24 [110/50] via 172.16.1.2, 00:15:30, GigabitEthernet0/0`

Which component of the routing table entry is represented by the numerical value 50 inside the brackets?

Show answer & explanation

Answer: The metric (cost) of the route to the destination network

Answer

The numerical value 50 inside the brackets represents the metric (cost) of the route to the destination network.
In Cisco IOS routing tables, bracketed values following a destination network prefix use the standard format `[Administrative Distance / Metric]`. In the given output `[110/50]`, `110` is the default Administrative Distance for OSPF routes, and `50` is the calculated cost metric to reach network `10.40.0.0/24`.

Step-by-Step Solution

1
Identify the standard bracket notation in Cisco IPv4 routing table output.
The bracketed syntax is defined as `[Administrative Distance / Metric]`.
Cisco routers display the trustworthiness (AD) and path cost (metric) together inside square brackets immediately after the network prefix.
2
Parse the bracketed values `[110/50]` from the OSPF route entry.
The first number `110` is the OSPF Administrative Distance, and the second number `50` is the route metric.
Separating the position of each number identifies `50` as the metric/cost value calculated by OSPF.

Key Concept

Routing Table Components: Administrative Distance vs. Metric
Estimated Time:45s
Question 12Question

Refer to the following routing table excerpt from a Cisco router:

text
O 10.20.0.0/16 [110/50] via 172.16.1.1, 01:12:35, GigabitEthernet0/0
D 10.20.10.0/24 [90/307200] via 172.16.2.1, 00:45:10, GigabitEthernet0/1
S 10.20.10.128/25 [1/0] via 172.16.3.1

A packet arrives at the router destined for host IP address 10.20.10.130. Which two statements correctly describe how the router evaluates its routing table components to forward this packet? (Select two.)

Select all that apply

Show answer & explanation

Answer: The router forwards the packet using the static route (10.20.10.128/25) because /25 is the longest matching prefix for destination 10.20.10.130.; The router evaluates prefix length prior to checking administrative distance or metric when making forwarding decisions.

Answer

The router selects the static route (10.20.10.128/25) because /25 is the longest matching prefix for destination 10.20.10.130, and the router evaluates prefix length prior to checking administrative distance or metric when making forwarding decisions.
When forwarding a packet, a Cisco router first identifies all routes that match the destination IP address and selects the route with the longest prefix length (most specific subnet mask). Since 10.20.10.128/25 matches destination 10.20.10.130 with 25 matching network bits, it is selected over the /24 and /16 routes. Administrative distance and metrics are only evaluated during route selection when prefix lengths are identical.

Step-by-Step Solution

1
Compare the destination IP address 10.20.10.130 against all prefix entries in the routing table.
The destination address matches 10.20.0.0/16, 10.20.10.0/24, and 10.20.10.128/25.
Routing forwarding decisions start by identifying all matching routes.
2
Determine the prefix length of each matching route.
The prefix lengths are /16, /24, and /25.
The router applies the longest prefix match rule to find the most specific network path.
3
Select the route with the highest number of matching network bits.
The /25 route (10.20.10.128/25) is chosen regardless of administrative distance or metric values.
Longest prefix match always takes precedence over administrative distance and metric values during forwarding lookup.

Key Concept

Longest Prefix Match Rule in Cisco Routing Tables
Question 13Question

Examine the following IPv4 routing table output from a Cisco router:

text
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

Gateway of last resort is not set

192.168.10.0/24 is subnetted, 3 subnets
O 192.168.10.0/24 [110/20] via 10.1.1.1, 00:05:12, GigabitEthernet0/0
D 192.168.10.0/28 [90/307200] via 10.1.1.2, 00:12:45, GigabitEthernet0/1
S 192.168.10.0/26 [1/0] via 10.1.1.3

The router receives a packet destined for IP address 192.168.10.14. Which next-hop IP address will the router use to forward this packet?

Show answer & explanation

Answer: 10.1.1.2

Answer

The router forwards the packet to next-hop address 10.1.1.2 because 192.168.10.0/28 is the longest prefix match for destination IP address 192.168.10.14.
When a router receives a packet, it compares the destination IP address against all entries in its routing table and selects the route with the most specific match (longest subnet mask length). Destination IP 192.168.10.14 matches the /24, /26, and /28 prefixes. Because /28 is the longest prefix mask (255.255.255.240), the router uses the route pointing to next-hop 10.1.1.2.

Step-by-Step Solution

1
Evaluate all routing table entries to determine which prefixes contain destination IP 192.168.10.14.
The IP address 192.168.10.14 falls within 192.168.10.0/24 (host range .1 to .254), 192.168.10.0/26 (host range .1 to .62), and 192.168.10.0/28 (host range .1 to .14).
Before comparing protocol metrics or administrative distance, the router must identify all candidate routes matching the destination IP.
2
Apply the Longest Prefix Match (LPM) rule by comparing the subnet mask lengths of matching routes.
The prefix length /28 is longer (more specific) than /26 and /24.
Cisco routers always prefer the route with the longest matching prefix length regardless of administrative distance or metric.
3
Identify the next-hop address associated with the chosen /28 route entry.
The entry 'D 192.168.10.0/28 ... via 10.1.1.2' specifies next-hop 10.1.1.2.
The forwarding decision uses the next-hop IP associated with the longest matching route entry.

Key Concept

Longest Prefix Match Rule
Question 14Question

An engineer evaluates an operational Cisco router process handling an incoming packet addressed to target host 172.16.35.45. The active IPv4 routing database displays the following entries:

S 172.16.32.0/20 [1/0] via 10.1.1.1
D 172.16.32.0/21 [90/307200] via 10.3.3.3
O 172.16.35.0/26 [110/65] via 10.2.2.2
B 172.16.0.0/16 [20/0] via 10.4.4.4

Which next-hop IP address will be utilized to transmit this traffic?

Show answer & explanation

Answer: 10.2.2.2

Answer

10.2.2.2 is selected because the OSPF route 172.16.35.0/26 provides the longest prefix match (/26) for the destination IP address 172.16.35.45.
When a router performs a forwarding lookup for a destination IP address (172.16.35.45), it evaluates all matching prefix entries in the IPv4 routing table. In this case, 172.16.35.45 falls into the network ranges of all four listed prefixes (/16, /20, /21, and /26). According to the Longest Prefix Match principle, the router selects the entry with the highest mask length (/26). Therefore, the packet is forwarded to next-hop 10.2.2.2 associated with 172.16.35.0/26.

Step-by-Step Solution

1
Determine subnet boundaries for all routing table entries relative to destination 172.16.35.45
172.16.0.0/16 covers 172.16.0.0 - 172.16.255.255 (Match length /16).
172.16.32.0/20 covers 172.16.32.0 - 172.16.47.255 (Match length /20).
172.16.32.0/21 covers 172.16.32.0 - 172.16.39.255 (Match length /21).
172.16.35.0/26 covers 172.16.35.0 - 172.16.35.63 (Match length /26).
All four entries contain the destination IP address 172.16.35.45.
2
Apply the Longest Prefix Match (LPM) rule to select the forwarding entry
The route with subnet mask /26 (172.16.35.0/26) has the greatest number of matching network bits (26 bits).
Cisco routers always evaluate the most specific route (longest subnet mask) first during packet forwarding decisions, prior to administrative distance or metric comparisons.
3
Identify the next-hop address associated with the chosen /26 route
The route O 172.16.35.0/26 is reachable via next-hop 10.2.2.2.
The next-hop address specified in the routing table for the /26 network is 10.2.2.2.

Key Concept

Longest Prefix Match Rule
Estimated Time:1m 30s
Question 15Question

An administrator examines the following output from a Cisco router's IPv4 routing table:

text
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
O 10.20.30.0/24 [110/20] via 192.168.12.2, 00:15:32, GigabitEthernet0/0
D 10.20.30.32/28 [90/307200] via 192.168.23.2, 01:42:10, GigabitEthernet0/1
S 10.20.30.40/29 [1/0] via 192.168.34.2
O IA 10.20.30.44/30 [110/50] via 192.168.45.2, 00:08:19, GigabitEthernet0/2

Which two statements accurately interpret the components and forwarding behavior of this routing table? (Select two.)

Select all that apply

Show answer & explanation

Answer: Packets destined for host 10.20.30.45 will be egressed via interface GigabitEthernet0/2 because 10.20.30.44/30 provides the longest matching prefix for that destination address.; The bracketed notation [90/307200] in the 10.20.30.32/28 route entry specifies an Administrative Distance of 90 and an EIGRP composite metric of 307200.

Answer

The correct statements are that packets for destination 10.20.30.45 will exit via GigabitEthernet0/2 due to longest prefix match (/30), and that [90/307200] defines an Administrative Distance of 90 and metric of 307200.
The router uses the Longest Prefix Match rule during packet lookup. Since destination 10.20.30.45 falls into 10.20.30.44/30 (range 10.20.30.44 to 10.20.30.47), the /30 prefix length is the longest and takes precedence over /29, /28, and /24. Additionally, routing table bracket notation [X/Y] represents [Administrative Distance / Metric], correctly mapping [90/307200] to AD 90 and EIGRP metric 307200.

Step-by-Step Solution

1
Evaluate subnet range matching for target IP address 10.20.30.45 across all routing table entries.
The target address 10.20.30.45 matches 10.20.30.0/24, 10.20.30.32/28 (32-47), 10.20.30.40/29 (40-47), and 10.20.30.44/30 (44-47).
Before making forwarding decisions, the router determines which routing table prefixes encompass the destination address.
2
Apply the Longest Prefix Match (LPM) rule to select the forwarding route.
Prefix length /30 is more specific than /29, /28, and /24. The route 10.20.30.44/30 is selected.
Routers always prioritize the longest (most specific) network mask when choosing between matching routing entries, regardless of Administrative Distance.
3
Interpret routing table component metrics in the brackets [X/Y].
[90/307200] corresponds to AD=90 (Internal EIGRP) and Metric=307200.
The first number inside the brackets is Administrative Distance (trustworthiness), and the second number is the path metric.

Key Concept

Routing Table Components and Longest Prefix Match Forwarding Logic
Question 16Question

An administrator reviews the following IPv4 routing table snippet on a Cisco router:

text
Gateway of last resort is 172.20.10.1 to network 0.0.0.0

B 10.100.0.0/16 [200/0] via 172.20.10.2, 04:12:30
O IA 10.100.16.0/20 [110/35] via 192.168.20.2, 01:05:18, GigabitEthernet0/1
D 10.100.20.0/22 [90/156160] via 192.168.30.2, 00:18:42, GigabitEthernet0/2
C 192.168.20.0/24 is directly connected, GigabitEthernet0/1
L 192.168.20.1/32 is directly connected, GigabitEthernet0/1

A packet arrives at the router addressed to 10.100.21.5010.100.21.50. Which TWO statements correctly describe how the routing table components are evaluated to forward this packet? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: The router selects the route for 10.100.20.0/22 because it provides the longest prefix match (/22) for the destination IP address.; The routing entry for 10.100.20.0/22 indicates an administrative distance of 90 and a metric of 156160.

Answer

The router selects the route for 10.100.20.0/22 based on the longest prefix match rule, and the routing entry defines an administrative distance of 90 with a metric of 156160.
When evaluating incoming packets for forwarding, Cisco routers determine all matching routes and choose the route with the longest subnet mask (most specific prefix). The address 10.100.21.50 matches three entries, but 10.100.20.0/22 has the longest prefix length (/22). Furthermore, Cisco routing tables present protocol metadata in the bracketed structure [Administrative Distance / Metric], which identifies an administrative distance of 90 and a metric value of 156160 for the EIGRP route.

Step-by-Step Solution

1
Determine which routing table entries match the destination IP address 10.100.21.50.
The destination address matches 10.100.0.0/16, 10.100.16.0/20, and 10.100.20.0/22.
10.100.21.50 falls within the host ranges of all three subnets.
2
Apply the Longest Prefix Match (LPM) forwarding rule.
Select 10.100.20.0/22 because /22 has the longest subnet mask length.
Cisco routers always prefer the route with the most specific prefix length first before evaluating administrative distance or metric.
3
Parse the bracketed components [90/156160] for the selected route.
Administrative Distance is 90 and Metric is 156160.
Cisco output displays bracketed metrics formatted as [Administrative Distance / Metric].

Key Concept

Routing Table Component Interpretation and Longest Prefix Match Selection
Question 17Question

In a Cisco IOS IPv4 routing table displayed via the `show ip route` command, prefix source codes identify how routes were populated. Match each routing table source code on the left with its corresponding route origin and default administrative distance on the right.

Click a left item, then click its matching right item

Items

Source Code C
Source Code S
Source Code O
Source Code D

Matches

Show answer & explanation

Answer

Source Code C matches Directly connected network (Default AD: 0); Source Code S matches Statically configured route (Default AD: 1); Source Code O matches OSPF dynamic routing protocol (Default AD: 110); Source Code D matches EIGRP dynamic routing protocol (Default AD: 90).
Each routing table code corresponds strictly to a routing source and its trust rating (administrative distance). Code C represents connected interfaces (AD 0), code S represents static routes (AD 1), code O represents OSPF routes (AD 110), and code D represents internal EIGRP routes (AD 90).

Step-by-Step Solution

1
Identify the meaning of source code C in Cisco IOS routing output.
Code C stands for Connected networks, assigned an Administrative Distance of 0.
Directly connected interfaces are the most trusted route source.
2
Identify the meaning of source code S in Cisco IOS routing output.
Code S stands for Static routes, assigned a default Administrative Distance of 1.
Static routes are manually created by network administrators.
3
Identify the meaning of source code O in Cisco IOS routing output.
Code O stands for Open Shortest Path First (OSPF), assigned a default Administrative Distance of 110.
Cisco IOS assigns OSPF an AD of 110.
4
Identify the meaning of source code D in Cisco IOS routing output.
Code D stands for EIGRP (derived from the Diffusing Update Algorithm - DUAL), assigned a default internal Administrative Distance of 90.
Letter D is used for EIGRP because E uses Exterior Gateway Protocol in older routing tables.

Key Concept

Routing Table Source Codes and Administrative Distance
Question 18Question

An engineer is troubleshooting IPv4 packet forwarding on a Cisco IOS-XE router. The router receives a packet with a destination IP address of 172.16.100.70. Refer to the routing table output below:

text
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

Gateway of last resort is 10.0.0.1 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 10.0.0.1
S 172.16.100.0/24 [1/0] via 10.1.1.1
O 172.16.100.64/27 [110/50] via 10.2.2.2
D 172.16.100.64/28 [90/2170112] via 10.3.3.3
C 172.16.100.64/30 is directly connected, GigabitEthernet0/0/0

Which next-hop IP address or outgoing interface will the router select to forward this packet?

Show answer & explanation

Answer: 10.3.3.3

Answer

The router will forward the packet to next-hop IP address 10.3.3.3.
The router follows the Longest Prefix Match (LPM) algorithm for packet forwarding. For destination 172.16.100.70, the matching routes in the table are 0.0.0.0/0, 172.16.100.0/24, 172.16.100.64/27 (range 172.16.100.64–172.16.100.95), and 172.16.100.64/28 (range 172.16.100.64–172.16.100.79). Among these valid matches, /28 is the most specific mask (longest prefix length). Administrative Distance and metric are only compared when two routes have the exact same prefix length. Therefore, the router chooses the /28 route with next-hop 10.3.3.3.

Step-by-Step Solution

1
Evaluate all candidate routes in the routing table that encompass destination IP address 172.16.100.70.
The candidate matching routes are 0.0.0.0/0, 172.16.100.0/24, 172.16.100.64/27 (range .64-.95), and 172.16.100.64/28 (range .64-.79). The directly connected 172.16.100.64/30 route covers .64-.67, so it does not match.
Before comparing administrative distance or metric, a router must identify all valid matching prefixes.
2
Apply the Longest Prefix Match (LPM) rule to select the best matching route.
Comparing the prefix lengths of matching routes: /0 < /24 < /27 < /28. The route 172.16.100.64/28 is the longest matching prefix (28 bits).
Cisco routers always prefer the most specific matching prefix (/28 over /27, /24, or /0), regardless of Administrative Distance or routing protocol metric.
3
Identify the next-hop address associated with the winning prefix 172.16.100.64/28.
The route entry for 172.16.100.64/28 specifies 'via 10.3.3.3'.
Packet forwarding uses the next-hop specified by the specific prefix selected by the LPM decision process.

Key Concept

Longest Prefix Match (LPM) Rule in Cisco IPv4 Forwarding Logic
Question 19Question

An engineer is troubleshooting IPv4 packet forwarding on a Cisco router. The router receives a packet with a destination IP address of 172.28.64.99172.28.64.99. The active routing table contains the following entries:

text
S 172.28.0.0/16 [1/0] via 10.1.1.1
O 172.28.64.0/20 [110/20] via 10.2.2.2
D 172.28.64.64/26 [90/307200] via 10.3.3.3
B 172.28.64.96/28 [20/0] via 10.4.4.4

Which next-hop IP address will the router use to forward the packet, and what is the primary routing logic behind this decision?

Show answer & explanation

Answer: Next-hop 10.4.4.4, because 172.28.64.96/28 provides the longest prefix match for destination 172.28.64.99.

Answer

The router forwards the packet to next-hop 10.4.4.4 because 172.28.64.96/28 provides the longest prefix match for the destination address 172.28.64.99.
When a router makes a packet forwarding decision, it compares the destination IP address against all routes in the routing table and selects the route with the most specific match (the longest subnet mask length / prefix length). Destination 172.28.64.99 falls into 172.28.64.96/28 (range 172.28.64.96 - 172.28.64.111). Because /28 is the longest matching mask (28 bits), it takes absolute priority over the /26, /20, and /16 matches, directing traffic to next-hop 10.4.4.4.

Step-by-Step Solution

1
Determine which subnets match the destination IP address 172.28.64.99.
All four routes cover the destination address: 172.28.0.0/16 (172.28.0.0-172.28.255.255), 172.28.64.0/20 (172.28.64.0-172.28.79.255), 172.28.64.64/26 (172.28.64.64-172.28.64.127), and 172.28.64.96/28 (172.28.64.96-172.28.64.111).
Before comparing routing attributes, the router identifies candidate routes whose subnet ranges contain the target IP.
2
Apply the Longest Prefix Match (LPM) rule.
The prefix 172.28.64.96/28 has a mask length of 28 bits, which is greater than /26, /20, or /16.
Routers always prefer the most specific route (longest subnet mask / longest matching prefix) regardless of administrative distance or metric.
3
Identify the next-hop IP associated with the winning route.
The route 172.28.64.96/28 specifies next-hop 10.4.4.4.
The packet is forwarded to the next-hop IP corresponding to the most specific matching prefix entry.

Key Concept

Longest Prefix Match (LPM) in IP Routing Forwarding Decisions
Question 20Question

An network engineer is analyzing various IPv4 routing table entries on a Cisco IOS-XE router. Match each routing table code or bracketed component on the left with its correct operational description on the right.

Click a left item, then click its matching right item

Items

Bracketed notation [120/4] in an entry starting with 'R'
Bracketed notation [170/2578560] in an entry starting with 'D EX'
Prefix source code and symbol 'S*'
Prefix source code 'C'

Matches

Show answer & explanation

Answer

Bracketed notation [120/4] matches the RIP route description with AD 120 and metric 4. Bracketed notation [170/2578560] matches the External EIGRP route with AD 170 and composite metric. Code 'S*' matches the static candidate default route. Code 'C' matches the directly connected network with AD 0.
Each matching pair correctly identifies the Cisco IOS routing table syntax: bracketed notation [AD/Metric], protocol codes ('C' for connected, 'S' for static, 'D EX' for external EIGRP, 'R' for RIP), and special flags such as '*' for candidate default routes.

Step-by-Step Solution

1
Analyze bracketed notation format [AD/Metric]
Identify that the first integer inside brackets is Administrative Distance (trustworthiness) and the second integer is the routing protocol metric (cost).
Cisco IOS routing tables consistently structure route preference metrics as [Administrative Distance / Metric].
2
Evaluate protocol code 'R' and bracket [120/4]
Match with RIP protocol attributes (AD 120, hop count metric 4).
RIP routes use AD 120 and measure metric in hop counts.
3
Evaluate protocol code 'D EX' and bracket [170/2578560]
Match with External EIGRP route attributes.
Internal EIGRP uses AD 90, but external redistributed EIGRP routes ('D EX') use AD 170 and 32-bit composite metric values.
4
Evaluate static default indicator 'S*'
Match with static candidate default route.
'S' stands for static and '*' designates candidate default.
5
Evaluate connected code 'C'
Match with directly connected interface route (AD 0).
'C' represents connected routes directly assigned to router interfaces.

Key Concept

Routing Table Components and Administrative Distance
Estimated Time:2m 0s
Page 1 / 3Next