Routing Table Components

48 questions

Question 21Question

An network administrator reviews routing table entries using the `show ip route` command on a Cisco IOS router. Which two statements correctly describe components of an IPv4 routing table entry?

Select all that apply

Show answer & explanation

Answer: Administrative distance indicates the trustworthiness of the route source, with lower values being preferred.; The metric is a value calculated by a routing protocol to select the best path among multiple routes to the same destination network.

Answer

The two correct statements are that administrative distance measures the trustworthiness of a routing source (with lower values preferred) and that metric is used by a routing protocol to select the best path to a destination network.
Administrative distance measures the trustworthiness of a routing source (where lower numbers represent greater trust), and metrics are used by individual routing protocols to identify the optimal path among available routes.

Step-by-Step Solution

1
Analyze the role of Administrative Distance (AD)
AD defines route trustworthiness from 0 (most trusted) to 255 (unbelievable/untrusted). Lower values are preferred.
AD helps the router choose which routing source to populate into the routing table when multiple sources offer the exact same destination network prefix.
2
Analyze the role of Metric
Metric measures path cost within a single routing protocol (e.g., OSPF cost, RIP hop count).
Routing protocols use metrics to evaluate competing paths to the same destination prefix and choose the best route.
3
Verify forwarding decision order and source codes
Longest prefix match is evaluated first during packet lookup, not AD. Source code 'S' stands for Static, while 'O' stands for OSPF.
This invalidates options suggesting AD precedes prefix length or misidentifying static routes as OSPF.

Key Concept

Routing Table Components and Metrics
Question 22Question

A network administrator is inspecting the IPv4 routing table on a Cisco IOS XE router using the `show ip route` command. Match each routing table entry line on the left to its corresponding architectural component description on the right.

Click a left item, then click its matching right item

Items

D EX 10.5.0.0/16 [170/2578560] via 192.168.1.2
O IA 10.2.0.0/24 [110/30] via 172.16.10.1
L 10.1.1.1/32 is directly connected, GigabitEthernet0/0/0
S* 0.0.0.0/0 [1/0] via 192.168.254.1

Matches

Show answer & explanation

Answer

Each routing entry line matches its unique protocol source code and administrative metric: 'D EX' matches external EIGRP (AD 170); 'O IA' matches OSPF inter-area; 'L 10.1.1.1/32' matches the interface local host route; and 'S* 0.0.0.0/0' matches the candidate default static route.
Each entry correctly aligns with its routing protocol source flag and structural component: 'D EX' designates external EIGRP with AD 170; 'O IA' identifies OSPF inter-area routes; 'L' with a /32 mask represents a local interface host route; and 'S*' indicates a static candidate default route.

Step-by-Step Solution

1
Examine the prefix source code flags at the beginning of each routing entry.
Identify 'D EX' as EIGRP external, 'O IA' as OSPF inter-area, 'L' as local host route, and 'S*' as static candidate default route.
Source codes in Cisco IOS show ip route output define how the route was learned or populated into the RIB.
2
Analyze the Administrative Distance (AD) and metric values inside the brackets [AD/metric].
Verify [170/2578560][170/2578560] for external EIGRP, [110/30][110/30] for OSPF, and [1/0][1/0] for static route.
Administrative Distance rates the trustworthiness of routing information sources.
3
Match each entry to its exact functional component definition.
All four entries correlate to their distinct protocol and structural roles.
Direct mapping of Cisco IOS routing table output identifiers to architectural standards.

Key Concept

Cisco IOS Routing Table Components and Protocol Source Codes
Question 23Question

An enterprise router displays the following output from the `show ip route` command:

text
Gateway of last resort is not set

172.20.0.0/16 is subnetted, 4 subnets
S 172.20.0.0/16 [1/0] via 10.10.10.1
O 172.20.8.0/21 [110/65] via 10.10.20.1, 00:08:12, GigabitEthernet0/0/1
D 172.20.12.0/23 [90/2578560] via 10.10.30.1, 00:22:45, GigabitEthernet0/0/2
O 172.20.13.0/25 [110/110] via 10.10.40.1, 00:03:50, GigabitEthernet0/0/3

The router receives a packet with a destination IPv4 address of 172.20.13.45172.20.13.45. Based on the routing table components and forwarding logic, which next-hop IP address and outbound interface will the router select to forward this packet?

Show answer & explanation

Answer: 10.10.40.1 via GigabitEthernet0/0/3

Answer

Next-hop 10.10.40.1 via GigabitEthernet0/0/3
When a router receives an IP packet, it evaluates all matching prefix entries in its routing table and selects the entry with the longest prefix length (most specific mask). The destination address 172.20.13.45 falls within the range of 172.20.13.0/25 (172.20.13.0 to 172.20.13.127), which has a /25 prefix length. Because /25 is longer and more specific than /23, /21, or /16, the router forwards the packet to next-hop 10.10.40.1 out interface GigabitEthernet0/0/3 regardless of Administrative Distance.

Step-by-Step Solution

1
Identify all candidate routes that match the destination IP address 172.20.13.45
Candidate routes are 172.20.0.0/16, 172.20.8.0/21 (range 172.20.8.0 - 172.20.15.255), 172.20.12.0/23 (range 172.20.12.0 - 172.20.13.255), and 172.20.13.0/25 (range 172.20.13.0 - 172.20.13.127). All 4 entries encompass the destination address.
Before comparing route metrics or administrative distances, the router determines which routing table prefixes physically include the destination IP.
2
Apply the Longest Prefix Match (LPM) rule across all candidate matching entries
Prefix lengths are /16, /21, /23, and /25. The longest and most specific prefix mask is /25 (172.20.13.0/25).
The router forwarding decision logic always prioritizes the most specific prefix (highest prefix length value) over Administrative Distance or metric.
3
Determine the next-hop IP and exit interface associated with the winning route prefix
The route for 172.20.13.0/25 specifies next-hop 10.10.40.1 via interface GigabitEthernet0/0/3.
Packet forwarding parameters are derived directly from the winning prefix entry in the Routing Information Base.

