IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

PDF

IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

Static routes and Cisco Express Forwarding

Want to summarize with AI?

Log in

Explains when static routes provide predictable paths for CEF forwarding and why dynamic routing is more suitable for large or frequently changing networks.


A static route is a manually configured route-table entry that

  • defines an explicit path between routers

  • uses less bandwidth than a dynamically calculated route, and

  • requires manual reconfiguration when the network path changes.

Suitable uses

Use static routes in simple networks with predictable traffic or to define a gateway of last resort. Use dynamic routing for large or frequently changing networks.


Configure a static route

Create a static route to destination prefix 203.0.113.0/24 through next hop 192.0.2.1.

Procedure

  1. Configure the destination prefix, outgoing interface, and next hop in IPv4 unicast static-router configuration mode.

    Example:

    Router# configure
    Router(config)# router static address-family ipv4 unicast
    Router(config-static-afi)# 203.0.113.0/24 HundredGigE0/0/0/0 192.0.2.1
    Router(config-static-afi)# commit
  2. Display the static IPv4 unicast configuration.

    Example:

    Router# show running-config router static address-family ipv4 unicast
    router static
     address-family ipv4 unicast
      203.0.113.0/24 HundredGigE0/0/0/0 192.0.2.1
     !
    !