Chapter 15

Configure and Verify IPv4 and IPv6 Static Routing

This chapter ensures that you are ready for questions related to this topic from the IP Connectivity section of the CCNA 200-301 exam blueprint from Cisco Systems. While you might think that static routing is silly, especially when there are such exciting dynamic routing protocols available for both IPv4 and IPv6 networking, your understanding of static routing is actually critical. For example, production networks often require static routes in order to accommodate default routing to unknown destinations. This is often how you route traffic to the Internet, in fact.

This chapter covers the following essential terms and components:

  • Static routing

  • Default routes

  • Network routes

  • Host routes

  • Floating static routes

Topic: Configure, verify, and troubleshoot IPv4 and IPv6 static routing

CramSaver

If you can correctly answer these CramSaver questions, save time by skimming the ExamAlerts in this section and then completing the CramQuiz at the end of this section and the Review Questions at the end of the chapter. If you are in doubt at all, read everything in this chapter!

1. What is the command to configure a static route to 10.40.40.0/24 with a next hop of 10.10.10.2?

_________

2. What is the command to configure an IPv6 static route to 2001:aaaa::/64 using the Serial 0/0 interface?

_________

3. What is a floating static route?

_________

Answers

1. ip route 10.40.40.0 255.255.255.0 10.10.10.2

2. ipv6 route 2001:aaaa::/64 serial 0/0

3. A floating static route is a static route that is not installed in the routing table initially, thanks to an artificially high (untrustworthy) AD.

By using static routing, you can create default routes, network routes, and host routes. Remember that a default route references a quad-zero IP address and mask (0.0.0.0 0.0.0.0) and is used to direct traffic to a destination such as the Internet when a more specific route entry does not exist in the routing table. A network route is a static route to a specific prefix, and a host route is a prefix that has a 32-bit network mask, which means you must specify the host address exactly.

Example 15.1 shows the configuration of network, host, and default routes using static routing in IPv4.

Example 15.1 Configuring Static Network Routes and Host Routes in IPv4

R1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# ip route 192.168.1.0 255.255.255.0 10.10.10.2
R1(config)# ip route 172.16.1.3 255.255.255.255 10.10.10.2
R1(config)# ip route 0.0.0.0 0.0.0.0 10.20.20.200
R1(config)# end
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#

Note

With a point-to-point link, you can specify just the outgoing interface, also referred to as the exit interface, on the local router as part of the ip route command (for example, ip route 192.168.1.0 255.255.255.0 serial 0/0, where Serial 0/0 is the exit interface of the local router). This is a nice timesaver. Just be careful not to configure an Ethernet exit interface; doing so is not recommended because it leads to excessive ARP requests.

Notice in Example 15.1 how simple the static route creation is. It is just as easy in an IPv6 environment, as shown in Example 15.2.

Example 15.2 Configuring a Static Route in IPv6

R1# configure terminal
R1(config)# ipv6 route 2001:aaaa::/64 serial 0/0

Example 15.3 demonstrates the use of the show ip route and show ipv6 route commands to verify static routes.

Example 15.3 Verifying Static IPv4 and IPv6 Routes

R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, + - replicated route
Gateway of last resort is 10.10.10.2 to network 0.0.0.0

S*     0.0.0.0/0 [1/0] via 10.10.10.2
                 is directly connected, FastEthernet0/0
       10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C         10.10.10.0/24 is directly connected, FastEthernet0/0
L         10.10.10.1/32 is directly connected, FastEthernet0/0
      172.16.0.0/32 is subnetted, 1 subnets
S         172.16.1.3 [1/0] via 10.10.10.2
S     192.168.1.0/24 [1/0] via 10.10.10.2

R1#
R1# show ipv6 route
IPv6 Routing Table - default - 2 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, M - MIPv6, R - RIP, I1 - ISIS L1
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
       EX - EIGRP external, ND - Neighbor Discovery
       O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
S   2001:AAAA::/64 [1/0]
       via Serial 0/0, directly connected
L   FF00::/8 [0/0]
       via Null0, receive
R1#

Another interesting use of a static route is as a floating static route. A floating static route “floats” above a prefix learned by a dynamic routing protocol. The static route kicks in when the dynamic routing protocol removes the prefix. To create a floating static route, you set the administrative distance (AD) artificially high (numerically higher than other existing routing sources) for the static route. Specifically, you set the AD greater than—so that it is less believable than—the dynamic route.

Example 15.4 shows the creation of a floating static route that could be used with OSPF as the dynamic routing protocol. Notice that the AD is one notch higher (worse) than the default AD of OSPF, which is 110. This newly created static route won’t be placed in the routing table as long as 10.60.60.0/24 is being learned via OSPF. If the router stops learning of this route through OSPF, then the static route, with its AD of 111, will be placed in the routing table.

Example 15.4 Configuring a Floating Static Route

R3#
R3# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)# ip route 10.60.60.0 255.255.255.0 10.20.20.2 111
R3(config)# end
R3#

CramQuiz

1. What parameters of a static route can be included as part of the ip route command to indicate where traffic should be sent? (Choose two.)

Image A. Next hop IP address

Image B. RE ID

Image C. Destination MAC address

Image D. Outgoing interface

2. What command enables you to verify that a static route is in the routing table?

Image A. show static

Image B. show ip route

Image C. show routing table static

Image D. show admin routes

3. What feature do you use in order to create a floating static route?

Image A. Metric

Image B. Dampening

Image C. Route suppression

Image D. Administrative distance

CramQuiz Answers

1. A and D are correct. You can specify the next hop IP address and/or the outgoing interface.

2. B is correct. The show ip route command allows you to view static routes (if they exist) in the routing table.

3. D is correct. You use administrative distance to create floating static routes. Through the artificial manipulation of trustworthiness, you prevent the route from appearing in the routing table.

Review Questions

1. What is the mask length for a host route?

Image A. 0

Image B. 64

Image C. 16

Image D. 32

2. What command permits you to view the IPv6 routing table?

Image A. show route ipv6

Image B. show route new

Image C. show ipv6 route

Image D. show route

3. What type of static route is shown in the following example?

ip route 172.16.1.0 255.255.255.0 192.168.2.100

Image A. A static host route

Image B. A floating static route

Image C. A default route

Image D. A network static route

4. What is the default administrative distance of a static route that references a next hop IP address?

Image A. 0

Image B. 1

Image C. 2

Image D. 10

Answers to Review Questions

1. D is correct. A host route in IPv4 features a mask of 32 bits.

2. C is correct. The show ipv6 route command is the equivalent of show ip route but shows the IPv6 routing table.

3. D is correct. This static route is for a network that needs to be reached. The network is 172.16.1.0/24, and the next hop address to reach that network is 192.168.2.100.

4. B is correct. The default administrative distance of a static route is 1, regardless of whether it is referencing a next hop IP address or an exit interface.

Hands-On Lab Practice Assignment

IPv4 Static Routing

To complete this Hands-On Lab Practice Assignment, download the assigned Packet Tracer file from the book’s companion website and perform the lab on your locally installed version of Packet Tracer. For instructions on how to download and use the Packet Tracer files, see “Packet Tracer Hands-On Lab Practice Assignments” in the Introduction of this book.

Additional Resource

IPv4 Static Routing

https://youtu.be/7JKg5A957Q8

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.31.159