Key Concept

Longest Prefix Match (LPM) resolution in Cisco routing tables
Question 24Question

A network engineer views the following line in a Cisco router's IPv4 routing table:

`O 10.50.4.0/24 [110/65] via 172.16.1.2, 00:18:32, GigabitEthernet0/1`

What component of the routing table entry is represented by the value `110` inside the brackets?

Show answer & explanation

Answer: Administrative distance

Answer

The value 110 represents the administrative distance of the routing protocol.
In Cisco routing table entries, bracketed notation follows the format `[Administrative Distance / Metric]`. The value `110` is the default Administrative Distance for OSPF routes, measuring the trustworthiness of the route source.

Step-by-Step Solution

1
Analyze the bracketed values in the routing table entry: `[110/65]`.
Identify that Cisco IOS routing entries format protocol trust and path cost as `[Administrative Distance / Metric]`.
Understanding standard Cisco CLI routing table component syntax.
2
Evaluate the first position inside the bracket.
The first number `110` corresponds to Administrative Distance, which is the default trustworthiness value for OSPF routes.
Distinguish Administrative Distance from the route metric.

Key Concept

Interpretation of Routing Table Bracketed Syntax [AD/Metric]
Question 25Question

An enterprise Cisco IOS-XE router displays the following IPv4 routing table entries:

text
Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks
O 172.16.10.0/24 [110/65] via 10.0.0.1, 01:15:22, GigabitEthernet0/1
D 172.16.10.0/25 [90/307200] via 10.0.0.2, 00:45:10, GigabitEthernet0/2
S 172.16.0.0/16 [1/0] via 10.0.0.3
C 172.16.10.128/25 is directly connected, GigabitEthernet0/3

Which two statements correctly describe how the router processes traffic based on these routing table components?

Select all that apply

Show answer & explanation

Answer: A packet destined to 172.16.10.50 is forwarded out interface GigabitEthernet0/2 because the /25 EIGRP route represents the longest prefix match.; A packet destined to 172.16.10.200 is forwarded out interface GigabitEthernet0/3 because the connected subnet 172.16.10.128/25 is the longest prefix match.

Answer

Packets destined to 172.16.10.50 are egressed via GigabitEthernet0/2 due to the /25 EIGRP route being the longest prefix match, and packets destined to 172.16.10.200 are egressed via GigabitEthernet0/3 because the connected /25 route provides the longest prefix match for that address range.
Router forwarding decision logic evaluates routes using the Longest Prefix Match (LPM) rule. For 172.16.10.50, the EIGRP subnet 172.16.10.0/25 (/25 mask length) is longer than the OSPF /24 and static /16 routes. For 172.16.10.200, the directly connected subnet 172.16.10.128/25 (/25 mask length) is longer than the OSPF /24 and static /16 routes. Thus, both statements reflecting LPM selections out GigabitEthernet0/2 and GigabitEthernet0/3 are correct.

Step-by-Step Solution

1
Analyze matching prefix routes for destination address 172.16.10.50.
Destination 172.16.10.50 matches 172.16.0.0/16 (static), 172.16.10.0/24 (OSPF), and 172.16.10.0/25 (EIGRP range 172.16.10.0 - 172.16.10.127).
Routing decisions prioritize prefix mask length over Administrative Distance or metric.
2
Determine the forwarding interface for 172.16.10.50.
The /25 route (172.16.10.0/25) has the longest mask length. Traffic is routed via 10.0.0.2 out GigabitEthernet0/2.
Longest Prefix Match (LPM) rule dictates selecting the longest subnet mask among all matching routes.
3
Analyze matching prefix routes for destination address 172.16.10.200.
Destination 172.16.10.200 matches 172.16.0.0/16 (static), 172.16.10.0/24 (OSPF), and 172.16.10.128/25 (Connected range 172.16.10.128 - 172.16.10.255). It does NOT match 172.16.10.0/25.
Address 172.16.10.200 falls strictly into the upper half of the /24 network block.
4
Determine the forwarding interface for 172.16.10.200.
The connected route 172.16.10.128/25 has the longest prefix match (/25 vs /24 vs /16). Traffic egresses directly out GigabitEthernet0/3.
LPM resolution selects /25 over /24 and /16.

Key Concept

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

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

text
Gateway of last resort is not set

192.168.10.0/24 is variably subnetted, 4 subnets, 3 masks
O 192.168.10.0/24 [110/20] via 10.1.1.1, 00:05:12, GigabitEthernet0/0
D 192.168.10.0/26 [90/307200] via 10.1.1.2, 00:12:45, GigabitEthernet0/1
S 192.168.10.0/27 [1/0] via 10.1.1.3
O E2 192.168.10.16/28 [110/20] via 10.1.1.4, 00:01:10, GigabitEthernet0/2

Which next-hop IPv4 address will the router select to forward a packet with a destination IP address of 192.168.10.20?

Show answer & explanation

Answer: 10.1.1.4

Answer

The router will select the next-hop address 10.1.1.4.
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 matching prefix (most specific subnet mask). In this scenario, the destination address 192.168.10.20 matches 192.168.10.0/24, 192.168.10.0/26, 192.168.10.0/27, and 192.168.10.16/28. The /28 route is the most specific match (28 bits), so the router uses its specified next-hop address, 10.1.1.4.

