all in one cisco ccie lab study guide second edition phần 5 potx

89 462 0
all in one cisco ccie lab study guide second edition phần 5 potx

Đ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

router ospf 64 ← Enables OSPF process 64 on the router network 192.1.1.0 0.0.0.255 area ← Specifies what interface OSPF will be run on and what area the interface will be in network 2.2.2.2 0.0.0.0 area network 193.1.1.0 0.0.0.255 area ! no ip classless ! ! line line aux line vty login ! end RouterC ! version 11.2 no service udp−small−servers no service tcp−small−servers ! hostname RouterC ! ! interface Loopback0 ← Defines a virtual interface the IP address is used as the router ID ip address 3.3.3.3 255.255.255.0 ! interface Ethernet0/0 ip address 10.1.1.2 255.255.255.0 ! interface Serial0/0 ip address 193.1.1.1 255.255.255.0 ! interface Serial0/1 no ip address shutdown ! ! router ospf 64 ← Enables OSPF process 64 on the router network 192.1.1.0 0.0.0.255 area network 3.3.3.3 0.0.0.0 area network 10.1.1.0 0.0.0.255 area ! no ip classless ! ! line line aux line vty login ! end Monitoring and Testing the Configuration From RouterA, show the OSPF interface statistics with the command show ip ospf interface s0/0 Notice that the hello and dead intervals have been changed and the OSPF cost of sending a packet out the interface has changed to 66 329 RouterA#show ip ospf int s0/0 Serial0 is up, line protocol is up Internet Address 192.1.1.1/24, Area Process ID 64, Router ID 192.1.1.1, Network Type POINT_TO_POINT, Cost: 66 Transmit Delay is sec, State POINT_TO_POINT, Timer intervals configured, Hello 20, Dead 120, Wait 120, Retransmit Hello due in 00:00:08 Neighbor Count is 1, Adjacent neighbor count is Adjacent with neighbor 193.1.1.2 Suppress hello for neighbor(s) Display the routing table on RouterA with the command show ip route Notice the cost of reaching the loopback interface on RouterC (3.3.3.3) is 11 The reason that it is 11 is the cost of the Ethernet is 10 and the cost of a loopback interface is RouterA#show ip route Codes: C − connected, S − static, I − IGRP, 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 E1 − OSPF external type 1, E2 − OSPF external type 2, E − EGP i − IS−IS, L1 − IS−IS level−1, L2 − IS−IS level−2, * − candidate default U − per−user static route, o − ODR Gateway of last resort is not set 1.0.0.0/24 is subnetted, subnets 1.1.1.0is directly connected, Loopback0 2.0.0.0/32 is subnetted, subnets O 2.2.2.2[110/67] via 192.1.1.2, 00:15:08, Serial0 3.0.0.0/32 is subnetted, subnets O 3.3.3.3 [110/11] via 10.1.1.2, 00:15:08, Ethernet0 10.0.0.0/24 is subnetted, subnets C 10.1.1.0 is directly connected, Ethernet0 C 192.1.1.0/24 is directly connected, Serial0 193.1.1.0/24 [110/74] via 10.1.1.2, 00:15:08, Ethernet0 C Notice the cost of reaching the loopback interface on RouterC (3.3.3.3) is 11 The reason that it is 11 is that the OSPF cost of sending a packet out the Ethernet on RouterA is 10 and the cost of sending a packet out the loopback interface on RouterC is This can been seen by displaying the OSPF statisics on RouterA's Ethernet interface and RouterC's loopback interface RouterA#show ip ospf interface e0/0 Ethernet0 is up, line protocol is up Internet Address 10.1.1.1/24, Area Process ID 64, Router ID 192.1.1.1, Network Type BROADCAST, Cost: 10 Transmit Delay is sec, State DR, Priority Designated Router (ID) 192.1.1.1, Interface address 10.1.1.1 Backup Designated router (ID) 3.3.3.3, Interface address 10.1.1.2 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit Hello due in 00:00:09 Neighbor Count is 1, Adjacent neighbor count is Adjacent with neighbor 3.3.3.3 (Backup Designated Router) Suppress hello for neighbor(s) RouterC#show ip ospf int loopback Loopback0 is up, line protocol is up Internet Address 3.3.3.3/24, Area Process ID 64, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: Loopback interface is treated as a stub Host Change the OSPF cost of RouterA's Ethernet interface to 200 RouterA#configure terminal RouterA(config)#interface e0/0 RouterA(config−if)#ip ospf cost 200 330 Display the routing table on RouterA with the command show ip route Notice that the route to 3.3.3.3 has now changed; RouterA now uses the path over the serial interface, which has a cost of 131, which is now lower than the new cost of using the Ethernet interface RouterA#show ip route Codes: C − connected, S − static, I − IGRP, 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 E1 − OSPF external type 1, E2 − OSPF external type 2, E − EGP i − IS−IS, L1 − IS−IS level−1, L2 − IS−IS level−2, * − candidate default U − per−user static route, o − ODR Gateway of last resort is not set C O O 1.0.0.0/24 is subnetted, subnets 1.1.1.0 is directly connected, Loopback0 2.0.0.0/32 is subnetted, subnets 2.2.2.2 [110/67] via 192.1.1.2, 00:03:20, Serial0 3.0.0.0/32 is subnetted, subnets 3.3.3.3 [110/131] via 192.1.1.2, 00:03:20, Serial0 10.0.0.0/24 is subnetted, subnets Now let's take a look at what happens when the hello intervals not match on routers connected to the same network On RouterA's serial interface, change the hello interval to 30 seconds RouterA#configure terminal RouterA(config)#interface s0/0 RouterA(config−if)#ip ospf hello−interval 30 Display the status of the OSPF neighbors on RouterA with the command show ip ospf neighbor The neighbor relationship with RouterB is gone RouterA#show ip ospf neighbor Neighbor ID 3.3.3.3 Pri State FULL/BDR Dead Time 00:00:37 Address 10.1.1.2 Interface Ethernet0 Monitor the OSPF events on RouterA with command debug ip ospf events Notice that RouterA is receiving an OSPF packet from RouterB and the hello intervals not match If either the hello interval or the dead interval not match, then the router will not form an adjacency with its neighbor RouterA# OSPF: Mismatched hello parameters from 192.1.1.2 Lab #41: Inter−Area and External Route Summarization Equipment Needed The following equipment is needed to perform this lab exercise: • Two Cisco routers, each having one serial port and one Ethernet port • Two Cisco routers, each having one serial port and two Ethernet ports • One Cisco router with an Ethernet port • Cisco IOS 10.0 or higher • A PC running a terminal emulation program • Two Cisco V.35 DCE/DTE crossover cables • Two Ethernet hub and four Ethernet cables (or two Ethernet Crossover cables) • Cisco rolled cable for console port access 331 Overview Cisco allows you to summarize addresses in order to conserve resources by limiting the number of routes that need to be advertised between areas Two types of address summarization are supported on a Cisco router: inter−area summarization and external route summarization Inter−area summarization is used to summarize addresses between areas, while external summarization is used to summarize a set of external routes that have been injected into the domain Configuration Overview This lab will demonstrate the various summarization techniques used in OSPF Since area contains all of the addresses for subnetwork 152.1.1.0, they can all be summarized by RouterB and RouterC in one update, 152.1.1.0/24 In addition, RouterD is acting as a ASBR redistributing the RIP learned routes from RouterE into OSPF The seven networks can be summarized into one network entry (130.1.0.0/21) To this, the area range command is used, which specifies the area that the summary belongs to, the summary address, and the mask RouterA will attach to RouterB via a V.35 crossover cable RouterB will act as the DCE supplying clock to RouterA RouterB and RouterC will be attached via an Ethenet hub RouterC will attach to RouterD via a V.35 crossover cable RouterC will act as the DCE supplying clock to RouterD RouterD will attach to RouterE via an Ethenet hub The second Ethernet interfaces on RouterB and RouterC will not attach to anything, so keep−alives will need to be disabled The reason that Ethernet interfaces were used instead of loopback interfaces is that loopback interfaces are advertised as /32 networks across area boundaries RIP is run between RouterD and RouterE; RouterE will advertise all subnetworks that are attached RouterD will redistribute the RIP learned routes into OSPF; mutual redistribution is not used, since it is not needed to illustrate summarization However, if you want RouterE to see the OSPF networks, it will need to be added All IP addresses are as per Figure 8−15 Figure 8−15: OSPF route summarization Router Configurations The configurations for the routers in this example are as follows (key OSPF commands are highlighted in bold) RouterA Building configuration Current configuration: ! version 11.2 no service udp−small−servers 332 no service tcp−small−servers ! hostname RouterA ! ! interface Ethernet0 ip address 192.1.1.2 255.255.255.0 ! interface Serial0 ip address 152.1.2.1 255.255.255.252 ! router ospf 64 ← Enables OSPF process 64 on the router network 152.1.2.0 0.0.0.255 area ← Specifies what interface OSPF will be run on and what area the interface will be in ! line line 16 no exec transport input all line aux line vty password cisco login ! end RouterB Current configuration: ! version 11.2 ! hostname RouterB ! ! interface Ethernet 1/0 ip address 152.1.1.129 255.255.255.192 no keepalive ! interface Ethernet0/0 ip address 152.1.1.1 255.255.255.128 ! interface Serial0/0 ip address 152.1.2.2 255.255.255.252 no ip directed−broadcast no ip mroute−cache no fair−queue clockrate 1000000 ! router ospf 64 ← Enables OSPF process 64 on the router network 152.1.1.0 0.0.0.255 area ← Specifies what interface OSPF will be run on and what area the interface will be in network 152.1.2.0 0.0.0.255 area ! ip classless no ip http server ! ! line transport input none line aux line vty ! end ! 333 RouterC Current configuration: ! hostname RouterC ! interface Ethernet 1/0 ip address 152.1.1.193 255.255.255.192 no ip directed−broadcast no keepalive ! interface Ethernet0/0 ip address 152.1.1.2 255.255.255.128 no ip directed−broadcast ! interface Serial0/0 ip address 152.1.3.2 255.255.255.252 no ip directed−broadcast no ip mroute−cache no fair−queue clockrate 1000000 ! ! router ospf 64 ← Enables OSPF process 64 on the router network 152.1.1.0 0.0.0.255 area network 152.1.3.0 0.0.0.255 area ! ip classless no ip http server ! line transport input none line aux line vty ! end RouterD Current configuration: ! version 11.2 ! hostname RouterD ! ! interface Ethernet0 ip address 130.1.4.1 255.255.255.0 no ip directed−broadcast ! interface Serial0 ip address 152.1.3.1 255.255.255.252 no ip directed−broadcast ip ospf interface−retry ! router ospf 64 ← Enables OSPF process 64 on the router redistribute rip metric 10 subnets ← Redistributes RIP into OSPF (For this lab exercise only one way redistribution is needed) network 152.1.3.0 0.0.0.255 area network 152.1.3.0 0.0.0.255 area ! router rip ← Enables RIP routing network 130.1.0.0 ! 334 no ip classless ! ! line transport input none line aux line vty login ! end RouterE version 11.2 ! hostname RouterE ! interface Loopback0 ip address 130.1.1.1 255.255.255.0 no ip directed−broadcast ! interface Loopback1 ip address 130.1.2.1 255.255.255.0 no ip directed−broadcast ! interface Loopback2 ip address 130.1.3.1 255.255.255.0 no ip directed−broadcast ! interface Loopback3 ip address 130.1.5.1 255.255.255.0 no ip directed−broadcast ! interface Loopback4 ip address 130.1.6.1 255.255.255.0 no ip directed−broadcast no ip directed−broadcast ! interface Loopback5 ip address 130.1.7.1 255.255.255.0 no ip directed−broadcast ! interface Ethernet0 ip address 130.1.4.2 255.255.255.0 no ip directed−broadcast ! router rip ← Enables RIP routing network 130.1.0.0 ! ip classless ! line transport input none line aux line vty ! end Monitoring and Testing the Configuration Display the routing table on RouterA with command show ip route What follows is the output from the command; notice that RouterA has an entry for networks 152.1.1.128/26, 152.1.1.192/26, and 152.1.1.0/25 RouterA#show ip route Codes: C − connected, S − static, I − IGRP, R − RIP, M − mobile, B − BGP 335 D − EIGRP, EX − EIGRP external, O − OSPF, IA − OSPF inter area N1 − OSPF NSSA external type 1, N2 − OSPF NSSA external type E1 − OSPF external type 1, E2 − OSPF external type 2, E − EGP i − IS−IS, L1 − IS−IS level−1, L2 − IS−IS level−2, * − candidate default U − per−user static route, o − ODR Gateway of last resort is not set O O O O O O O E2 E2 E2 E2 E2 E2 E2 O O O O C C IA IA IA IA 130.1.0.0/24 is subnetted, subnets 130.1.3.0 [110/10] via 152.1.2.2, 00:19:45, Serial0 130.1.2.0 [110/10] via 152.1.2.2, 00:19:45, Serial0 130.1.1.0 [110/10] via 152.1.2.2, 00:19:45, Serial0 130.1.7.0 [110/10] via 152.1.2.2, 00:19:45, Serial0 130.1.6.0 [110/10] via 152.1.2.2, 00:19:45, Serial0 130.1.5.0 [110/10] via 152.1.2.2, 00:19:45, Serial0 130.1.4.0 [110/10] via 152.1.2.2, 00:19:45, Serial0 152.1.0.0/16 is variably subnetted, subnets, masks 152.1.1.128/26 [110/65] via 152.1.2.2, 00:19:49, Serial0 152.1.1.192/26 [110/84] via 152.1.2.2, 00:00:22, Serial0 152.1.1.0/25 [110/74] via 152.1.2.2, 00:19:49, Serial0 152.1.3.0/30 [110/122] via 152.1.2.2, 00:19:49, Serial0 152.1.2.0/30 is directly connected, Serial0 192.1.1.0/24 is directly connected, Ethernet0 Since all of these networks are part of Area 0, the area border routers (ABRs) RouterB and RouterC can summarize the networks into one entry, 152.1.1.0 /24 To this, add the following commands to RouterB and RouterC under the OSPF process RouterB(config)#router ospf 64 RouterB(config−router)#area range 152.1.1.0 255.255.255.0 RouterC(config)#router ospf 64 RouterC(config−router)#area range 152.1.1.0 255.255.255.0 Display the routing table on RouterA with the command show ip route What follows is the output from the command; notice that RouterA now only has one entry, 152.1.1.0 /24, instead of three RouterA#show ip route Codes: C − connected, S − static, I − IGRP, 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 E1 − OSPF external type 1, E2 − OSPF external type 2, E − EGP i − IS−IS, L1 − IS−IS level−1, L2 − IS−IS level−2, * − candidate default U − per−user static route, o − ODR Gateway of last resort is not set 130.1.0.0/24 is subnetted, subnets 130.1.3.0 [110/10] via 152.1.2.2, 00:27:23, Serial0 130.1.2.0 [110/10] via 152.1.2.2, 00:27:23, Serial0 130.1.1.0 [110/10] via 152.1.2.2, 00:27:23, Serial0 130.1.7.0 [110/10] via 152.1.2.2, 00:27:23, Serial0 130.1.6.0 [110/10] via 152.1.2.2, 00:27:23, Serial0 130.1.5.0 [110/10] via 152.1.2.2, 00:27:23, Serial0 130.1.4.0 [110/10] via 152.1.2.2, 00:27:23, Serial0 152.1.0.0/16 is variably subnetted, subnets, masks O IA 152.1.1.0/24 [110/84] via 152.1.2.2, 00:01:42, Serial0 O IA 152.1.3.0/30 [110/122] via 152.1.2.2, 00:27:27, Serial0 C 152.1.2.0/30 is directly connected, Serial0 C 192.1.1.0/24 is directly connected, Ethernet0 O O O O O O O E2 E2 E2 E2 E2 E2 E2 RouterD is acting as an ASBR, redistributing the RIP learned routes from RouterE into OSPF Display the routing table on RouterA with the command show ip route What follows is the output from the command; notice that RouterA has entries for all seven networks 336 RouterA# sho ip route Codes: C − connected, S − static, I − IGRP, 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 E1 − OSPF external type 1, E2 − OSPF external type 2, E − EGP i − IS−IS, L1 − IS−IS level−1, L2 − IS−IS level−2, * − candidate default U − per−user static route, o − ODR Gateway of last resort is not set 130.1.0.0/24 is subnetted, subnets 130.1.3.0 [110/10] via 152.1.2.2, 00:36:40, Serial0 130.1.2.0 [110/10] via 152.1.2.2, 00:36:40, Serial0 130.1.1.0 [110/10] via 152.1.2.2, 00:36:40, Serial0 130.1.7.0 [110/10] via 152.1.2.2, 00:36:40, Serial0 130.1.6.0 [110/10] via 152.1.2.2, 00:36:40, Serial0 130.1.5.0 [110/10] via 152.1.2.2, 00:36:40, Serial0 130.1.4.0 [110/10] via 152.1.2.2, 00:36:40, Serial0 152.1.0.0/16 is variably subnetted, subnets, masks O IA 152.1.1.0/24 [110/84] via 152.1.2.2, 00:10:59, Serial0 O IA 152.1.3.0/30 [110/122] via 152.1.2.2, 00:36:44, Serial0 C 152.1.2.0/30 is directly connected, Serial0 C 192.1.1.0/24 is directly connected, Ethernet0 O O O O O O O E2 E2 E2 E2 E2 E2 E2 The networks range from 130.1.1.0 to 130.1.7.0; since these are contiguous, they can be summarized into one entry by the ASBR To accomplish this, add the following command to RouterD under the OSPF process RouterD(config)#router ospf 64 RouterD(config−router)#summary−address 130.1.0.0 255.255.248.0 Without summarization, a router advertising these seven networks would need to send a separate route update for each of these networks Summarization allows a router to advertise more than one network with a single advertisement In the case of our seven networks, they can be advertised as 130.1.0.0 with a 21−bit mask In the table that follows, we see that all seven networks have an exact match for their first 21 bits Notice that the 1, 2, 3, 4, 5, 6, and networks use seven combinations of the three remaining bits (.0 is not used) Thus, a 21−bit mask can be used to summarize the networks Display the routing table on RouterA; what follows is the output Notice that the seven entries are gone and only one entry exits (network 130.1.0.0 /21) RouterA#SHO IP ROute Codes: C − connected, S − static, I − IGRP, 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 E1 − OSPF external type 1, E2 − OSPF external type 2, E − EGP i − IS−IS, L1 − IS−IS level−1, L2 − IS−IS level−2, * − candidate default U − per−user static route, o − ODR Gateway of last resort is not set 130.1.0.0/21 is subnetted, subnets 337 O E2 130.1.0.0 [110/10] via 152.1.2.2, 00:03:00, Serial0 152.1.0.0/16 is variably subnetted, subnets, masks O IA 152.1.1.0/24 [110/84] via 152.1.2.2, 00:03:00, Serial0 O IA 152.1.3.0/30 [110/122] via 152.1.2.2, 00:03:00, Serial0 C 152.1.2.0/30 is directly connected, Serial0 C 192.1.1.0/24 is directly connected, Ethernet0 Lab #42: Regular, Stub, Totally Stub, and NSSA Areas Equipment Needed The following equipment is needed to perform this lab exercise: • Two Cisco routers, each having one serial port and one Ethernet port • Two Cisco routers, each having one serial port and two Ethernet ports • One Cisco router with an Ethernet port • Cisco IOS 10.0 or higher • A PC running a terminal emulation program • Two Cisco V.35 DCE/DTE crossover cables • Two Ethernet hub and four Ethernet cables (or two Ethernet Crossover cables) • Cisco rolled cable for console port access Overview Cisco routers support multiple area types (Regular, Stub, NSSA, and Totally Stub); the difference in area types lies in the kind of LSAs that are permitted in the area In a regular area, all types of LSAs are permitted The benefit is that all routers have all routing information and therefore, have the best path to the destination The drawback is that any flap caused by a link failure outside the area will cause a partial SPF calculation In a stub area, no external LSAs are permitted; therefore, none are injected by the ABR External LSAs are used to describe destinations outside the OSPF domain For example, a route received from another routing protocol, such as RIP, and redistributed into OSPF is considered external and would be advertised in an external LSA While stub areas prevent flapping outside of the domain from affecting the area, they not prevent flapping that occurs within the domain from affecting the area Since summary LSAs are still permitted, flaps that occur in other areas will still affect the stub area Totally stubby areas, like stub areas, prevent external LSAs Unlike a stub area, however, totally stubby areas not permit summary LSAs So flaps that occur within other areas will not affect the totally stubby area An NSSA area is similar to a stub area; however, it can import external routes into the area The routes are carried across the area as type LSAs and converted to type LSAs by the ABR A NSSA area would be used if, for example, you wanted to prevent external LSAs from entering the area, but you still needed to send external LSAs out of the area, for example, if one of the routers in the area was a ASBR Configuration Overview This lab will demonstrate the various area types used in OSPF The connectivity and addressing are the same as in Lab #41 338 On RouterB, add the following command under the BGP process: RouterB(config)#router bgp 200 RouterB(config−router)#aggregate−address 192.1.24.0 255.255.252.0 summary−only as−set From RouterC, reset the BGP connection with the command clear ip bgp 193.1.1.1 This command will reset only the specified neighbor If you wished to reset all of routers BGP neighbors, you could use the command clear ip bgp * Display the BGP table on RouterC with the command show ip bgp The following is the output from the command Notice that RouterC is now only receiving the aggregate address RouterC#show ip bgp BGP table version is 14, local router ID is 3.3.3.3 Status codes: s suppressed, d damped, h history, * valid, > best, i − internal Origin codes: i − IGP, e − EGP, ? − incomplete Network *>i192.1.24.0/22 Next Hop 193.1.1.2 Metric LocPrf 100 Weight Path {100,300} i Lab #49: BGP Route Reflectors Equipment Needed The following equipment is needed to perform this lab exercise: • Three Cisco routers with one serial port • One Cisco router with two serial ports • Cisco IOS 10.0 or higher • A PC running a terminal emulation program for connecting to the console port of the router • Two Cisco DTE/DCE crossover cables • One Cisco rolled cable Route Reflector Overview To prevent routing loops within an AS, BGP will not advertise to internal BGP peers routes that it has learned via other internal BGP peers In Figure 10−16, RouterA will advertise all the routes it has learned via EBGP to RouterB These routes will not be advertised to RouterC This is because RouterB will not pass IBGP routes between RouterA and RouterC In order for RouterC to learn about these routes, an IBGP connection between RouterA and RouterC is needed Figure 10−16: IBGP full mesh requirement The full mesh requirement of IBGP creates the need for neighbor statements to be defined for each IBGP router In an AS of a 100 routers, this would require 100 neighbor statements to be defined — as you can see, this does not scale well 403 To get around this, a concept of a route reflector has been defined A route reflector acts as a concentration router or focal point for all internal BGP (IBGP) sessions Routers that peer with the route reflector are called "route reflector clients." The clients peer with the route reflector and exchange routing information The route reflector then exchanges or "reflects" this information to all clients, thereby eliminating the need for a fully meshed environment In Figure 10−17, RouterA receives updates via EBGP and passes them to RouterB RouterB is configured as a route reflector with two clients: RouterA and RouterC When RouterB receives the routing updates from RouterA, it reflects the information to RouterC An IBGP connection is not needed between RouterA and RouterC because RouterB is propagating or reflecting the information to RouterC Figure 10−17: BGP route reflector Configuration Overview This configuration will use route reflectors to propagate routing information across an AS All routers will be configured for BGP and OSPF RouterA is in AS 100 and will be external BGP neighbors with RouterB, which is in AS 200 RouterC and RouterD are also in AS 200 RouterC will act as the route reflector with two clients: RouterB and RouterD All routers are connected serially via crossover cables RouterB will act as the DCE supplying clock to RouterA and RouterC RouterD will act as the DCE supplying clock for RouterC The IP addresses are assigned as per Figure 10−18 All routers are configured for BGP and have loopback addresses defined RouterA will advertise network 1.0.0.0 Figure 10−18: BGP route reflector lab Router Configurations The configurations for the four routers in this example are as follows (key BGP configurations are highlighted in bold) RouterA ! version 11.2 no service udp−small−servers no service tcp−small−servers ! hostname RouterA ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 404 ! interface Serial0 ip address 192.1.1.1 255.255.255.0 no fair−queue ! router bgp 100 ← Configures a BGP process for autonomous system 100 network 1.0.0.0 ← Specify the list of networks for the BGP routing process to advertise neighbor 192.1.1.2 remote−as 200 ← Specifies the neighboring router and the autonomous system it is in ! no ip classless ! line line 16 line aux line vty ! end RouterB version 11.2 service udp−small−servers service tcp−small−servers ! hostname RouterB ! interface Loopback0 ip address 2.2.2.2 255.255.255.0 ! interface Ethernet0/0 no ip address shutdown ! interface Serial0 ip address 192.1.1.2 255.255.255.0 clockrate 500000 ← Acts as DCE providing clock ! interface Serial1 ip address 193.1.1.2 255.255.255.0 clockrate 500000 ← Acts as DCE providing clock ! router ospf 64 network 0.0.0.0 255.255.255.255 area ! router bgp 200 ← Configures a BGP process for autonomous system 200 neighbor 192.1.1.1 remote−as 100 neighbor 193.1.1.1 remote−as 200 ← Specifies the neighboring router and the autonomous system it is in ! no ip classless ! line line aux line vty login ! end 405 RouterC version 11.2 service udp−small−servers service tcp−small−servers ! hostname RouterC ! ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.0 ! interface Ethernet0 no ip address shutdown ! interface Serial0 ip address 193.1.1.1 255.255.255.0 ! interface Serial1 ip address 194.1.1.1 255.255.255.0 ! router ospf 64 network 0.0.0.0 255.255.255.255 area ! router bgp 200 ← Configures a BGP process for autonomous system 200 neighbor 193.1.1.2 remote−as 200 neighbor 194.1.1.2 remote−as 200 ← Specifies the neighboring router and the autonomous system it is in ! no ip classless ! line line aux line vty login ! end RouterD ! version 11.2 no service password−encryption no service udp−small−servers no service tcp−small−servers ! hostname RouterD ! interface Loopback0 ip address 4.4.4.4 255.255.255.0 ! interface Ethernet0 no ip address shutdown ! interface Serial0 ip address 194.1.1.2 255.255.255.0 clockrate 500000 ← Acts as DCE providing clock ! router ospf 64 network 0.0.0.0 255.255.255.255 area ! 406 router bgp 200 ← Configures a BGP process for autonomous system 100 neighbor 194.1.1.1 remote−as 200 ← Specifies the neighboring router and the autonomous system it is in ! no ip classless ! line line aux line vty login ! end Monitoring and Testing the Configuration From RouterB, display the BGP table with the command show ip bgp The following is the output from the command Note that RouterB has learned of network 1.0.0.0 RouterB#show ip bgp BGP table version is 49, local router ID is 2.2.2.2 Status codes: s suppressed, d damped, h history, * valid, > best, i − internal Origin codes: i − IGP, e − EGP, ? − incomplete Network *>1.0.0.0 Next Hop 192.1.1.1 Metric LocPrf Weight Path 100 I From RouterC, display the BGP table with the command show ip bgp The following is the output from the command Note that RouterC also has learned network about 1.0.0.0 RouterC#show ip bgp BGP table version is 2, local router ID is 3.3.3.3 Status codes: s suppressed, d damped, h history, * valid, > best, i − internal Origin codes: i − IGP, e − EGP, ? − incomplete Network *>i1.0.0.0 Next Hop 192.1.1.1 Metric LocPrf 100 Weight Path 100 i Display the routing table on RouterC with the command show ip route The following is the output from the command Notice that RouterC has not loaded the route into the IP routing table RouterC#show ip route Codes: C − connected, S − static, I − IGRP, R − RIP, M − mobile, B − BGP D − EIGRP, EX − EIGRP external, O − OSPF, IA − OSPF inter area E1 − OSPF external type 1, E2 − OSPF external type 2, E − EGP i − IS−IS, L1 − IS−IS level−1, L2 − IS−IS level−2, * − candidate default U − per−user static route Gateway of last resort is not set O C O O C C 2.0.0.0/32 is subnetted, subnets 2.2.2.2 [110/65] via 193.1.1.2, 00:13:17, Serial0 3.0.0.0/24 is subnetted, subnets 3.3.3.0 is directly connected, Loopback0 4.0.0.0/32 is subnetted, subnets 4.4.4.4 [110/65] via 194.1.1.2, 00:13:18, Serial1 192.1.1.0/24 [110/128] via 193.1.1.2, 00:13:18, Serial0 193.1.1.0/24 is directly connected, Serial0 194.1.1.0/24 is directly connected, Serial1 This is because the IGP (in this case, OSPF) has not learned about the route, because we are not redistributing the BGP learned routes on RouterB into OSPF Remember, BGP must be synchronized with the IGP To disable synchronization, add the command no synchronization under the BGP process 407 RouterC#configure terminal Enter configuration commands, one per line RouterC(config)#router bgp 200 RouterC(config−router)#no synchronization End with CNTL/Z In order for the changes to take effect, the BGP neighbors must be reset To this, use the command clear ip bgp * This causes the TCP session between neighbors to be reset, restarting the neighbor negotiations from scratch and invalidating the cache RouterC#clear ip bgp * Now display the routing table on RouterC Note that network 1.0.0.0 is now present RouterC#show ip route Codes: C − connected, S − static, I − IGRP, R − RIP, M − mobile, B − BGP D − EIGRP, EX − EIGRP external, O − OSPF, IA − OSPF inter area E1 − OSPF external type 1, E2 − OSPF external type 2, E − EGP i − IS−IS, L1 − IS−IS level−1, L2 − IS−IS level−2, * − candidate default U − per−user static route Gateway of last resort is not set B O C O O C C 1.0.0.0/8 [200/0] via 192.1.1.1, 00:02:45 2.0.0.0/32 is subnetted, subnets 2.2.2.2 [110/65] via 193.1.1.2, 00:26:28, Serial0 3.0.0.0/24 is subnetted, subnets 3.3.3.0 is directly connected, Loopback0 4.0.0.0/32 is subnetted, subnets 4.4.4.4 [110/65] via 194.1.1.2, 00:26:29, Serial1 192.1.1.0/24 [110/128] via 193.1.1.2, 00:26:29, Serial0 193.1.1.0/24 is directly connected, Serial0 194.1.1.0/24 is directly connected, Serial1 From RouterD, display the BGP table with the command show ip bgp The following is the output from the command Note that RouterD has not learned of any network via BGP RouterD#show ip bgp This is because RouterB does not have an IBGP connection with RouterD and RouterC cannot advertise a route via IBGP that it learned from another IBGP neighbor There are two ways to fix this: establish an IBGP connection from RouterD to RouterB through the neighbor command, or make RouterC a route reflector To make RouterC a route reflector for RouterB and RouterD, add the following commands to RouterC: RouterC#conf terminal RouterC(config)#router bgp 200 RouterC(config−router)#neighbor 193.1.1.2 route−reflector−client RouterC(config−router)#neighbor 194.1.1.2 route−reflector−client In order for the changes to take effect, the BGP neighbors must be reset To this, use the command clear ip bgp * This causes the TCP session between neighbors to be reset, restarting the neighbor negotiations from scratch and invalidating the cache RouterC#clear ip bgp * Display the BGP neighbor information on RouterC with the command show ip bgp neighbor 194.1.1.2 The following is the truncated output Notice that neighbor 194.1.1.2 is now a route reflector client RouterC#show ip bgp neighbors 194.1.1.2 BGP neighbor is 194.1.1.2, remote AS 200, internal link Index 0, Offset 0, Mask 0x0 408 Route−Reflector Client BGP version 4, remote router ID 4.4.4.4 BGP state = Established, table version = 11, up for 00:11:41 Last read 00:00:41, hold time is 180, keepalive interval is 60 seconds Minimum time between advertisement runs is seconds Received 78 messages, notifications, in queue Sent 79 messages, notifications, in queue Connections established 9; dropped From RouterD, display the BGP table with the command show ip bgp The following is the output from the command Notice that RouterD's BGP process has now learned about network 1.0.0.0; however, the route will not get loaded into the IP routing table until synchronization is turned off RouterD#show ip bgp BGP table version is 3, local router ID is 4.4.4.4 Status codes: s suppressed, d damped, h history, * valid, > best, i − internal Origin codes: i − IGP, e − EGP, ? − incomplete Network *>i1.0.0.0 Next Hop 192.1.1.1 Metric LocPrf 100 Weight Path 100 i Lab #50: Manipulating BGP Path Selection Equipment Needed The following equipment is needed to perform this lab exercise: • Four Cisco routers, each with two serial ports • Cisco IOS 10.0 or higher • A PC running a terminal emulation program for connecting to the console port of the router • Four Cisco DTE/DCE crossover cables • One Cisco rolled cable BGP Path Selection Overview BGP uses a set of parameters (attributes) that describe the characteristics of a route The attributes are sent in the BGP update packets with each route The router uses these attributes to select the best route to the destination In this lab, we will explore manipulating these attributes to control BGP path selections It is important to understand the BGP decision process in order to be able to correctly manipulate path selection The following is the order of the BGP decision process used by the router in path selection: If the next hop is unreachable, not consider it Prefer the path that has the largest weight If the routes have the same weight, use the route with the highest local preference If the routes have the same local preference, prefer the route that was originated by BGP on this router If no route was originated, prefer the route with the shortest AS path If all paths are of the same AS length, prefer the route with lowest origin code (IGP < EGP < INCOMPLETE) If the origin codes are the same, prefer the path with the lowest Multi−Exit Discriminator (MED) If the MEDs are the same, prefer external paths over internal paths If they are still the same, prefer the path through the closest IGP neighbor 10 If they are still the same, prefer the path with the lowest BGP Router ID 409 Configuration Overview This lab will demonstrate how an administrator can manipulate route selection through the use of BGP attributes All routers will be configured for BGP OSPF will be used as the IGP within AS 200 RouterA is in AS 100 and will be external BGP neighbors with RouterB and RouterC, which are in AS 200 RouterB and RouterC will run IBGP to RouterD, which is also in AS 200 All routers are connected serially via crossover cables, RouterB will act as the DCE supplying clock to RouterA and RouterD RouterC will also act as the DCE supplying clock for RouterD and RouterA The IP addresses are assigned as per Figure 10−19 All routers are configured for BGP and have loopback addresses defined — RouterA's and RouterD's loopback addresses will be advertised via BGP Figure 10−19: BGP path selection Router Configurations The configurations for the four routers in this example are as follows (key BGP configurations are highlighted in bold) RouterA version 11.2 no service udp−small−servers no service tcp−small−servers ! hostname RouterA ! ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Loopback1 ip address 2.2.2.2 255.255.255.0 ! interface Ethernet0/0 no ip address shutdown ! interface Serial0 ip address 192.1.1.1 255.255.255.0 ! interface Serial1 ip address 193.1.1.1 255.255.255.0 ! router bgp 100 ← Configures a BGP process for autonomous system 100 network 1.0.0.0 network 2.0.0.0 ← Specify the list of networks for the BGP routing process to advertise neighbor 192.1.1.2 remote−as 200 neighbor 193.1.1.2 remote−as 200 ← Specifies the neighboring router 410 and the autonomous system it is in ! no ip classless ! line line aux line vty login ! end RouterB version 11.2 no service udp−small−servers no service tcp−small−servers ! hostname RouterB ! interface Ethernet0/0 no ip address shutdown ! interface Serial0 ip address 192.1.1.2 255.255.255.0 clockrate 500000 ← Acts as DCE providing clock ! interface Serial1 ip address 194.1.1.2 255.255.255.0 clockrate 500000 ← Acts as DCE providing clock ! router ospf 64 passive−interface Serial0/0 network 194.1.1.0 0.0.0.255 area network 192.1.1.0 0.0.0.255 area ! router bgp 200 ← Configures a BGP process for autonomous system 100 no synchronization ← Disables synchronization between BGP and your IGP neighbor 192.1.1.1 remote−as 100 neighbor 194.1.1.1 remote−as 200 neighbor 195.1.1.2 remote−as 200 ← Specifies the neighboring router and the autonomous system it is in ! no ip classless ! line line aux line vty login ! end RouterC version 11.2 no service udp−small−servers no service tcp−small−servers ! hostname RouterC ! interface Ethernet0/0 no ip address 411 shutdown ! interface Serial0 ip address 193.1.1.2 255.255.255.0 clockrate 500000 ← Acts as DCE providing clock ! interface Serial1 ip address 195.1.1.2 255.255.255.0 clockrate 500000 ← Acts as DCE providing clock ! router ospf 64 passive−interface Serial0/0 network 195.1.1.0 0.0.0.255 area network 193.1.1.0 0.0.0.255 area ! router bgp 200 ← Configures a BGP process for autonomous system 200 no synchronization ← Disables synchronization between BGP and your IGP neighbor 193.1.1.1 remote−as 100 neighbor 194.1.1.2 remote−as 200 neighbor 195.1.1.1 remote−as 200 ← Specifies the neighboring router and the autonomous system it is in ! no ip classless ! line line aux line vty login ! end RouterD version 11.2 no service udp−small−servers no service tcp−small−servers ! hostname RouterD ! interface Loopback0 ip address 4.4.4.4 255.255.255.0 ! interface Ethernet0/0 no ip address shutdown ! interface Serial0 ip address 194.1.1.1 255.255.255.0 ! interface Serial1 ip address 195.1.1.1 255.255.255.0 ! router ospf 64 network 194.1.1.0 0.0.0.255 area network 195.1.1.0 0.0.0.255 area network 4.4.4.0 0.0.0.255 area ! router bgp 200 ← Configures a BGP process for autonomous system 200 no synchronization ← Disables synchronization between BGP and your IGP neighbor 194.1.1.2 remote−as 200 neighbor 195.1.1.2 remote−as 200 ← Specifies the neighboring router and the autonomous system it is in 412 ! ! no ip classless ! line line aux line vty login ! end Monitoring and Testing the Configuration Display the BGP table on RouterD with the command show ip bgp The following is the output from the command RouterD is learning about network 1.0.0.0 and 2.0.0.0 via BGP from both RouterB and RouterC RouterD# show ip bgp BGP table version is 11, local router ID is 4.4.4.4 Status codes: s suppressed, d damped, h history, * valid, > best, i − internal Origin codes: i − IGP, e − EGP, ? − incomplete Network *>i1.0.0.0 * i *>i2.0.0.0 * i Next Hop 192.1.1.1 193.1.1.1 192.1.1.1 193.1.1.1 Metric 0 0 LocPrf 100 100 100 100 Weight 0 0 Path 100 i 100 i 100 i 100 i Notice the best path (which is indicated by the >) is through RouterB (192.1.1.0) Remember the ten decision steps that BGP goes through to select the best path — since all other things were equal, the route from the router with the lowest RouterID is used This can be verified through the command show ip bgp neighbors Notice that RouterB's RouterID is 194.1.1.2 and RouterC's RouterID is 195.1.1.2 RouterD#show ip bgp neighbors BGP neighbor is 194.1.1.2, remote AS 200, internal link ← RouterB Index 0, Offset 0, Mask 0x0 BGP version 4, remote router ID 194.1.1.2 BGP state = Established, table version = 11, up for 00:11:56 Last read 00:00:56, hold time is 180, keepalive interval is 60 seconds Minimum time between advertisement runs is seconds Received 91 messages, notifications, in queue Sent 83 messages, notifications, in queue Connections established 6; dropped Connection state is ESTAB, I/O status: 1, unread input bytes: Local host: 194.1.1.1, Local port: 179 Foreign host: 194.1.1.2, Foreign port: 11006 BGP neighbor is 195.1.1.2, remote AS 200, internal link ← RouterC Index 0, Offset 0, Mask 0x0 BGP version 4, remote router ID 195.1.1.2 BGP state = Established, table version = 11, up for 00:11:40 Last read 00:00:40, hold time is 180, keepalive interval is 60 seconds Minimum time between advertisement runs is seconds Received 103 messages, notifications, in queue Sent 91 messages, notifications, in queue Connections established 8; dropped Connection state is ESTAB, I/O status: 1, unread input bytes: Local host: 195.1.1.1, Local port: 179 Foreign host: 195.1.1.2, Foreign port: 11031 413 Local Preference Attribute The local preference attribute is a degree of preference given to a BGP route to compare it with other routes to the same destination This is the second highest attribute used in the BGP decision process (Cisco proprietary weight parameter is first) The local preference attribute only is local to the autonomous system and does not get passed to EBGP neighbors The higher the local preference, the more preferred the route is In this exercise we will configure RouterC to set the local preference for network 1.0.0.0 learned from RouterA to 200 Since the default local preference is 100, all routers in AS 200 will prefer the path through RouterC to reach network 1.0.0.0 In order to manipulate the local preference, we need to define what routes will be manipulated through the use of an access list, define the policy that will be applied to those routes through a route map, and then assign the route map to a BGP neighbor Add access−list to RouterC, permitting network 1.0.0.0: RouterC#configure terminal RouterC(config)#access−list permit 1.0.0.0 0.255.255.255 Define a route map named localpref that sets the local preference of the route to 200 if it matches access−list and 100 if it does not RouterC#configure terminal RouterC(config)#route−map localpref 10 ← If the IP address matches access−list 1, the local preference is set to 200 RouterC(config−route−map)#match ip address RouterC(config−route−map)#set local−preference 200 RouterC(config−route−map)route−map localpref permit 20 ← If the IP address does not match access−list 1, the loc is set to 100 RouterC(config)# set local−preference 100 Apply the route map to inbound traffic from BGP neighbor 193.1.1.1 (RouterA) RouterC#configure terminal RouterC(config)#router bgp 200 RouterC(config−router)#neighbor 193.1.1.1 route−map localpref in In order for the changes to take effect, the BGP neighbors must be reset To this, use the command clear ip bgp * This causes the TCP session between neighbors to be reset, restarting the neighbor negotiations from scratch and invalidating the cache RouterC#clear ip bgp * Display the BGP table on RouterD with the command show ip bgp The following is the output from the command Notice the local preference of the route learned from RouterC is now 200 and is the best route (indicated by the > sign) RouterD#show ip bgp BGP table version is 11, local router ID is 4.4.4.4 Status codes: s suppressed, d damped, h history, * valid, Origin codes: i − IGP, e − EGP, ? − incomplete Network Next Hop Metric LocPrf Weight *>i1.0.0.0 193.1.1.1 200 from Router C * i2.0 193.1.1.1 100 *>i 192.1.1.1 100 > best, i − internal Path 100 i ← Route learned 100 i 100 i Display the BGP table on RouterB with the command show ip bgp The following is the output from the command Notice that RouterB is also using the route advertised from RouterC to reach network 1.0.0.0 414 RouterB#show ip bgp BGP table version is 20, local router ID is 194.1.1.2 Status codes: s suppressed, d damped, h history, * valid, > best, i − internal Origin codes: i − IGP, e − EGP, ? − incomplete Network Next Hop Metric LocPrf Weight Path *>i1.0.0.0 193.1.1.1 200 100 i ← Route learned from RouterC * 192.1.1.1 0 100 i * i2.0.0.0 193.1.1.1 100 100 i *> 192.1.1.1 0 100 I The Multi−Exit Discriminator (MED) Attribute The Multi−Exit Discriminator (MED) attribute is the external metric of a route Unlike the local preference attribute, the MED is exchanged between ASs; however, the MED that comes into an AS does not leave As shown in the last section, local preference was used by the AS to influence its own outbound decision process The MED can be used to influence the outbound decision of another AS The lower the MED, the more preferred the route In Figure 10−20, RouterA sets the MED attribute for network 1.0.0.0 to 50 before advertising it to RouterC and 100 before advertising it to RouterB Figure 10−20: BGP Multi−Exit Discriminator (MED) attribute The routers in AS 200 will prefer the route through RouterC because it has the lowest MED In order to manipulate the MED, we need to identify what networks will be manipulated through the use of an access list, define a policy that will be applied to those routes through a route map, and then assign the route map to a BGP neighbor Remove the map statement on RouterC: RouterC#conf terminal RouterC(config)#router bgp 200 RouterC(config−router)#no neighbor 193.1.1.1 route−map localpref in Add access−list to RouterA, permitting network 1.0.0.0: RouterA#configure terminal RouterA(config)#access−list permit 1.0.0.0 0.255.255.255 Define two route maps, one named set_med_50 and the other named set_med_100 The first route map sets the MED attribute for network 1.0.0.0 to 50, and the latter sets the MED attribute to 100 RouterA#configuration terminal RouterA(config)#route−map set_med_50 10 ← The MED attribute for network 1.0.0.0 is set to 50 RouterA(config−route−map)#match ip address RouterA(config−route−map)#set metric 50 RouterA(config−route−map)#exit RouterA(config)#route−map set_med_50 20 ← The MED attribute for all other networks is not set RouterA(config−route−map)#set metric 415 RouterA(config−route−map)#exit RouterA(config)#route−map set_med_100 10 ← The MED attribute for network 1.0.0.0 is set to 100 RouterA(config−route−map)#match ip address RouterA(config−route−map)#set metric 100 RouterA(config−route−map)#exit RouterA(config)#route−map set_med_100 20 ← The MED attribute for all other networks is not set RouterA(config−route−map)#set metric Apply route map set_med_50 on outbound routing updates to RouterC (193.1.1.2) and route map set_med_100 on outbound routing updates to RouterB (192.1.1.2) RouterA#configure terminal RouterA(config)#router bgp 100 RouterA(config−router)#neighbor 193.1.1.2 route−map set_med_50 out RouterA(config−router)#neighbor 192.1.1.2 route−map set_med_100 out In order for the changes to take effect, the BGP neighbors must be reset To this, use the command clear ip bgp* This causes the TCP session between neighbors to be reset, restarting the neighbor negotiations from scratch and invalidating the cache RouterC#clear ip bgp * Display the BGP table on RouterB with the command show ip bgp The following is the output from the command Notice that the route to network 1.0.0.0 learned via 193.1.1.1 has a local preference of 50 and is the preferred route RouterB#show ip bgp BGP table version is 30, local router ID is 194.1.1.2 Status codes: s suppressed, d damped, h history, * valid, > best, i − internal Origin codes: i − IGP, e − EGP, ? − incomplete Network Next Hop Metric LocPrf Weight Path *>i1.0.0.0 193.1.1.1 50 100 100 i ← Preferred route * 192.1.1.1 100 100 i * i2.0.0.0 193.1.1.1 100 100 i *> 192.1.1.1 0 100 I From RouterA, display the route maps that are being used with the command show route−maps This command tells what access list is used by the match clause, and what set clause is applied and how many times it has been used This command is very useful in troubleshooting possible route−map problems RouterA#show route−map route−map set_med_50, permit, sequence 10 Match clauses: ip address (access−lists): Set clauses: metric 50 Policy routing matches: packets, bytes route−map set_med_50, permit, sequence 20 Match clauses: Set clauses: Policy routing matches: packets, bytes route−map set_med_100, permit, sequence 10 Match clauses: ip address (access−lists): Set clauses: metric 100 Policy routing matches: packets, bytes route−map set_med_100, permit, sequence 20 Match clauses: Set clauses: 416 Policy routing matches: packets, bytes route−map med, permit, sequence 10 Match clauses: ip address (access−lists): Set clauses: Policy routing matches: packets, bytes AS Path Manipulation BGP always prefers the route with the shortest AS path In this exercise we will configure RouterA to prepend two extra AS path numbers to network 1.0.0.0 (AS 300 and AS 400) before advertising this network to RouterC and RouterB In order to manipulate the AS path information, we need to identify which routes will be manipulated through the use of an access list, define a policy that will be applied to those routes through a route map, and then assign the route map to a BGP neighbor Add access−list to RouterA, permitting network 1.0.0.0: RouterA#configure terminal RouterA(config)#access−list permit 1.0.0.0 0.255.255.255 Define a route map named AS_Path that prepends two additional AS path numbers (AS300 and AS400) to the route if it matches access list RouterA(config)#route−map AS_Path permit 10 RouterA(config−route−map)#match ip address RouterA(config−route−map)#set as−path prepend 300 400 RouterA(config−route−map)#exit RouterA(config)#route−map AS_Path 20 RouterA(config−route−map)#set as−path prepend RouterA(config−route−map)#exit Apply the route map to outbound routing updates to BGP neighbor 193.1.1.2 (RouterC) and neighbor 192.1.1.2 (RouterB) RouterA#configure terminal RouterA(config)#router bgp 200 RouterA(config−router)#neighbor 193.1.1.2 route−map AS_Path out RouterA(config−router)#neighbor 192.1.1.2 route−map AS_Path out In order for the changes to take effect, the BGP neighbors must be reset To this, use the command clear ip bgp * This causes the TCP session between neighbors to be reset, restarting the neighbor negotiations from scratch and invalidating the cache RouterA#clear ip bgp * Display the BGP table on RouterB with the command show ip bgp The following is the output from the command Notice that the route to network 1.0.0.0 now has an AS path of [100 300 400] RouterB#show ip bgp BGP table version is 68, local router ID is 194.1.1.2 Status codes: s suppressed, d damped, h history, * valid, > best, i − internal Origin codes: i − IGP, e − EGP, ? − incomplete Network * i1.0.0.0 *> * i2.0.0.0 *> Next Hop 193.1.1.1 192.1.1.1 193.1.1.1 192.1.1.1 Metric 0 0 LocPrf 100 100 417 Weight 0 0 Path 100 300 400 i 100 300 400 i 100 i 100 i ... Ethernet 1/0 ip address 152 .1.1.129 255 . 255 . 255 .192 no keepalive ! interface Ethernet0/0 ip address 152 .1.1.1 255 . 255 . 255 .128 ! interface Serial0/0 ip address 152 .1.2.2 255 . 255 . 255 . 252 no ip directed−broadcast... Ethernet 1/0 ip address 152 .1.1.129 255 . 255 . 255 .192 no keepalive ! interface Ethernet0/0 ip address 152 .1.1.1 255 . 255 . 255 .128 ! interface Serial0/0 ip address 152 .1.2.2 255 . 255 . 255 . 252 no ip directed−broadcast... 130.1.2.1 255 . 255 . 255 .0 no ip directed−broadcast ! interface Loopback2 ip address 130.1.3.1 255 . 255 . 255 .0 no ip directed−broadcast ! interface Loopback3 ip address 130.1 .5. 1 255 . 255 . 255 .0 no ip

Ngày đăng: 14/08/2014, 13:20

Từ khóa liên quan

Mục lục

  • Chapter 8: OSPF

    • Lab #40: Configure OSPF Interface Parameters

      • RouterC

      • Monitoring and Testing the Configuration

      • Lab #41: Inter-Area and External Route Summarization

        • Equipment Needed

        • Overview

        • Configuration Overview

        • Router Configurations

        • RouterA

        • RouterB

        • RouterC

        • RouterD

        • RouterE

        • Monitoring and Testing the Configuration

        • Lab #42: Regular, Stub, Totally Stub, and NSSA Areas

          • Equipment Needed

          • Overview

          • Configuration Overview

          • Router Configurations

          • RouterA

          • RouterB

          • RouterC

          • RouterD

Tài liệu cùng người dùng

Tài liệu liên quan