Configure and verify static routing

Exam: Cisco 300-101 - CCNP Implementing Cisco IP Routing (ROUTE v2.0)


The routers use routings tables to store the routing information. This routing information can be provided manually to the routers or can be calculated by the routers themselves dynamically. When the routing information or the specific paths between the two routers are manually provided to the router, it is called static routing and when the routing paths between the routers are calculated dynamically, it is known as dynamic routing.

Through static routing you can define route information to be used by a router in its routing table. Each routing path is stored as routing table entry in the routing table and cannot be updated automatically. When a change in network route occurs, the routing table entries need to be updated for each route and for redundant paths on each router, in case of static routing.

The static routing is best to be used in small networks where the network design is simple and the network information is predictable because of the presence of few subnets. It becomes very complicated to troubleshoot static routes if the network is big and has hundreds of routes. For large and complicated networks where the network information keeps changing, dynamic routing should be used. However, the benefit of using static routing over dynamic routing is bandwidth saving and time saving.

The static routes use less bandwidth and less time as compared to dynamic routes because static routes do not have to use CPU cycles to calculate and update routes in the routing table. Also, static routes do not have to constantly analyze route information using dynamic routing algorithms to update routes.

In addition, static routes are more secure as compared to dynamic routes because the choice of routes is done by a system administrator after analyzing the network. Also, because there are fewer routes in the routing table, the time is saved.

Many times in large networks both static and dynamic routing are used together. In large networks, mostly all routers are configured with dynamic routing except one or two routers that are configured with static routing for special cases to specify a default route or a gateway of last resort where all unroutable packets are sent.

While configuring static routes, you need to specify some or all of the following parameters:

  • Administrative distance: Administrative distance is a metric that is used to specify the best route that can be taken by a router when there are more than one route for the same destination. The highest the administrative distance value the longer the route. Therefore routers prefer the route that has a short administrative distance. By default static routes have the administrative distance of 1. As a result, static routes are always preferred by routers over dynamic routes. If you want a static route to be overridden by dynamic route then you need to specify a higher administrative distance value of the static route as compared to the dynamic route.
  • Next-hop_address: The next-hop_address is the address of the router to which the router will forward the packet so that it can be forwarded to the destination router on a remote network. The next hop address can be an interface for point-to-point interfaces and an IPv4/IPv6 address for a broadcast interface.
  • Destination_network: The destination_network is the IP address of the destination network to which the packets need to be sent.
  • Exit_interface: The exit_interface is used in place of next-hop address if the route is directly connected.
  • Permanent Keyword: The permanent keyword is the optional field to save the static route in the routing table in case the interface goes down. Without permanent keyword the static route will be removed if an interface goes down.

Configure the static route

You can configure static routes either by using the next hop router's IP address on the connected network or using the router's own exit interface. Using exit interface is a faster method to configure the static route because the router does not have to look up the exit interface from the connected network.

Consider Router R1 is connected to three networks directly.

Network 1 – 192.168. 10.0/24
Network 2 – 192.168. 41.0/24
Network 3 - 192.168. 42.0/24

Also, RouterR1 is connected to network 4 -192.168.20.0/24indirectly throughNetwork 2. So the next hop interface for network 4 is – 192.168.41.4. The exit interface of the router is - fa 2/0.

Configure using Exit interface

RouterR1#ip route <destination network> <subnet mask> <local router exit interface>

RouterR1(config)#ip route192.16.11.0255.255.255.0fa2/0
RouterR1(config)#end
RouterR1#

Configure using Next-hop address

RouterR1(config)#ip route <destination network> <subnet mask> <next hop router address>

RouterR1(config)#ip route192.16.11.0255.255.255.0192.16.41.4
RouterR1(config)#interface serial 2/0
RouterR1(config-if)#clock rate 64000
RouterR1(config-if)#end

Verify your configuration from the routing table:

RouterR1RouterR1#show ip route
[output omitted]
Gateway of last resort is not set
C 192.168.10.0/24 is directly connected, FastEthernet 0/0
S 192.168.20.0/24 is directly connected, FastEthernet 1/0
C 192.168.41.0/24 is directly connected, Serial 2/0
C 192.168.42.0/24 is directly connected, FastEthernet 1/0

Check connectivity from PC1 connected to Network 1 to Network 4

RouterR1PC1>ping192.168.20.2
Pinging192.168.20.2with 32 bytes of data:
Reply from192.168.20.2bytes=32 time=140ms TTL=126
Reply from192.168.20.2: bytes=32 time=140ms TTL=126
Reply from192.168.20.2: bytes=32 time=156ms TTL=126
Reply from192.168.20.2: bytes=32 time=156ms TTL=126
Ping statistics for192.168.20.2
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 140ms, Maximum = 156ms, Average = 148ms

Now Ping fromPC 7from network 4 toPC 1

RouterR1PC7>ping192.168. 41.4
Pinging192.168.41.4with 32 bytes of data:
Reply from192.168.41.4: bytes=32 time=156ms TTL=126
Reply from192.168.41.4: bytes=32 time=156ms TTL=126
Reply from192.168.41.4: bytes=32 time=109ms TTL=126
Reply from192.168.41.4: bytes=32 time=135ms TTL=126
Ping statistics for192.168. 41.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 109ms, Maximum = 156ms, Average = 139ms
PC7>

Exam Question

Which of the following statements are true about Static Routing?

  1. In static routing, the routing information is manually provided to the router. The routing table is updated automatically when the network information changes.
  2. In static routing, the routing information is manually provided to the router. The routing table is not updated automatically when network information changes.
  3. In static routing the routing information is dynamically calculated by the router. The routing table is updated automatically when the network information changes.
  4. In static routing the routing information is dynamically calculated by the router. The routing table is not updated automatically when network information changes.

Answer: 2

When the routing information or the specific paths between the two routers are manually provided to the router, it is called static routing and when the routing paths between the routers are calculated dynamically, it is known as dynamic routing.

Through static routing you can define route information to be used by a router in the routing table. Each routing path is stored as routing table entry in the routing table and cannot be updated automatically. When a change in network route occurs, the routing table entries need to be updated for each route and for redundant paths on each router in case of static routing.


Related IT Guides

  1. Configure and verify default routing
  2. Configure and verify IPv4 and IPv6 DHCP
  3. Configure and Verify network types, area types, and router types
  4. Configure and Verify RIPv2
  5. Describe administrative distance
  6. Describe device security using IOS AAA with TACACS+ and RADIUS
  7. Describe DMVPN (single hub)
  8. Describe IPv6 NAT
  9. Describe, configure, and verify BGP peer relationships and authentication
  10. Explain BGP attributes and best-path selection
  11. Explain Frame Relay
  12. Explain general network challenges
  13. Layer 3 technologies - Describe administrative distance
  14. Use Cisco IOS troubleshooting tools