Step-by-Step Solution

1
Determine which subnet ranges contain the destination IP address 192.168.10.20.
The destination address 192.168.10.20 falls within 192.168.10.0/24 (.0 - .255), 192.168.10.0/26 (.0 - .63), 192.168.10.0/27 (.0 - .31), and 192.168.10.16/28 (.16 - .31).
All four routes in the routing table match the destination address.
2
Compare the prefix lengths of all matching routes to apply the Longest Prefix Match rule.
The prefix length of /28 (28 subnet bits) is longer than /27, /26, and /24.
The router always prioritizes the route with the most specific match (longest subnet mask / prefix length), regardless of administrative distance or routing protocol source.
3
Identify the next-hop IPv4 address associated with the /28 matching entry.
The route for 192.168.10.16/28 specifies the next-hop address 10.1.1.4.
The router forwards packets matching this prefix to 10.1.1.4 out GigabitEthernet0/2.

Key Concept

Longest Prefix Match Rule
Question 27Question

Match each component or prefix notation from a Cisco IOS routing table output to its correct technical characteristic or forwarding behavior.

Click a left item, then click its matching right item

Items

Code prefix 'D EX' in: D EX 192.168.50.0/24 [170/2578560] via 10.1.1.2
Bracketed notation '[110/65]' in: O 10.1.4.0/24 [110/65] via 10.1.12.1
Prefix '192.168.10.0/28' vs '192.168.10.0/24' when forwarding to 192.168.10.14
Code prefix 'C' in: C 172.16.1.0/24 is directly connected, GigabitEthernet0/0

Matches

Show answer & explanation

Answer

Each routing table notation matches its corresponding definition based on Cisco IOS routing table syntax and path determination rules: 'D EX' matches external EIGRP with AD 170, '[110/65]' matches AD 110 and metric 65, the '/28' prefix matches the Longest Prefix Match rule, and 'C' matches a directly connected network with AD 0.
Each routing table component directly corresponds to Cisco IOS routing table syntax and path determination logic. 'D EX' signifies EIGRP external routes (AD 170); bracketed numbers '[110/65]' display Administrative Distance followed by Metric; destination matching favors the longest subnet mask (/28 over /24); and 'C' represents directly connected routes with an AD of 0.

Step-by-Step Solution

1
Analyze routing table protocol codes
Identify 'D EX' as EIGRP External (AD 170) and 'C' as Connected (AD 0).
Cisco IOS routing tables use specific legend codes to indicate how routes were learned.
2
Interpret numerical brackets [AD/Metric]
Confirm '[110/65]' represents Administrative Distance 110 (OSPF) and a cost metric of 65.
The first number in brackets is always the Administrative Distance and the second is the route metric.
3
Apply forwarding logic to destination lookup
Determine that the /28 route is selected over /24 because 28 matching bits exceeds 24 matching bits.
Longest prefix matching (LPM) is the fundamental rule evaluated before comparing administrative distance or metric.

Key Concept

Interpretation of Cisco IOS Routing Table Components and Forwarding Decision Logic
Question 28Question

A Cisco router's IPv4 routing table contains the following entries:

text
Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 5 subnets, 3 masks
O 10.180.0.0/14 [110/65] via 192.168.12.2, 00:04:12, GigabitEthernet0/0/1
D 10.180.0.0/16 [90/307200] via 192.168.10.2, 01:15:04, GigabitEthernet0/0/0
S 10.180.32.0/19 [1/0] via 192.168.15.1, GigabitEthernet0/0/3
O IA 10.180.40.0/22 [110/120] via 192.168.14.2, 00:10:05, GigabitEthernet0/0/2

When a packet destined for IP address 10.180.42.100 arrives at the router, which route entry will the router select to forward the packet?

Show answer & explanation

Answer: The OSPF inter-area route to 10.180.40.0/22 because it provides the longest prefix match for the destination address.

Answer

The router will select the OSPF inter-area route to 10.180.40.0/22 because 10.180.42.100 matches that route with a /22 prefix length, which is the longest matching prefix.
The destination address 10.180.42.100 matches multiple entries in the routing table. Cisco routers evaluate forwarding decisions using the Longest Prefix Match rule, which prioritizes the route with the longest subnet mask length regardless of administrative distance or metric. The route 10.180.40.0/22 covers range 10.180.40.0 to 10.180.43.255, giving a 22-bit matching prefix, which is longer than /19, /16, or /14.

Step-by-Step Solution

1
Determine which routing table entries match the destination IP 10.180.42.100.
Destination 10.180.42.100 falls into 10.180.0.0/14 (10.180.0.0 - 10.183.255.255), 10.180.0.0/16 (10.180.0.0 - 10.180.255.255), 10.180.32.0/19 (10.180.32.0 - 10.180.63.255), and 10.180.40.0/22 (10.180.40.0 - 10.180.43.255). All four routes are valid matches.
Before making forwarding decisions, the router identifies all routes matching the destination IP address.
2
Compare the prefix lengths of all matching routes to apply the Longest Prefix Match rule.
The prefix lengths are /14, /16, /19, and /22. The longest (most specific) prefix length is /22.
The fundamental routing lookup logic in Cisco IOS prefers the route with the most specific mask (longest subnet mask / highest number of prefix bits).
3
Select the route corresponding to the longest prefix match.
The entry 'O IA 10.180.40.0/22 [110/120] via 192.168.14.2' is selected.
Administrative Distance and metric are completely ignored when comparing routes of different prefix lengths.

