Overview Now that you have learned about routing protocols, you are ready to configure IP routing protocols. As you know, routers can be configured to use one or more IP routing protocols. In this chapter, you will learn about the initial configuration of the router to enable the IP routing protocols of Routing Information Protocol (RIP) and Interior Gateway Routing Protocol (IGRP). In addition, you will learn how to monitor IP routing protocols. 12.1 Initial Router Configuration 12.1.1 Setup mode After testing the hardware and loading the Cisco IOS system image, the router finds and applies the configuration statements. These entries provide the router with details about router-specific attributes, protocol functions, and interface addresses. However, if the router is unable to locate a valid startup-config file, it enters an initial router configuration mode called setup mode. With the setup mode command facility, you can answer questions in the system configuration dialog. This facility prompts you for basic configuration information. The answers you enter allow the router to use a sufficient, but minimal-feature, router configuration that includes the following: an inventory of interfaces an opportunity to enter global parameters an opportunity to enter interface parameters a setup script review an opportunity to indicate whether you want the router to use this configuration After you approve setup mode entries, the router uses the entries as a running configuration. The router also stores the configuration in NVRAM as a new startup-config, and you can start using the router. For additional protocol and interface changes, you can use the enable mode and enter the command configure. 12.1.2 Initial IP routing table Initially, a router must refer to entries about networks or subnets that are directly connected to it. Each interface must be configured with an IP address and a mask. The Cisco IOS software learns about this IP address and mask information from a configuration that has been input from some source. The initial source of addressing is a user who types it into a configuration file. In the lab that follows, you will start up your router in a just-received condition, a state that lacks another source for the startup configuration. This condition on the router will permit you to use the setup-mode command facility and answer prompts for basic configuration information. The answers you enter will include address-to-port commands to set up router interfaces for IP. 12.1.3 How a router learns about destinations By default, routers learn paths to destinations three different ways : static routes -- manually defined by the system administrator as the next hop to a destination; useful for security and traffic reduction default routes -- manually defined by the system administrator as the path to take when there is no known route to the destination dynamic routing -- the router learns of paths to destinations by receiving periodic updates from other routers. 12.1.4 The ip route command The ip route command sets up a static route. - The administrative distance is a rating of the trustworthiness of a routing information source, expressed as a numeric value from 0 to 255. The higher the number, the lower the trustworthiness rating. A static route allows manual configuration of the routing table. No dynamic changes to this table entry will occur as long as the path is active. A static route may reflect some special knowledge of the networking situation known to the network administrator. Manually-entered administrative distance values for static routes are usually low numbers (1 is the default). Routing updates are not sent on a link if they are only defined by a static route, therefore, they conserve bandwidth. 12.1.5 Using the ip route command The assignment of a static route to reach the stub network 172.16.1.0 is proper for Cisco A because there is only one way to reach that network. The assignment of a static route from Cisco B to the cloud networks is also possible. However, a static route assignment is required for each destination network, in which case a default route may be more appropriate. - Lab Activity In this lab you will configure a static route between neighboring routers. 12.1.6 The ip default-network command The ip default-network command establishes a default route in networks using dynamic routing protocols.. - Default routes keep routing tables shorter. When an entry for a destination network does not exist in a routing table, the packet is sent to the default network. Because a router does not have complete knowledge about all destination networks, it can use a default network number to indicate the direction to take for unknown network numbers. Use the default network number when you need to locate a route but have only partial information about the destination network. The ip default-network command must be added to all routers in the network or used with the additional command redistribute static so all networks have knowledge of the candidate default network. 12.1.7 Using the ip default-network command In the example, the global command ip default-network 192.168.17.0 defines the Class C network 192.168.17.0 as the destination path for packets that have no routing table entries. The Company X administrator does not want updates coming in from the public network. Router A could need a firewall for routing updates. Router A may need a mechanism to group those networks that will share Company X's routing strategy. One such mechanism is an autonomous system number. 12.2 Interior and Exterior Routing Protocols 12.2.1 Autonomous system An autonomous system consists of routers, run by one or more operators, that present a consistent view of routing to the external world. The Network Information Center (NIC) assigns a unique autonomous system to enterprises. This autonomous system is a 16 bit number. A routing protocol such as Cisco's IGRP requires that you specify this unique, assigned autonomous system number in your configuration. 12.2.2 Interior versus exterior routing protocols Exterior routing protocols are used for communications between autonomous systems. Interior routing protocols are used within a single autonomous system. 12.2.3 Interior IP routing protocols At the Internet layer of the TCP/IP suite of protocols, a router can use an IP routing protocol to accomplish routing through the implementation of a specific routing algorithm. Examples of IP routing protocols include: RIP -- a distance-vector routing protocol IGRP -- Cisco's distance-vector routing protocol OSPF -- a link-state routing protocol EIGRP -- a balanced hybrid routing protocol The following sections show you how to configure the first two of these protocols. 12.2.4 IP routing configuration tasks The selection of an IP routing protocol involves the setting of both global and interface parameters. Global tasks include selecting a routing protocol, either RIP or IGRP, and indicating IP network numbers with specifying subnet values. The interface task is to assign network/subnet addresses and the appropriate subnet mask. Dynamic routing uses broadcasts and multicasts to communicate with other routers. The routing metric helps routers find the best path to each network or subnet. 12.2.5 Using the router and network commands The router command starts a routing process. The network command is required because it enables the routing process to determine which interfaces will participate in the sending and receiving of routing updates. The network numbers must be based on the network class addresses, not subnet addresses or individual host addresses. Major network addresses are limited to Class A, B and C network numbers. 12.3 RIP 12.3.1 Key elements of RIP RIP was originally specified in RFC 1058. Its key characteristics include the following: It is a distance-vector routing protocol. Hop count is used as the metric for path selection. If the hop count is greater than 15, the packet will be discarded. By default, routing updates are broadcast every 30 seconds. 12.3.2 Using router rip and network commands to enable RIP The router rip command selects RIP as the routing protocol. The network command assigns a network class address to which a router will be directly connected. The routing process associates interfaces with the network addresses and begins using RIP on the specified networks. Note: In RIP all subnet masks must be the same. RIP does not share subnetting information in routing updates. 12.3.3 Enabling RIP on an IP-addressed network In the example, the descriptions for the commands are as follows: router rip -- selects RIP as the routing protocol network 1.0.0.0 -- specifies a directly connected network network 2.0.0.0 -- specifies a directly connected network The Cisco A router interfaces that are connected to networks 1.0.0.0 and 2.0.0.0 send and receive RIP updates. These routing updates allow the router to learn the network topology. 12.3.4 Monitoring of IP packet flow using the show ip protocol command The show ip protocol command displays values, about routing timers and network information, that are associated with the entire router. Use this information to identify a router that you suspect of delivering bad routing information. The router in the example sends updated routing table information every 30 seconds (configured interval). Seventeen seconds have elapsed since it sent its last update; it will send the next one in 13 seconds. Following the "Routing for Networks" line, the router specifies routes for the listed networks. The last line shows that the RIP administrative distance is 120. 12.3.5 The show ip route command The show ip route command displays the contents of the IP routing table, which contains entries for all known networks and subnetworks, along with a code that indicates how that information was learned. Lab Activity In this lab you will configure RIP as the routing protocol. 12.4 IGRP 12.4.1 Key characteristics of IGRP IGRP is a distance-vector routing protocol developed by Cisco. IGRP sends routing updates at 90 second intervals, advertising networks for a particular autonomous system. Some of the IGRP key design characteristics emphasize the following: versatility that enables it to automatically handle indefinite, complex topologies flexibility for segments that have different bandwidth and delay characteristics scalability for functioning in very large networks The IGRP routing protocol by default uses two metrics, bandwidth and delay. IGRP can be configured to use a combination of variables to determine a composite metric. Those variables include: bandwidth delay load reliability 12.4.2 Using router igrp and network commands to enable IGRP The router igrp command selects IGRP as a routing protocol. The network command specifies any directly connected networks that are to be included. Note: Like RIP, all subnet masks must be the same. IGRP does not share subnetting information in routing updates. 12.4.3 Enabling IGRP on an IP-addressed network IGRP is selected as the routing protocol for autonomous system 109. All interfaces connected to networks 1.0.0.0 and 2.0.0.0 will be used to send and receive IGRP routing updates. In the example: router igrp 109 -- selects IGRP as the routing protocol for autonomous system 109 network 1.0.0.0 -- specifies a directly connected network network 2.0.0.0 -- specifies a directly connected network 12.4.4 Monitoring IP packet flow using the show ip protocol command The show ip protocol command displays parameters, filters, and network information about all of the routing protocol(s) (i.e. RIP, IGRP, etc.) in use on the router. The algorithm used to calculate the routing metric for IGRP is shown in this display. It defines the value of the K1-K5 metrics and the maximum hop count. The metric K1 represents bandwidth and the metric K3 represents delay. By default the values of the metrics K1 and K3 are set to 1. K2,K4 and K5 metric values are set to 0. 12.4.5 The show ip interfaces command The show ip interfaces command displays the status and global parameters associated with all IP interfaces. The Cisco IOS software automatically enters a directly-connected route in the routing table if the interface is one through which software can send and receive packets. Such an interface is marked up. If the interface is unusable, it is removed from the routing table. Removing the entry allows the use of backup routes, if they exist. 12.4.6 The show ip route command The show ip route command displays the contents of an IP routing table. The table contains a list of all known networks and subnets and the metrics associated with each entry. Note that in this example the information was derived from IGRP (I), or from direct connections (C). 12.4.7 The debug ip rip command The debug ip rip command displays RIP routing updates as they are sent and received. In this example, the update is sent by 183.8.128.130. It reported on three routers, one of which is inaccessible because its hop count is greater than 15. Updates were then broadcast through 183.8.128.2. Use caution when using debug commands. Debug commands are processor intensive and can decrease network performance or cause loss of connectivity. Use only during times of low network usage. Disable the command when finished by using the command, no debug ip rip or no debug all. 12.5 Challenge Labs 12.5.1 Rip convergence challenge Lab Activity As a system administrator, there will be times where configuring static routes can be very useful. Static routes are useful for stub networks because there is only one way to get to that network. Security is another reason to use static routes. For example, if you have a network or networks that you don't want the rest of the network to be able to "see" you would not want RIP or other routing protocols sending periodic updates to other routers. With simple networks (few routers) it is sometimes more efficient to use static routes since it conserves bandwidth on WAN links. In this lab you will use static routes for troubleshooting purposes and to see their relationship to dynamic routes and routing protocols. 12.5.2 Routing loops setup challenge Lab Activity In this lab you will setup a WAN connection between Lab-A and Lab-E to create alternate paths in the standard router lab setup. Using a set of WAN serial cables, connect Lab-A Serial 1 to Lab-E Serial 0. Remember to set the clock rate on the DCE side of the cable (Lab-E's Serial 0 interface). 12.5.3 Preventing routing loops Lab Activity In the previous challenge lab, you saw how long it took to converge when a link went down. In this lab, your task is to find out how to prevent and control routing loops. The use of hold-down timers, defining a maximum hop count, counting to infinity, poison reverse and split-horizon are all methods of controlling routing loops. You will use the RIP hop count metric to control routing loops in this lab. Summary Initially, a router must refer to entries about networks or subnets that are directly connected. Default routers learn paths to destinations three different ways: Static routes Default routes Dynamic routes The ip route command sets up a static route. The ip default-network command establishes a default route. Routers can be configured to use one or more IP routing protocols, such as RIP and IGRP.