BGP recently doing exercises,Do the following topology when encountered some problems,This topology is
I configured the network segment:
among them
1 2 3 4 5 6 7 8 9 10 11 12 13 |
R1 R1(config-if)#do sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down Serial1/0 192.168.12.1 YES manual up up Serial1/1 192.168.13.1 YES manual up up Loopback1 1.1.1.1 YES manual up up |
1 2 3 4 5 6 7 8 9 |
R2 Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down Serial1/0 192.168.12.2 YES manual up up Serial1/1 192.168.24.2 YES manual up up |
1 2 3 4 5 6 7 8 9 |
R3 Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down Serial1/0 192.168.13.3 YES manual up up Serial1/1 192.168.35.3 YES manual up up |
1 2 3 4 5 6 7 8 9 |
R4 Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down Serial1/0 192.168.24.4 YES manual up up Serial1/1 192.168.45.4 YES manual up up |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
R5 R5(config)#do sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down Serial1/0 192.168.35.5 YES manual up up Serial1/1 192.168.45.5 YES manual up up Loopback1 5.5.5.5 YES manual up up Loopback2 7.7.7.7 YES manual up up |
In the AS1 wherein R1R2R3,R4 in the AS4,R5 in the AS5
Declared 5.5.5.5 and 7.7.7.7 Network segment on R5,1.1.1.1 declared on the network segment where the R1。
Run OSPF on R1R2R3,Let AS1 full-mesh but temporarily declared 24 and 35 the two network segments,This time should be able to see on the table for R1 bgp 5.5.5.5 and 7.7.7.7 each two paths in the routing table and do not
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
R1(config-router)#do sh ip bg BGP table version is 2, local router ID is 1.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 1.1.1.0/24 0.0.0.0 0 32768 i * i5.5.5.0/24 192.168.35.5 0 100 0 5 i * i 192.168.24.4 0 100 0 4 5 i * i7.7.7.0/24 192.168.35.5 0 100 0 5 i *i 192.168.24.4 0 100 0 4 5 i |
Because there is no next hop,This view corresponds to the routing table R1 shows
1 2 3 4 5 6 7 |
C 192.168.12.0/24 is directly connected, Serial1/0 1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Loopback1 C 192.168.13.0/24 is directly connected, Serial1/1 |
Obviously,This is because just run IGP (here is running OSPF) is not declared 24 and 35 the two network segments。Now proclaims,Sure enough, the corresponding routing entry has been written,It seems to work correctly:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
C 192.168.12.0/24 is directly connected, Serial1/0 1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Loopback1 C 192.168.13.0/24 is directly connected, Serial1/1 O 192.168.24.0/24 [110/128] via 192.168.12.2, 00:00:04, Serial1/0 5.0.0.0/24 is subnetted, 1 subnets B 5.5.5.0 [200/0] via 192.168.24.4, 00:00:09 7.0.0.0/24 is subnetted, 1 subnets B 7.7.7.0 [200/0] via 192.168.24.4, 00:00:09 O 192.168.35.0/24 [110/128] via 192.168.13.3, 00:00:04, Serial1/1 |
Look at bgp table:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
R1#sh bgp BGP table version is 8, local router ID is 1.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 1.1.1.0/24 0.0.0.0 0 32768 i *>i5.5.5.0/24 192.168.35.5 0 100 0 5 i *>i7.7.7.0/24 192.168.35.5 0 100 0 5 i |
How each only a rest?
Problems arise here:Redundant where to go。AD is higher IGP covered it?
1 2 3 4 5 |
R1#sh ip bgp rib-failure Network Next Hop RIB-failure RIB-NH Matches R1# |
Obviously without this command can also see not the case。
If this time to turn off the IGP,Then do a static route on R1,Here it is normal;If you run IGP,I want to have next-hop routing will declare 24 and 35 segments,Once declared,Redundant path disappears。
Actually,This is due to a characteristic caused by BGP:
In BGP,Sending routing updates are sent not all entries,It only sends its best path to its neighbors。
then,AS1 in order to form the full-mesh we ran BGP but also learned R2 35,In this time that the R2 R5 IBGP in line with two!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
R2(config)#do sh ip bg BGP table version is 6, local router ID is 192.168.24.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *>i1.1.1.0/24 192.168.12.1 0 100 0 i *>i5.5.5.0/24 192.168.35.5 0 100 0 5 i * 192.168.24.4 0 4 5 i *>i7.7.7.0/24 192.168.35.5 0 100 0 5 * 192.168.24.4 0 4 5 i |
So that we can understand,R2 his own optimal path sent to R1,Results and R3 is the same as the transmission path of the topology map are both lower (the optimal path)
so,At this momentRoute R1 and R3 each have only one of the segments 5 and 7。
Original article written by LogStudio:R0uter's Blog » Problems when running IGP IBGP encounter:BGP routing updates only the best entries
Reproduced Please keep the source and description link:https://www.logcg.com/archives/264.html