Pcornel
H3 · Practical network exams · Cisco IOS / IOS XE

Static Routing (IPv4/IPv6) · Finals

Configuration first, verification second, theory third. Reference templates require task-specific adaptation.

Content version 1.1-draft

Keyboard shortcuts

/ Finals search · Ctrl K global command palette · Alt E Exam Mode · Alt G Golden Scripts · Alt T Exam Topics · Alt V Verify · Esc close dialog.

Case Skills Exam

Quick explanation

Static routes manually select a next hop or outgoing interface for a destination prefix. A floating route uses a higher administrative distance to serve as a backup.

Configuration

Replace highlighted placeholders. Configure only the variants required by the task.

Prerequisites and dependency links
  • Next hop must be resolvable; exit interfaces must be operational.
  • Enable routing on L3 switches and IPv6 routing for IPv6.
Next-hop route Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip route [NETWORK] [SUBNET-MASK] [NEXT-HOP]
end
Command parameters
[NETWORK]
IPv4 destination or matching network address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[NEXT-HOP]
IPv4 next-hop address.
Exit-interface route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Prefer this on a point-to-point link; on multiaccess Ethernet use a next hop or fully specified route.
enable
configure terminal
ip route [NETWORK] [SUBNET-MASK] [INTERFACE]
end
Command parameters
[NETWORK]
IPv4 destination or matching network address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
Fully specified route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip route [NETWORK] [SUBNET-MASK] [INTERFACE] [NEXT-HOP]
end
Command parameters
[NETWORK]
IPv4 destination or matching network address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NEXT-HOP]
IPv4 next-hop address.
Default route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ip route 0.0.0.0 0.0.0.0 [NEXT-HOP]
end
Command parameters
[NEXT-HOP]
IPv4 next-hop address.
Floating backup route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Choose a distance greater than the preferred route.
enable
configure terminal
ip route [NETWORK] [SUBNET-MASK] [NEXT-HOP] [BACKUP-DISTANCE]
end
Command parameters
[NETWORK]
IPv4 destination or matching network address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
[NEXT-HOP]
IPv4 next-hop address.
[BACKUP-DISTANCE]
Administrative distance of the floating route; greater than the primary.
Next-hop route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
enable
configure terminal
ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6]
end
Command parameters
[IPV6-PREFIX]
IPv6 destination network prefix without slash length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[NEXT-HOP-IPV6]
IPv6 next-hop address; a link-local next hop needs an exit interface.
Exit-interface route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Prefer this on a point-to-point link; on multiaccess Ethernet use a next hop or fully specified route.
enable
configure terminal
ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [INTERFACE]
end
Command parameters
[IPV6-PREFIX]
IPv6 destination network prefix without slash length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
Fully specified route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

enable
configure terminal
ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [INTERFACE] [NEXT-HOP-IPV6]
end
Command parameters
[IPV6-PREFIX]
IPv6 destination network prefix without slash length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NEXT-HOP-IPV6]
IPv6 next-hop address; a link-local next hop needs an exit interface.
Default route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
enable
configure terminal
ipv6 route ::/0 [NEXT-HOP-IPV6]
end
Command parameters
[NEXT-HOP-IPV6]
IPv6 next-hop address; a link-local next hop needs an exit interface.
Floating backup route Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: static-routing-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • Choose a distance greater than the preferred route.
  • Use a resolvable global-unicast next hop in this form. If the next hop is link-local, include the outgoing interface (fully specified route).
enable
configure terminal
ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [NEXT-HOP-IPV6] [BACKUP-DISTANCE]
end
Command parameters
[IPV6-PREFIX]
IPv6 destination network prefix without slash length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
[NEXT-HOP-IPV6]
IPv6 next-hop address; a link-local next hop needs an exit interface.
[BACKUP-DISTANCE]
Administrative distance of the floating route; greater than the primary.

Show / Verify

Primary verification Section link
show ip route static
Example output
S    198.51.100.0/24 [1/0] via 192.0.2.2

Check the installed route and resolved next hop.

Detailed verification Section link
show ipv6 route static
Example output
S   2001:DB8:2::/64 [1/0]
     via FE80::2, GigabitEthernet0/0

Check the IPv6 next hop and exit interface.

Detailed verification Section link
show ip route [DESTINATION-IP]
Example output
Routing entry for 198.51.100.0/24

Inspect the longest matching route.

Detailed verification Section link
show ipv6 route [DESTINATION-IPV6]
Example output
Routing entry for 2001:DB8:2::/64

Inspect the longest matching IPv6 route.

Connectivity verification

IPv4 reachability

Check success rate; use source or VRF context if required.

ping [DESTINATION-IP]
IPv6 reachability

Check IPv6 path and return routing.

ping ipv6 [DESTINATION-IPV6]
Source-specific IPv4

Verify from the intended source network.

ping [DESTINATION-IP] source [SOURCE-IP]
IPv4 path

Inspect hop sequence; missing responses alone do not prove forwarding failure.

traceroute [DESTINATION-IP]
IPv6 path

Inspect IPv6 hop sequence.

traceroute ipv6 [DESTINATION-IPV6]

Common mistakes

  • Unreachable next hop.
  • IPv6 link-local next hop without exit interface.
  • Floating route has lower distance than primary.
  • Wrong prefix length or subnet mask.

Quick reference and default values

Administrative distance
SourceDefault distance
Connected0
Static1
eBGP20
Internal EIGRP90
OSPF110
RIP120
External EIGRP170
iBGP200
Routing table codes
CodeMeaning
CConnected
LLocal host route
SStatic
OOSPF
O IAOSPF inter-area
O E1 / E2OSPF external
BBGP
*Candidate default
IPv6 address types
PrefixMeaning
FE80::/10Link-local
2000::/3Global unicast
FC00::/7Unique local
FF00::/8Multicast
::/128Unspecified
::1/128Loopback
::/0Default route

Configuration comparison

Next hop vs exit interface — Use a next hop on multiaccess links; a fully specified route includes both. IPv6 link-local next hop needs an interface.

Remove configuration — separate, potentially disruptive actions

Remove IPv4 route

Match the actual configured route parameters.

enable
configure terminal
no ip route [NETWORK] [SUBNET-MASK] [NEXT-HOP]
end

Remove IPv6 route

Match the actual configured route parameters.

enable
configure terminal
no ipv6 route [IPV6-PREFIX]/[PREFIX-LENGTH] [INTERFACE] [NEXT-HOP-IPV6]
end

Related reference

Networking technical reference · Interface types · Connectivity verification

Reset checklist?

Command block

Back to Top

Confirmation

Confirm action

Continue?