1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Routing and Switching Alogrithms pdf

64 538 3

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 64
Dung lượng 646,69 KB

Nội dung

1 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ 6 Routing and Switching Alogrithms Terms you’ll need to understand: ✓ Distance vector protocols ✓ Routing Information Protocol (RIP) ✓ Interior Gateway Routing Protocol (IGRP) ✓ Enhanced Interior Gateway Routing Protocol (EIGRP) ✓ Link-state protocols ✓ Intermediate System to Intermediate System (ISIS) ✓ Open Shortest Path First (OSPF) ✓ Hello packets ✓ Border Gateway Protocol (BGP) ✓ Interior Border Gateway Protocol (IBGP) ✓ Exterior Border Gateway Protocol (EBGP) ✓ Summarization ✓ Multicast Techniques you’ll need to master: ✓ Describing the mechanics of RIP, IGRP, EIGRP, ISIS, OSPF, and BGP ✓ Setting up IP routing protocols in a simple design scenario ✓ Identifying the IP routing table for each routing protocol 2 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ Chapter 6 This chapter presents the commands you need to know when configuring the various IP routing protocols on Cisco routers. Frequently, the terminology pre- sents the most challenging aspect of understanding routing with Cisco IOS. Therefore, after reviewing the basic CCIE blueprint objectives covered in this chapter, we’ll offer a brief overview of basic terminology. Then, we’ll move on to discuss the Cisco IOS routing configuration commands. The following CCIE blueprint objectives as laid out by the Cisco Systems CCIE program are covered in this chapter: ➤ Border Gateway Protocol (BGP)—Peer groups, route reflectors, confederations, clusters, attributes, autonomous systems (AS), route maps, filters, neighbors, decision algorithm, Interior Border Gateway Protocol (IBGP), Exterior Bor- der Gateway Protocol (EBGP) ➤ Enhanced Interior Gateway Routing Protocol (EIGRP)—Metrics, mechanics, and design ➤ Intermediate System to Intermediate System (ISIS)—Metrics, mechanics, and design ➤ Open Shortest Path First (OSPF)—Areas, virtual links, stub, not so stubby ar- eas (NSSA), area border router (ABR), autonomous system boundary router (ASBR) redistributions, media dependencies, external versus internal, sum- marization, designated router (DR), backup designated router (BDR), adja- cencies, link-state advertisement (LSA) types, link-state database, shortest path first (SPF) algorithm, authentication ➤ Routing Information Protocol (RIP) and RIP II—Metrics, mechanics, and design ➤ Multicast—Design, protocol independent multicast (PIM), Distance Vector Multicast Routing Protocol (DVMRP), Internet Group Management Pro- tocol (IGMP) As in other chapters in this book, additional information is provided in this chapter for completeness and in preparation for additional subjects as the CCIE program expands. By now, you should be aware that a CCIE candidate’s knowledge must span a wide range of topics. One topic of particular emphasis involves under- standing the Network layer and how Cisco devices can be used to accomplish intelligent routing. This chapter, the largest chapter in the book, addresses these focal-point topics to help you fully prepare for the CCIE exam. 3 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ Routing and Switching Algorithms Summary of Available IP Routing Protocols Cisco IOS supports a number of IP routing protocols. Listing 6.1 shows the routing protocols supported by Cisco routers. According to the CCIE exam objec- tives, you’re only required to understand RIP, IGRP, EIGRP, ISIS, OSPF, and BGP. Listing 6.1 The router ? command. R2(config)#router ? bgp Border Gateway Protocol (BGP) egp Exterior Gateway Protocol (EGP) eigrp Enhanced Interior Gateway Routing Protocol (EIGRP) igrp Interior Gateway Routing Protocol (IGRP) isis ISO ISIS iso-igrp IGRP for OSI networks mobile Mobile routes odr On-Demand Stub Routes ospf Open Shortest Path First (OSPF) rip Routing Information Protocol (RIP) static Static routes RIP, IGRP, EIGRP, OSPF, and BGP are called dynamic protocols because they employ techniques that “automatically” discover and learn IP routing informa- tion from other routers. Dynamic protocols use dynamic routing, a routing method in which routers learn about IP networks without static configuration. In the upcoming sections, we’ll cover the distance vector protocols—RIP, RIP II, and IGRP. Next, we’ll look at a hybrid distance vector and link-state protocol— EIGRP. Then, we’ll cover the link-state protocols—ISIS and OSPF. Finally, we’ll discuss BGP, a path vector protocol, which is an advanced routing protocol used extensively in the Internet. Routing Information Protocol (RIP) I and II Routing Information Protocol (RIP) is a distance vector protocol, which uses hop counts as the metric. This metric determines whether an IP network will be placed in the routing table. There are two versions of RIP—RIP I and RIP II. Both RIP versions I and II operate over UDP using port 520. As discussed in Chapter 2, RIP uses holddowns, split horizon, and poison reverse to avoid rout- ing loops. RIP version I cannot carry subnet information, and it applies the de- fault network mask to all networks. Hence, all networks within a RIP network must have the same subnet mask throughout. RIP II does carry subnet informa- tion, because RIP II can use variable length subnet masking (VLSM). 4 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ Chapter 6 RIP version I characteristics can be summarized as follows: ➤ Distance vector protocol ➤ Hop count is 15 ➤ Broadcasts full routing table every 30 seconds ➤ RIP can load balance if the hop count is the same RIP version II characteristics can be summarized as follows: ➤ Distance vector protocol ➤ Hop count is 15 ➤ Supports VLSM (carries subnet information in updates) ➤ Authentication of IP routing updates The deficiencies encountered in RIP I, such as no support for variable length sub- net masks, spurred the release of RIP version II. RIP II’s biggest improvement over RIP I is that RIP II supports variable length subnetting and authentication of routing updates. RIP II is also a classless routing protocol, whereas RIP Version I is classful. RIP II still has a hop count limit of 15. Furthermore, RIP II supports multicast updates. While RIP II provides advancements over RIP I, it still con- tains some of the deficiencies found in RIP I. For example, RIP II continues to send full routing updates every 30 seconds and limits hop counts to 15 hops. Cisco routers support both RIP I and RIP II. By default a Cisco router runs RIP version I. Therefore, by default, the router will listen to RIP II updates but will only forward RIP I updates unless configured otherwise. Note: In order to configure RIP version II, you will have to be in the “router rip” configuration mode. To further clarify the operation of RIP I and RIP, let’s look at a sample RIP configuration on a small network consisting of four Cisco routers. Configurating RIP I and II RIP is easy to configure, you start RIP with the IOS command router rip and then apply the networks you want to be advertised. The IOS command to enable the local network within RIP is: network <classful networks to be advertised> For illustrative purposes, let’s configure the network shown in Figure 6.1 for IP RIP version I. Then, we can modify the configuration to enable RIP II. 5 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ Routing and Switching Algorithms In order to get our RIP network operating, a few steps will need to occur so let’s briefly discuss them. First, we will need to start the RIP routing process on each router and then apply the networks that are advertised as shown previously. The RIP configuration on all three routers is identical because we are using the classful Class A address of 10.0.0.0. Listing 6.2 provides the configuration for router R1 shown in Figure 6.1. Router R1’s RIP configuration is identical to the configuration of routers R2 through R4. Listing 6.2 IP RIP configuration. hostname R1 router rip network 10.0.0.0 10.1.1.0/24 10.1.3.0/24 10.1.2.0/24 10.1.5.0/24 10.1.6.0/24 10.1.9.0/24 10.1.4.0/24 10.1.8.0/24 10.1.7.0/24 R1 R2 R4 R3 s2 s3 Token Ring s1 s0 s1 s3 s0 s1 E0 E0 s1 s0 RIP example Router rip network 10.0.0.0 IGRP example Router igrp1 network 10.0.0.0 EIGRP example Router eigrp1 network 10.0.0.0 Configuration of all routers is the same E0 Figure 6.1 RIP network scenario. 6 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ Chapter 6 As you can see in Listing 6.2, the network uses the Class A network of 10.0.0.0. Hence, we only need one line to identify the directly connected networks. To view the IP routing table, you type the IOS command show ip route. Listing 6.3 shows the R1 router’s routing table. Listing 6.3 The show ip route command. R1#sh ip route . 10.0.0.0/8 is variably subnetted, 16 subnets, 2 masks R 10.1.9.0/24 [120/4] via 10.1.4.1, 00:00:22, Serial3 R 10.1.8.0/30 [120/1] via 10.1.4.1, 00:00:22, Serial3 [120/1] via 10.1.2.2, 00:00:14, Serial2 R 10.1.8.0/24 [120/4] via 10.1.2.2, 00:00:14, Serial2 R 10.1.3.0/24 [120/5] via 10.1.4.1, 00:00:22, Serial3 R 10.1.3.0/24 [120/1] via 10.1.2.2, 00:00:14, Serial2 C 10.1.2.0/24 is directly connected, Serial2 C 10.1.1.0/24 is directly connected, Ethernet0 R 10.1.7.0/24 [120/2] via 10.1.2.2, 00:00:15, Serial2 C 10.1.7.0/24 is directly connected, Serial1 R 10.1.6.0/24 [120/4] via 10.1.4.1, 00:00:22, Serial3 R 10.1.6.0/24 [120/1] via 10.1.7.2, 00:00:13, Serial1 R 10.1.5.0/24 [120/1] via 10.1.7.2, 00:00:15, Serial1 [120/1] via 10.1.2.2, 00:00:16, Serial2 C 10.1.4.0/42 is directly connected, Serial3 R* 0.0.0.0/0 [120/1] via 10.1.4.1, 00:00:23, Serial3 Let’s examine the table shown in Listing 6.3. Each R on the left-hand side indi- cates an entire RIP network has been learned. The C shows that the indicated network is directly “connected” to the router displaying the routing table. The IP network is then listed with an administrative distance (a measure of trustworthi- ness; the lower the better) and the hop count. For example, the network 10.1.5.0/ 24 is indicated by the R on the left side. Because the hop count 1 is sent via Serial 1 and Serial 2, the Cisco router will load balance across the two paths to the remote network 10.1.5.0/30. Following this is the next hop address (10.1.7.2 or 10.1.2.2, for example, to the remote network 10.1.5.0/30) and how long the net- work has been valid in minutes and seconds. Let’s take another remote network, say 10.1.9.0/24, in the routing table: R 10.1.9.0/24 [120/4] via 10.1.4.1, 00:00:22, Serial3 We’ll define the network as follows: ➤ R—The network was learned via RIP (The key is shown at the beginning of the table.) ➤ 10.1.9.0/24—Which subnet is learned and how many bits of subnetting are applied 7 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ Routing and Switching Algorithms ➤ [120/4]—Administrative distance/hops ➤ via 10.1.4.1—The IP address of the interface that the router learned the route from ➤ 00:00:22—How long ago was the route learned ➤ Serial3 —What interface the network has been discovered from. As you can see in Listing 6.3, the network 10.1.5.0/24 is reachable via routers R2 and R3 with the same hop count (1) so RIP will load balance to this network because of the multiple paths. Listing 6.3 also shows a default route. The default route is used if there is an IP packet to an unknown destination. In Listing 6.3, the default route will be sent to the next hop address 10.1.4.1 or router R4. Let’s assume you have been supplied a default router from the source address 131.108.1.100. To create a default route in RIP, you use the following command: ip route 0.0.0.0 0.0.0.0 131.108.1.100 Note: The combination of a source address of 0.0.0.0 and mask of 0.0.0.0 indicates a special route known as a default route. The preceding command injects a default route into any neighboring RIP rout- ers. To view the characteristics of how RIP is operating on a Cisco router, you can use the show ip protocol command, as illustrated in Listing 6.4. Listing 6.4 The show ip protocol command. R1#show ip protocol Routing Protocol is "rip" Sending updates every 30 seconds, next due in 21 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Key-chain Ethernet0 1 1 2 Serial0 1 1 2 Serial1 1 1 2 Serial2 1 1 2 Serial3 1 1 2 Routing for Networks: 10.0.0.0 Routing Information Sources: Gateway Distance Last Update 10.1.8.1 120 00:00:13 Distance: (default is 120) 8 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ Chapter 6 As you can see in Listing 6.4, the router sends updates every 30 seconds, and the next expected update will be in 21 seconds; RIP version I packets are being sent out on interfaces E0, S0, S1, S2, and S3; and the router is listening to both RIP I and RIP II. The administrative distance, which is defined as a group of hosts or routers under a common management, for RIP is 120. For further study, let’s now change the subnet mask on all the serial links to a 30- bit mask or 255.255.255.252. RIP I will not support variable length subnet masking (VLSM), so we’ll turn on RIP II globally. To activate RIP II, you enter the com- mand displayed in Listing 6.5. Note: All serial links in Figure 6.1 have been configured with 30 bit mask. For example, the link between R1 and R4 that was assigned the subnet 10.1.4.0/24 has now become 10.1.4.0/30, and so forth. Listing 6.5 Enabling RIP II. router rip version 2 The commands in Listing 6.5 will force the router to send and receive RIP ver- sion II packets only. Let’s take another look at the routing table for R1 now that RIP II is enabled for the router. Listing 6.6 shows the updated routing table. Listing 6.6 The show ip route command after enabling RIP II. R1#sh ip route Gateway of last resort is 10.1.4.1 to network 0.0.0.0 10.0.0.0/8 is variably subnetted, 16 subnets, 2 masks R 10.1.9.0/30 [120/4] via 10.1.4.1, 00:00:22, Serial3 R 10.1.9.0/24 [120/1] via 10.1.4.1, 00:00:22, Serial3 R 10.1.8.0/30 [120/1] via 10.1.4.1, 00:00:22, Serial3 [120/1] via 10.1.2.2, 00:00:14, Serial2 R 10.1.8.0/24 [120/4] via 10.1.2.2, 00:00:14, Serial2 R 10.1.3.0/30 [120/5] via 10.1.4.1, 00:00:22, Serial3 R 10.1.3.0/24 [120/1] via 10.1.2.2, 00:00:14, Serial2 C 10.1.2.0/30 is directly connected, Serial2 C 10.1.1.0/24 is directly connected, Ethernet0 R 10.1.7.0/24 [120/2] via 10.1.2.2, 00:00:15, Serial2 C 10.1.7.0/30 is directly connected, Serial1 R 10.1.6.0/30 [120/4] via 10.1.4.1, 00:00:22, Serial3 R 10.1.6.0/24 [120/1] via 10.1.7.2, 00:00:13, Serial1 R 10.1.5.0/30 [120/1] via 10.1.7.2, 00:00:15, Serial1 [120/1] via 10.1.2.2, 00:00:16, Serial2 R 10.1.5.0/24 [120/4] via 10.1.2.2, 00:00:16, Serial2 C 10.1.4.0/30 is directly connected, Serial3 R* 0.0.0.0/0 [120/1] via 10.1.4.1, 00:00:23, Serial3 9 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ Routing and Switching Algorithms Notice that the serial networks display with the new 30-bit notation, and the Class C networks display. RIP I would not be able to cope with IP networks with varying masks. Now, take a look at Listing 6.7, which shows the output you receive when the show ip protocol command is issued after RIP II is in use. Listing 6.7 The show ip protocol command after enabling RIP II. R1>sh ip protocol Routing Protocol is "rip" Sending updates every 30 seconds, next due in 7 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 2, receive version 2 Interface Send Recv Key-chain Ethernet0 2 2 Serial0 2 2 Serial1 2 2 Serial2 2 2 Serial3 2 2 Routing for Networks: 10.0.0.0 Routing Information Sources: Gateway Distance Last Update 10.1.2.2 120 00:00:22 10.1.4.2 120 00:18:44 10.1.4.1 120 00:00:21 10.1.7.2 120 00:00:24 Distance: (default is 120) In Listing 6.7, you can see that now only RIP II routing updates are sent and received, and updates are still sent out every 30 seconds. Table 6.1 provides a summary of common RIP I and II configuration commands. Table 6.1 Summary of RIP commands. Command Description debug ip rip events Outputs IP RIP events, such as updates every 30 seconds debug ip rip Displays the RIP routing transactions neighbor <ip address> Establishes a link to a remote router via unicast network <network number> Runs RIP on the associated interface (continued) 10 ○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○ Chapter 6 Note: RIP is relatively easy to configure and troubleshoot when compared to other protocols, such as OSPF. Therefore, RIP was popular in the early days of IP networking. Let’s now discuss another distance vector routing protocol—Interior Gateway Routing Protocol (IGRP). Interior Gateway Routing Protocol (IGRP) Cisco Systems developed a proprietary distance vector routing protocol, called the Interior Gateway Routing Protocol (IGRP), in the 1980s in response to the major limitations of RIP. RIP’s major limitation, of course, is its hop count limit of 15 hops. Cisco developed IGRP with a maximum hop count of 255 and an update interval of 90 seconds while retaining most of the other characteristics of RIP. The major disadvantage of IGRP is that it only operates on Cisco routers. In contrast, IP RIP is an international standard and operates on any compliant host device. IGRP, which only works with Cisco routers, increases the network diam- eter by allowing a greater hop count limit of 255 hops. The default hop count is 100 hops. IGRP uses a concept called autonomous systems (AS). An AS is a domain under the same administration. The AS number will be unique in each domain, and the numbers are controlled by IANA (www.iana.org). IGRP AS’s numbers are not Table 6.1 Summary of RIP commands (continued) . Command Description offset-list <access list> {in|out} Modifies an incoming or outgoing hop count <offset> passive-interface <interface> Stops RIP updates from being sent out only timers basic <update> Modifies RIP timers <invalid> <holdown> <flush> ip rip authentication key-chain Specifies authentication parameters <key chain> ip rip authentication mode Indicates the RIP mode for password authentication; md5 or clear text is supported ip rip send version [1] [2] Specifies the version of RIP to send out to an individual interface ip rip receive version [1] [2] Specifies the version of RIP to receive out of an individual interface [...]... demand circuit provides a solution to this problem OSPF over demand circuits stops hello packets after the two routers have exchanged their database Then, the link is only brought up if data is transferred This saves the on WAN costs The enable OSPF on demand issue the ip ospf demand-circuit IOS command OSPF Network Types and Broadcast Media OSPF supports several network types, including Ethernet and. .. distance for ISIS is 115, and the metric is 20 The left-hand side of the displays shown with lower case letter i, which indicates ISIS is the routing protocol used to reach the remote network You can display the protocol characteristics on any ISIS router by using the show ip protocols IOS command, as shown in Listing 6.18 Listing 6.18 The show ip protocols command after enabling ISIS Routing Protocol is... over IP enabled networks and OSPF has been defined in many RFCs over the years OSPF was originally developed in RFC 1131, and its most recent specifications are in RFC 2328 OSPF was designed to handle large IP networks and manage them into smaller networks called areas Areas are used to reduce memory and CPU requirements OSPF is much more process intensive than RIP, IGRP, and EIGRP The popularity of... IGRP and EIGRP when using the same AS ➤ Requires less CPU resources compared to IGRP By default, EIGRP allows up to 50 percent of the bandwidth ➤ Carries subnet information in updates, which means support for VLSM ➤ Supports authentication (in IOS release versions 11.3+) Routing and Switching Algorithms 15 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ To ensure that routing. .. irrelevant and are included in routing protocol updates Let’s configure the network shown in Figure 6.7 for OSPF In this configuration, we’ll assign the WAN links to be in the backbone and the Ethernet networks in area 1 for router R1, area 2 for router R2, and area 3 for router R3 We’ll also use MD5 authentication in the backbone and assign a process ID (local significance only) as 1 for R1, 2 for R2, and. .. Listing 6.12 provides the status of adjacencies on router R1 we, which should include the other three routers (R2, R3, and R4) Routing and Switching Algorithms 17 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Listing 6.12 The show ip eigrp neighbors command R1#sh ip eigrp neighbors IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime 2 1 0 10.1.2.2 10.1.7.2... IOS command You can also manually summarize a network as a classless route by applying the ip summary-address eigrp interface command Table 6.3 provides a summary of common EIGRP IOS commands Now, let’s move on to a more advanced type of routing protocol, namely linkstate protocols We will begin by discussing Intermediate System to Intermediate System (ISIS) protocol and then... 6.2, the communication between end systems and an intermediate system is identified as an ES-IS connection Communication between IS end systems is referred to as an ISIS connection Figure 6.2 also defines areas in the ISIS environment that reduce the routing table’s size and memory requirements—namely, router R1 in area 1 and R2 in area 2 Routers that have ES-IS and ISIS connections will maintain a different... 1 (L1) database, while routers in different areas will need to maintain Level 1 and Level 2 (L1/ L2) databases These are the link-state database used by ISIS Configuration of ISIS To enable ISIS on a Cisco router, you must perform the following configuration tasks: ➤ Enable ISIS with the router isis command Routing and Switching Algorithms 19 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Area... 10.1.7.1 255.255.255.0 bandwidth 64 ! interface Serial2 ip address 10.1.4.1 255.255.255.0 ip router isis router isis net 47.0000.0c75.d97e.00 As you can see in the preceding four listings, each router has a defined network entry and the ISIS enabled interfaces that will listen and send ISIS updates Listing 6.17 displays the IP routing table from R1 Listing 6.17 The sh ip route command after configuring . Routing and Switching Alogrithms Terms you’ll need to understand: ✓ Distance vector protocols ✓ Routing Information Protocol (RIP) ✓ Interior Gateway Routing. Routing and Switching Algorithms Summary of Available IP Routing Protocols Cisco IOS supports a number of IP routing protocols. Listing 6.1 shows the routing

Ngày đăng: 21/12/2013, 19:15

TỪ KHÓA LIÊN QUAN

w