Configuring a basic IP static route

To configure a basic IP static route, perform these steps.
  1. Enter global configuration mode.
    device# configure terminal
    
  2. Enter the IP address and prefix length, or enter the IP address and network mask for the route destination network. On the same command line, enter the IP address for the next hop.
    device(config)# ip route 10.0.0.0 255.0.0.0 10.1.1.1
    
    This example configures an IP static route with a destination network address of 10.0.0.0, a destination mask of 255.0.0.0, and a next hop address of 10.1.1.1.
    Note: In the network mask, "1's" are significant bits, and "0's" allow any value. The mask 255.255.255.0 matches all hosts within the Class C subnet address specified in the destination IP address. You can use "/24" as the equivalent address prefix.

The following example configures an IP static route with a destination network address of 10.0.0.0, a prefix length of 24 bits, and a next hop address of 10.1.1.1.

device# configure terminal
device(config)# ip route 10.0.0.0/24 10.1.1.1