Key Concept

Longest Prefix Match Rule in Cisco Routing Tables
Question 29Question

An enterprise Cisco router displays the following IPv4 routing table output:

text
Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 4 subnets, 4 masks
O 10.45.0.0/16 [110/65] via 192.168.1.1, 01:15:02, GigabitEthernet0/0
D 10.45.12.0/22 [90/2172416] via 192.168.2.1, 00:42:10, GigabitEthernet0/1
S 10.45.12.0/24 [1/0] via 192.168.3.1
C 10.45.12.128/25 is directly connected, GigabitEthernet0/2

Which two statements correctly describe how the router processes traffic destined to 10.45.12.15010.45.12.150 and interpret its routing table components? (Select two.)

Select all that apply

Show answer & explanation

Answer: The router forwards the packet out interface GigabitEthernet0/2 because 10.45.12.128/25 provides the longest prefix match for destination 10.45.12.150.; The bracketed numbers [110/65] in the OSPF route entry represent an Administrative Distance of 110 and a route Metric of 65.

Answer

The router egresses traffic out GigabitEthernet0/2 based on the longest prefix match rule (10.45.12.128/25), and the notation [110/65] defines an Administrative Distance of 110 and a Metric of 65.
Traffic destined to 10.45.12.150 matches multiple entries in the routing table, but 10.45.12.128/25 has the longest prefix length (25 bits), making GigabitEthernet0/2 the elected forwarding interface. Additionally, standard Cisco routing table syntax formats protocol entries as [Administrative Distance / Metric], meaning [110/65] indicates an AD of 110 and an OSPF metric of 65.

Step-by-Step Solution

1
Analyze candidate destination matching prefixes for destination IP 10.45.12.150.
The destination address 10.45.12.150 matches 10.45.0.0/16, 10.45.12.0/22, 10.45.12.0/24, and 10.45.12.128/25 (range 10.45.12.128 to 10.45.12.255).
All four subnet ranges encompass IP address 10.45.12.150.
2
Apply the Longest Prefix Match (LPM) forwarding rule.
Prefix length /25 is longer (more specific) than /24, /22, and /16. Thus, route C (10.45.12.128/25) is chosen, forwarding traffic directly out GigabitEthernet0/2.
Routers always prioritize prefix length over Administrative Distance and metric when determining the forwarding path.
3
Decode the standard Cisco routing table notation components.
For entry 'O 10.45.0.0/16 [110/65]', the first value inside brackets represents Administrative Distance (110) and the second value represents Metric/Cost (65).
This is the mandatory syntax used by Cisco IOS/IOS-XE to display route trustworthiness and path cost.

Key Concept

Routing Table Components and Longest Prefix Match Decision Logic
Question 30Question

An administrator executes the `show ip route` command on a Cisco enterprise router, resulting in the following partial routing table output:

text
Codes: C - connected, S - static, O - OSPF, D - EIGRP

Gateway of last resort is not set

10.250.0.0/16 is variably subnetted, 4 subnets, 4 masks
O 10.250.16.0/20 [110/20] via 192.168.1.2, 00:14:22, GigabitEthernet0/0
D 10.250.16.0/24 [90/307200] via 192.168.1.6, 00:05:10, GigabitEthernet0/1
S 10.250.16.128/26 [1/0] via 192.168.1.10
C 10.250.16.128/27 is directly connected, GigabitEthernet0/2

Which two statements accurately describe how the router interprets these components and forwards traffic? (Select two.)

Select all that apply

Show answer & explanation

Answer: A packet destined for 10.250.16.130 is egressed via GigabitEthernet0/2 because it matches the route with the longest prefix length (/27).; The bracketed output [90/307200] specifies an Administrative Distance of 90 and a routing metric of 307200 for the EIGRP-learned subnet.

Answer

Packets for 10.250.16.130 match the /27 route out GigabitEthernet0/2 due to the longest prefix match rule, and the bracketed entry [90/307200] defines Administrative Distance as 90 and Metric as 307200.
When forwarding an IP packet, the router selects the route that matches the destination IP address with the longest prefix length (most specific subnet mask). Destination 10.250.16.130 fits within 10.250.16.128/27, which is a longer prefix than /26, /24, or /20, making GigabitEthernet0/2 the correct egress path. Additionally, Cisco IOS displays administrative distance and metric formatted as [Administrative Distance/Metric], meaning [90/307200] denotes an AD of 90 and a metric of 307200.

Step-by-Step Solution

1
Evaluate destination IP 10.250.16.130 against all matching prefix ranges in the routing table.
10.250.16.130 falls into 10.250.16.0/20, 10.250.16.0/24, 10.250.16.128/26, and 10.250.16.128/27.
The router determines all candidates that enclose the destination IP address.
2
Apply the Longest Prefix Match (LPM) rule to select the best forwarding path among matching routes.
The subnet 10.250.16.128/27 has the longest prefix length (/27 > /26 > /24 > /20) and is chosen, forwarding the packet out GigabitEthernet0/2.
Longest prefix match always takes precedence over administrative distance or metric when forwarding IP traffic.
3
Decode the standard Cisco IOS bracketed routing table fields [AD/Metric].
For [90/307200], 90 is the Administrative Distance (EIGRP internal default) and 307200 is the EIGRP composite metric.
In Cisco IOS output format [X/Y], the first integer represents Administrative Distance and the second integer represents the protocol metric.

Key Concept

Routing Table Interpretation and Longest Prefix Match Forwarding Logic
Question 31Question

An enterprise Cisco router receives an IPv4 packet destined for IP address 192.168.50.75. The router's routing table contains the following entries:

