[ Pobierz całość w formacie PDF ]
We'll build the above configuration step by step and see what can go wrong along the way. Whenever you have an AS that is connected to two ISPs via eBGP, it's always good to run iBGP within your AS in order to have a better control of your routes. In this example we run iBGP inside AS100 between RTA and RTB, and we run OSPF as an IGP. Assuming that we're connected to two ISPs, AS200 and AS300, the following is the first run of the configurations for all the routers. These aren't the final configurations. RTA# hostname RTA ip subnet-zero interface Loopback0 ip address 203.250.13.41 255.255.255.0 Cisco - BGP Case Studies interface Ethernet0 ip address 203.250.14.1 255.255.255.0 interface Serial0 ip address 128.213.63.1 255.255.255.252 router ospf 10 network 203.250.0.0 0.0.255.255 area 0 router bgp 100 network 203.250.13.0 network 203.250.14.0 neighbor 128.213.63.2 remote-as 200 neighbor 203.250.15.2 remote-as 100 neighbor 203.250.15.2 update-source Loopback0 RTF# hostname RTF ip subnet-zero interface Ethernet0 ip address 203.250.14.2 255.255.255.0 interface Serial1 ip address 203.250.15.1 255.255.255.252 router ospf 10 network 203.250.0.0 0.0.255.255 area 0 RTB# hostname RTB ip subnet-zero interface Serial0 ip address 203.250.15.2 255.255.255.252 interface Serial1 ip address 192.208.10.6 255.255.255.252 router ospf 10 network 203.250.0.0 0.0.255.255 area 0 router bgp 100 network 203.250.15.0 neighbor 192.208.10.5 remote-as 300 neighbor 203.250.13.41 remote-as 100 RTC# hostname RTC ip subnet-zero interface Loopback0 ip address 128.213.63.130 255.255.255.192 interface Serial2/0 ip address 128.213.63.5 255.255.255.252 ! interface Serial2/1 ip address 128.213.63.2 255.255.255.252 Cisco - BGP Case Studies router bgp 200 network 128.213.0.0 neighbor 128.213.63.1 remote-as 100 neighbor 128.213.63.6 remote-as 400 RTD# hostname RTD ip subnet-zero interface Loopback0 ip address 192.208.10.174 255.255.255.192 interface Serial0/0 ip address 192.208.10.5 255.255.255.252 ! interface Serial0/1 ip address 192.208.10.2 255.255.255.252 router bgp 300 network 192.208.10.0 neighbor 192.208.10.1 remote-as 500 neighbor 192.208.10.6 remote-as 100 RTE# hostname RTE ip subnet-zero interface Loopback0 ip address 200.200.10.1 255.255.255.0 interface Serial0 ip address 195.211.10.2 255.255.255.252 interface Serial1 ip address 128.213.63.6 255.255.255.252 clockrate 1000000 router bgp 400 network 200.200.10.0 neighbor 128.213.63.5 remote-as 200 neighbor 195.211.10.1 remote-as 500 RTG# hostname RTG ip subnet-zero interface Loopback0 ip address 195.211.10.174 255.255.255.192 interface Serial0 ip address 192.208.10.1 255.255.255.252 interface Serial1 ip address 195.211.10.1 255.255.255.252 router bgp 500 network 195.211.10.0 neighbor 192.208.10.2 remote-as 300 Cisco - BGP Case Studies neighbor 195.211.10.2 remote-as 400 It's always better to use the network command or redistribute static entries into BGP to advertise networks, rather than redistributing IGP into BGP. This is why, throughout this example I use the network command to inject networks into BGP. Let's start with the s1 interface on RTB shutdown, as if the link between RTB and RTD doesn't exist. The following is RTB's BGP table. RTB#show ip bgp BGP table version is 4, local router ID is 203.250.15.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 *i128.213.0.0 128.213.63.2 0 100 0 200 i *i192.208.10.0 128.213.63.2 100 0 200 400 500 300 i *i195.211.10.0 128.213.63.2 100 0 200 400 500 i *i200.200.10.0 128.213.63.2 100 0 200 400 i *>i203.250.13.0 203.250.13.41 0 100 0 i *>i203.250.14.0 203.250.13.41 0 100 0 i *>203.250.15.0 0.0.0.0 0 32768 i Let me go over the basic notations of the above table. The "i" at the beginning means that the entry was learned via an iBGP peer. The "i" at the end indicates the origin of the path information to be IGP. The path info is intuitive. For example, network 128.213.0.0 is learned via path 200 with a next hop of 128.213.63.2. Note that any locally generated entry, such as 203.250.15.0, has a next hop 0.0.0.0. The > symbol indicates that BGP has chosen the best route based on the list of decision steps that I have gone through earlier in this document under "How BGP selects a Path". BGP picks one best path to reach a destination, installs it in the IP routing table and advertises it to other BGP peers. Notice the next hop attribute. RTB knows about 128.213.0.0 via a next hop of 128.213.63.2, which is the eBGP next hop carried into iBGP. Let's look at the IP routing table: RTB#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 Gateway of last resort is not set 203.250.13.0 255.255.255.255 is subnetted, 1 subnets O 203.250.13.41 [110/75] via 203.250.15.1, 02:50:45, Serial0 203.250.15.0 255.255.255.252 is subnetted, 1 subnets C 203.250.15.0 is directly connected, Serial0 O 203.250.14.0 [110/74] via 203.250.15.1, 02:50:46, Serial0 It doesn't look like any of the BGP entries has made it to the routing table. There are two problems here, which we'll examine in turn. The first problem is the next hop for these entries, 128.213.63.2, is unreachable. This is true because we don't have a way to reach that next hop via our IGP (OSPF). RTB hasn't learned about 128.213.63.0 via OSPF. We Cisco - BGP Case Studies can run OSPF on RTA's s0 interface and make it passive, and this way RTB would know how to reach the next hop 128.213.63.2. We could also change the next hop by using the bgp nexthopself command between RTA and RTB. Doing this, RTA's configuration would be: RTA# hostname RTA ip subnet-zero interface Loopback0 ip address 203.250.13.41 255.255.255.0 interface Ethernet0 ip address 203.250.14.1 255.255.255.0 interface Serial0 ip address 128.213.63.1 255.255.255.252 router ospf 10 passive-interface Serial0 network 203.250.0.0 0.0.255.255 area 0 network 128.213.0.0 0.0.255.255 area 0 router bgp 100 network 203.250.0.0 mask 255.255.0.0 neighbor 128.213.63.2 remote-as 200 neighbor 203.250.15.2 remote-as 100 neighbor 203.250.15.2 update-source Loopback0 The new BGP table on RTB now looks like this: RTB#show ip bgp BGP table version is 10, local router ID is 203.250.15.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 *>i128.213.0.0 128.213.63.2 0 100 0 200 i *>i192.208.10.0 128.213.63.2 100 0 200 400 500 300 i *>i195.211.10.0 128.213.63.2 100 0 200 400 500 i
[ Pobierz całość w formacie PDF ]
zanotowane.pldoc.pisz.plpdf.pisz.plmew.pev.pl
|