text
Codes: C - connected, S - static, O - OSPF, D - EIGRP

Gateway of last resort is not set

192.168.50.0/24 is variably subnetted, 4 subnets, 3 masks
O 192.168.50.0/24 [110/20] via 10.1.1.1, 00:14:22, GigabitEthernet0/0
S 192.168.50.0/25 [1/0] via 10.3.3.3
D 192.168.50.64/26 [90/30720] via 10.2.2.2, 00:08:15, GigabitEthernet0/1
C 192.168.50.64/28 is directly connected, GigabitEthernet0/2

Which forwarding path will the router select to forward this packet?

Show answer & explanation

Answer: Out GigabitEthernet0/2, because 192.168.50.64/28 provides the longest matching prefix for the destination IP address.

Answer

The router will forward the packet out interface GigabitEthernet0/2 because the directly connected prefix 192.168.50.64/28 provides the longest prefix match (28 matching bits) for the destination IP 192.168.50.75.
When a router makes a packet forwarding decision, it checks all routes in the IPv4 routing table that encompass the destination IP address. The fundamental rule of IP routing is Longest Prefix Match (LPM): the route with the most specific prefix length (largest prefix number) is selected. Here, the target IP 192.168.50.75 falls into 192.168.50.64/28 (range .64 to .79). Because /28 is longer than /26, /25, and /24, the router forwards the packet directly out GigabitEthernet0/2.

Step-by-Step Solution

1
Determine subnet ranges for all routing table entries
192.168.50.0/24 covers 192.168.50.0–192.168.50.255; 192.168.50.0/25 covers 192.168.50.0–192.168.50.127; 192.168.50.64/26 covers 192.168.50.64–192.168.50.127; 192.168.50.64/28 covers 192.168.50.64–192.168.50.79.
Identify which routes in the routing table actually match the destination IP address 192.168.50.75.
2
Check destination IP 192.168.50.75 against matching subnets
The destination address 192.168.50.75 matches all four listed routes in the routing table.
All four routes enclose the IP address 192.168.50.75 within their network address boundaries.
3
Apply the Longest Prefix Match (LPM) rule
Prefix lengths are /24, /25, /26, and /28. The /28 prefix has the greatest number of matching subnet mask bits.
Cisco IOS routing logic prioritizes the most specific prefix (longest netmask / highest prefix length) first before evaluating Administrative Distance or Metric.

Key Concept

Longest Prefix Match (LPM) Rule in Cisco IPv4 Routing
Question 32Question

Match each Cisco IPv4 routing table component to its correct functional description based on standard Cisco IOS routing operations.

Click a left item, then click its matching right item

Items

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

Matches

Show answer & explanation

Answer

Destination Prefix and Subnet Mask matches 'Specifies the target network address range evaluated using longest prefix match logic.' Administrative Distance matches 'Defines the believability or trustworthiness rating of a route source when multiple protocols learn the same destination.' Routing Metric matches 'Represents the path cost or tie-breaker value calculated by a specific routing protocol to select the best path.' Next-Hop IP Address matches 'Indicates the IP address of the adjacent router interface to which traffic for the network should be forwarded.'
Each routing table component serves a distinct role in Cisco packet forwarding. The destination prefix identifies the destination subnet; administrative distance evaluates source trustworthiness across protocols; the metric determines path cost within the same protocol; and the next-hop address identifies the adjacent forwarding device.

Step-by-Step Solution

1
Analyze the role of Destination Prefix and Subnet Mask
Identifies the network boundary used during prefix matching.
The subnet mask specifies how many bits represent the network portion of an IP address.
2
Analyze Administrative Distance (AD)
Identifies the administrative ranking between different protocol sources (e.g., OSPF AD 110 vs. EIGRP AD 90).
AD measures route source trustworthiness before routes enter the routing table.
3
Analyze Routing Metric
Identifies protocol-specific path evaluation metrics (e.g., bandwidth, delay, cost).
Metrics compare alternative paths provided by the same routing protocol.
4
Analyze Next-Hop IP Address
Identifies the adjacent forwarding device address.
Routers rewrite Layer 2 headers using the MAC address corresponding to the next-hop IP.

Key Concept

Routing Table Components and Interpretation
Question 33Question

A Cisco router contains the following partial output in its 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, 4 subnets, 3 masks
O 10.88.0.0/16 [110/20] via 192.168.1.1, 00:14:22, GigabitEthernet0/0/0
D 10.88.12.0/22 [90/30720] via 192.168.2.1, 01:45:10, GigabitEthernet0/0/1
S 10.88.14.0/24 [1/0] via 192.168.3.1, 04:12:00, GigabitEthernet0/0/2
O 10.88.14.32/28 [110/65] via 192.168.4.1, 00:05:30, GigabitEthernet0/0/3

When the router receives a packet with the destination IP address 10.88.14.45, which next-hop IP address and outgoing interface will it use to forward the packet?

Show answer & explanation

Answer: 192.168.4.1 via GigabitEthernet0/0/3

Answer

192.168.4.1 via GigabitEthernet0/0/3
The router uses the Longest Prefix Match rule to make forwarding decisions. Comparing all matching subnet masks (/16, /22, /24, and /28) for destination 10.88.14.45 shows that 10.88.14.32/28 provides the longest (most specific) prefix match. Therefore, the router forwards traffic to next-hop 192.168.4.1 out interface GigabitEthernet0/0/3, regardless of administrative distance or metric values.

Step-by-Step Solution

1
Evaluate all routes in the routing table to find matches for destination IP 10.88.14.45.
Four routes match the destination: 10.88.0.0/16, 10.88.12.0/22, 10.88.14.0/24, and 10.88.14.32/28.
The destination address 10.88.14.45 resides inside all four subnet boundaries.
2
Apply the Longest Prefix Match (LPM) rule by comparing prefix lengths of all matching routes.
The subnet 10.88.14.32/28 has a 28-bit mask, which is longer than /24, /22, and /16.
Routers always prefer the most specific route (longest subnet mask) first when making forwarding decisions.
3
Identify the next-hop IP and exit interface for the winning route 10.88.14.32/28.
The routing entry specifies 'via 192.168.4.1, GigabitEthernet0/0/3'.
Administrative distance and metric are only evaluated when comparing candidate routes with identical prefix lengths.

Key Concept

Longest Prefix Match (LPM) rule in Cisco IPv4 packet forwarding logic
Question 34Question

An administrator inspects the IPv4 routing table on a Cisco router and observes the following partial output:

text
Codes: C - connected, S - static, D - EIGRP, O - OSPF, B - BGP

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 4 subnets, 4 masks
O 10.200.0.0/16 [110/50] via 172.16.1.1, 00:24:12, GigabitEthernet0/1
D 10.200.64.0/18 [90/2172416] via 172.16.2.1, 02:15:04, GigabitEthernet0/2
S 10.200.64.0/24 [120/0] via 172.16.3.1, GigabitEthernet0/3
B 10.200.64.0/20 [20/100] via 172.16.4.1, 05:10:20, GigabitEthernet0/4

Which two statements accurately describe how the router will forward packets based on these routing table components? (Select two.)

Select all that apply

Show answer & explanation

Answer: Packets destined for 10.200.64.50 are forwarded out interface GigabitEthernet0/3 because the /24 prefix length represents the longest prefix match.; Packets destined for 10.200.70.15 are forwarded via next-hop 172.16.4.1 out interface GigabitEthernet0/4.

Answer

Packets destined for 10.200.64.50 are forwarded out GigabitEthernet0/3 due to the longest prefix match (/24), and packets destined for 10.200.70.15 are forwarded via next-hop 172.16.4.1 out GigabitEthernet0/4 because /20 is the most specific matching prefix.
A Cisco router forwards packets by comparing the destination IP address against the routing table using the Longest Prefix Match rule. For 10.200.64.50, the /24 entry offers the highest mask length among all matching routes, directing traffic out GigabitEthernet0/3. For 10.200.70.15, the host IP address falls within the 10.200.64.0/20 range (10.200.64.0 to 10.200.79.255), which is more specific than the /18 or /16 entries and excludes the /24 entry. Therefore, it uses the BGP route via 172.16.4.1.

Step-by-Step Solution

1
Determine the subnet ranges and prefix lengths for all candidate entries in the routing table snippet.
10.200.0.0/16 covers 10.200.0.0 - 10.200.255.255 (/16);
10.200.64.0/18 covers 10.200.64.0 - 10.200.127.255 (/18);
10.200.64.0/20 covers 10.200.64.0 - 10.200.79.255 (/20);
10.200.64.0/24 covers 10.200.64.0 - 10.200.64.255 (/24).
Routing decisions prioritize prefix length (specificity) over all other route parameters.
2
Evaluate destination IP address 10.200.64.50.
Matches /16, /18, /20, and /24 routes. The /24 static route is the longest match.
24 bits is greater than 20, 18, and 16 bits. Administrative distance (120 vs 90) is irrelevant across different prefix lengths.
3
Evaluate destination IP address 10.200.70.15.
Matches /16, /18, and /20 routes, but falls outside the /24 subnet. The /20 BGP route is the longest matching route.
70 is within the range 64-79 (/20), but outside 64.0-64.255 (/24). The next-hop is 172.16.4.1 via GigabitEthernet0/4.

Key Concept

Longest Prefix Match Forwarding Logic
Question 35Question

Match each IPv4 routing table entry from a Cisco IOS 'show ip route' display to its correct protocol source classification and administrative properties.

Click a left item, then click its matching right item

Items

D 192.168.10.0/24 [90/2170112] via 10.1.1.2
O 172.16.1.0/24 [110/20] via 10.1.1.6
S 10.2.2.0/24 [1/0] via 10.1.1.2
C 10.1.1.0/30 is directly connected, GigabitEthernet0/0

Matches

Show answer & explanation

Answer

Each routing table entry matches its corresponding protocol code, administrative distance, and metric: 'D' maps to Internal EIGRP (AD 90), 'O' maps to OSPF (AD 110), 'S' maps to Static (AD 1), and 'C' maps to Directly Connected (AD 0).
Routing table entries display their learning source code followed by the prefix, bracketed administrative distance and metric values [AD/Metric], next-hop IP, and outgoing interface. Code D identifies EIGRP (default AD 90), code O identifies OSPF (default AD 110), code S identifies Static routes (default AD 1), and code C identifies Connected networks (AD 0).

Step-by-Step Solution

1
Identify the protocol code prefix at the start of each routing entry.
D corresponds to EIGRP, O corresponds to OSPF, S corresponds to Static, and C corresponds to Connected.
Cisco IOS routing tables use single-letter prefix codes to identify how each route was learned.
2
Parse the bracketed values [Administrative Distance / Metric] for dynamically learned and static routes.
The first number inside brackets represents Administrative Distance (AD), and the second number represents the protocol metric.
AD measures route source trustworthiness while metric determines path preference within the protocol.
3
Match each entry to its exact functional description based on AD and metric values.
Entry with code D matches EIGRP (AD 90), entry with code O matches OSPF (AD 110), entry with code S matches Static (AD 1), and entry with code C matches Directly Connected (AD 0).
Each routing protocol has standard default administrative distance values recognized by Cisco IOS.

Key Concept

Routing Table Components and Source Codes
Question 36Question

A Cisco router displays the following partial 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.150.0.0/16 [110/20] via 192.168.12.2, 00:14:22, GigabitEthernet0/0
D 10.150.32.0/19 [90/2578560] via 192.168.23.2, 00:05:10, GigabitEthernet0/1
S 10.150.32.0/24 [1/0] via 192.168.34.2, 01:12:00, GigabitEthernet0/2
O IA 10.150.32.128/26 [110/30] via 192.168.45.2, 00:02:45, GigabitEthernet0/3

The router receives a packet destined for 10.150.32.13510.150.32.135. Which interface will the router select to forward this packet?

Show answer & explanation

Answer: GigabitEthernet0/3

Answer

The router forwards the packet out of interface GigabitEthernet0/3 because the route 10.150.32.128/26 provides the longest matching prefix for destination IP 10.150.32.135.
When a router makes a forwarding decision, it evaluates all matching routing table entries and selects the route with the longest prefix mask (the most specific match). The destination IP address 10.150.32.135 falls into the subnet 10.150.32.128/26 (range 10.150.32.128 through 10.150.32.191). Because /26 is the longest subnet mask among all valid candidate routes, the router forwards the packet out of GigabitEthernet0/3.

Step-by-Step Solution

1
Identify candidate routes matching the destination IP address 10.150.32.135
Candidate routes include: 10.150.0.0/16, 10.150.32.0/19, 10.150.32.0/24, and 10.150.32.128/26 (range 10.150.32.128–10.150.32.191). All four candidate routes match the destination IP address.
Before comparing routing metrics or administrative distances, a router first evaluates all installed routes to determine which prefix ranges encompass the destination IP.
2
Apply the Longest Prefix Match (LPM) rule
The prefix 10.150.32.128/26 has a 26-bit mask length, which is longer than /24, /19, and /16.
Routers always prefer the route with the most specific (longest prefix mask) match regardless of administrative distance or metric.
3
Determine the egress interface associated with the longest prefix match route
The entry 10.150.32.128/26 specifies next-hop 192.168.45.2 via interface GigabitEthernet0/3.
The forwarding decision is dictated by the interface bound to the winning longest prefix route.

Key Concept

Longest Prefix Match (LPM) Logic
Question 37Question

A Cisco router displays the following output from the command `show ip route`:

text
Gateway of last resort is not set

10.45.12.0/24 is variably subnetted, 4 subnets, 4 masks
O 10.45.12.0/25 [110/20] via 192.168.1.2, 00:14:22, GigabitEthernet0/0
D 10.45.12.64/26 [90/307200] via 192.168.2.2, 00:08:15, GigabitEthernet0/1
S 10.45.12.80/28 [1/0] via 192.168.3.2
O E2 10.45.12.88/30 [110/20] via 192.168.4.2, 00:02:10, GigabitEthernet0/3

The router receives an IP packet with a destination address of 10.45.12.8910.45.12.89. Which next-hop address and exit interface will the router select to forward this packet?

Show answer & explanation

Answer: 192.168.4.2 via GigabitEthernet0/3 because the /30 subnet mask provides the longest prefix match for the destination address.

Answer

The router forwards the packet to next-hop address 192.168.4.2 via interface GigabitEthernet0/3 because 10.45.12.88/30 provides the longest prefix match.
When a router receives a packet, it compares the destination IP address against all entries in the routing table and forwards the packet using the route with the most specific subnet mask (longest prefix match). For destination 10.45.12.89, all four table entries encompass the address, but 10.45.12.88/30 has the longest prefix length (/30), making next-hop 192.168.4.2 via GigabitEthernet0/3 the correct path.

Step-by-Step Solution

1
Evaluate candidate routes matching destination IP 10.45.12.89
Destination 10.45.12.89 falls into: 10.45.12.0/25 (.0-.127), 10.45.12.64/26 (.64-.127), 10.45.12.80/28 (.80-.95), and 10.45.12.88/30 (.88-.91). All 4 entries are valid candidate routes.
Before selecting a route, the router identifies all entries in the IPv4 routing table whose network boundaries encompass the destination address.
2
Apply Longest Prefix Match (LPM) rule
The prefix lengths are /25, /26, /28, and /30. The /30 route has the most specific mask (longest matching network prefix length of 30 bits).
Routers always prioritize prefix specificity (longest mask length) over Administrative Distance (AD) or metric when determining forwarding decisions.
3
Identify corresponding next-hop and interface
The entry 10.45.12.88/30 specifies next-hop 192.168.4.2 via interface GigabitEthernet0/3.
The forwarding table uses the next-hop IP and outgoing interface tied directly to the winning LPM route.

Key Concept

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

Match each Cisco IOS IPv4 routing table entry component to its correct functional definition or metric descriptor.

Click a left item, then click its matching right item

Items

Administrative Distance (AD)
Routing Metric
Next-Hop Address
Prefix Length

Matches

Show answer & explanation

Answer

Administrative Distance matches the measure of route source trustworthiness; Routing Metric matches the path cost calculated by a specific protocol; Next-Hop Address matches the IPv4 address of the adjacent router interface; Prefix Length matches the subnet mask specifier in CIDR notation used for longest prefix match.
Each entry component in a Cisco IOS routing table plays a distinct role: Administrative Distance measures source believability (0-255), Routing Metric determines the best path within a specific routing protocol, the Next-Hop Address defines the adjacent router's interface IP for forwarding, and the Prefix Length dictates how many bits match the destination address during lookup.

Step-by-Step Solution

1
Analyze Administrative Distance (AD)
AD evaluates protocol trustworthiness (e.g., lower AD is preferred when different protocols report the same prefix).
It allows Cisco IOS to prioritize route sources.
2
Analyze Routing Metric
Metric measures path desirability within a single routing protocol.
It acts as a tie-breaker when multiple paths exist within the same protocol.
3
Analyze Next-Hop Address
Next-hop represents the forwarding neighbor's IP interface.
It tells the router where to transmit layer 3 packets.
4
Analyze Prefix Length
Prefix length defines the network mask.
It is used by the forwarding engine during longest prefix matching.

Key Concept

Interpretation of Routing Table Components and Attributes
Question 39Question

A Cisco router receives an IP packet destined for host 172.20.16.68. The network engineer checks the routing table and observes the following entries:

text
C 172.20.16.0/23 is directly connected, GigabitEthernet0/0/0
S 172.20.16.0/25 [1/0] via 192.168.1.1, GigabitEthernet0/0/1
D 172.20.16.64/27 [90/2570240] via 192.168.1.5, GigabitEthernet0/0/2
O 172.20.16.64/28 [110/30] via 192.168.1.9, GigabitEthernet0/0/3

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

Show answer & explanation

Answer: Next-hop 192.168.1.9 via GigabitEthernet0/0/3

Answer

The router will select next-hop 192.168.1.9 via interface GigabitEthernet0/0/3 because the /28 route provides the longest prefix match for destination 172.20.16.68.
When a router performs a destination lookup in the routing table, it evaluates all matching entries and selects the route with the most specific prefix length (Longest Prefix Match). The host address 172.20.16.68 falls within all four candidate subnet ranges, but 172.20.16.64/28 has the highest mask length (/28 > /27 > /25 > /23). Therefore, the router forwards the packet using next-hop 192.168.1.9 via GigabitEthernet0/0/3 regardless of the higher administrative distance of OSPF.

Step-by-Step Solution

1
Determine which routing table entries match the destination IP address 172.20.16.68.
All four routes cover 172.20.16.68:
- 172.20.16.0/23 covers 172.20.16.0 - 172.20.17.255
- 172.20.16.0/25 covers 172.20.16.0 - 172.20.16.127
- 172.20.16.64/27 covers 172.20.16.64 - 172.20.16.95
- 172.20.16.64/28 covers 172.20.16.64 - 172.20.16.79
Before comparing metrics or administrative distance, the router must evaluate match candidates against the destination address.
2
Apply the Longest Prefix Match (LPM) rule to select the best route.
The subnet masks are /23, /25, /27, and /28. The /28 route is the most specific prefix (longest prefix match).
Cisco IP forwarding logic always prioritizes prefix length over administrative distance or metric when multiple matching routes exist.
3
Identify the next-hop and interface associated with the longest matching prefix.
The OSPF route 172.20.16.64/28 specifies next-hop 192.168.1.9 via GigabitEthernet0/0/3.
This entry dictates the forwarding decision.

Key Concept

Longest Prefix Match (LPM) in IP Routing
Question 40Question

A network administrator issues the `show ip route` command on a Cisco router and observes the following partial 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.20.0.0/16 [110/20] via 192.168.12.2, 00:15:10, GigabitEthernet0/0
D 10.20.30.0/24 [90/307200] via 192.168.23.3, 01:42:15, GigabitEthernet0/1
S 10.20.30.128/25 [1/0] via 192.168.34.4, GigabitEthernet0/2
O E2 10.0.0.0/8 [110/20] via 192.168.12.2, 00:05:22, GigabitEthernet0/0

Which TWO statements correctly describe the forwarding behavior and components of this routing table? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: A packet destined for 10.20.30.140 is egressed via GigabitEthernet0/2 because 10.20.30.128/25 provides the longest prefix match.; For a packet destined to 10.20.30.150, the router prefers the static route (10.20.30.128/25) over the OSPF route (10.20.0.0/16) primarily due to prefix length rather than administrative distance.

Answer

The router forwards a packet destined for 10.20.30.140 out GigabitEthernet0/2 due to the longest prefix match (/25), and it evaluates prefix length prior to Administrative Distance when choosing between 10.20.30.128/25 and 10.20.0.0/16 for host 10.20.30.150.
Routing table lookups prioritize the Longest Prefix Match (most specific subnet mask). For 10.20.30.140, the /25 route matches and is more specific than /24, /16, or /8, directing traffic to GigabitEthernet0/2. Similarly, prefix specificity overrides administrative distance when comparing non-identical prefix lengths such as /25 versus /16.

Step-by-Step Solution

1
Parse the bracketed notation [AD/Metric] for Cisco routing entries.
In [90/307200], Administrative Distance is 90 and the composite metric is 307200.
Distinguishes Administrative Distance from protocol metrics.
2
Evaluate the IP destination 10.20.30.140 against candidate routing table entries.
Matches 10.0.0.0/8, 10.20.0.0/16, 10.20.30.0/24, and 10.20.30.128/25 (valid host range 10.20.30.129–10.20.30.254).
Identifies all candidate routes containing the destination IP address.
3
Apply the Longest Prefix Match (LPM) rule.
Selects 10.20.30.128/25 over shorter prefixes (/24, /16, /8), routing out GigabitEthernet0/2.
Prefix length length determines matching priority before administrative distance is ever evaluated for unequal prefixes.

Key Concept

Routing Table Components and Longest Prefix Match Determination
PreviousPage 2 / 3Next