User Tools

Site Tools


tech:network:cisco:bgp:bgp:bgp-synchronization-principle:bgp-synchronization-principle

BGP: Synchronization Principle

Project name: ccna-bgp11-bgp-synchronization

Issued BGP Configuration

  1. IGP: OSPF
  2. BGP: peering policy: do not advertise EBGP link inter public AS.

Base Configuration

  • R1
en
conf t
!
hostname R1
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int Lo1
ip address 10.1.1.1 255.255.255.255
no shut
exit
int gig0/0
ip address 10.1.2.1 255.255.255.0
no shut
exit
int gig0/1
ip address 10.1.3.1 255.255.255.0
no shut
exit
!
router ospf 1
network 10.1.1.1 0.0.0.0 area 0
network 10.1.2.1 0.0.0.0 area 0
network 10.1.3.1 0.0.0.0 area 0
exit
!
end
wr
  • R2
en
conf t
!
hostname R2
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int Lo1
ip address 10.2.2.2 255.255.255.255
no shut
int gig0/1
ip address 10.1.2.2 255.255.255.0
no shut
exit
int gig0/2
ip address 2.4.0.2 255.255.255.0
no shut
exit
int gig0/3
ip address 1.2.0.2 255.255.0.0
no shut
exit
!
router bgp 10
neighbor IBGP-POL1 peer-group
neighbor IBGP-POL1 remote-as 10
neighbor IBGP-POL1 update-source Lo1
neighbor IBGP-POL1 next-hop-self
neighbor 10.3.3.3 peer-group IBGP-POL1
neighbor 2.4.0.4 remote-as 40
network 1.2.0.0 mask 255.255.0.0
exit
!
router ospf 1
network 10.2.2.2 0.0.0.0 area 0
network 10.1.2.2 0.0.0.0 area 0
exit
!
end
wr
  • R3
en
conf t
!
hostname R3
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int Lo1
ip address 10.3.3.3 255.255.255.255
no shut
int gig0/1
ip address 10.1.3.3 255.255.255.0
no shut
exit
int gig0/2
ip address 3.5.0.3 255.255.255.0
no shut
exit
int gig0/3
ip address 1.3.0.3 255.255.0.0
no shut
exit
!
router ospf 1
network 10.3.1.3 0.0.0.0 area 0
exit
!
router bgp 10
neighbor IBGP-POL1 peer-group
neighbor IBGP-POL1 remote-as 10
neighbor IBGP-POL1 update-source Lo1
neighbor IBGP-POL1 next-hop-self
neighbor 10.2.2.2 peer-group IBGP-POL1
neighbor 3.5.0.5 remote-as 50
network 1.3.0.0 mask 255.255.0.0
exit
!
router ospf 1
network 10.3.3.3 0.0.0.0 area 0
network 10.1.3.3 0.0.0.0 area 0
exit
!
end
wr
  • R4
en
conf t
!
hostname R4
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int gig0/0
ip address 2.4.0.4 255.255.255.0
no shut
exit
int gig0/3
ip address 4.0.0.4 255.255.0.0
no shut
exit
!
router bgp 40
neighbor 2.4.0.2 remote-as 10
network 4.0.0.0 mask 255.255.0.0
exit
!
end
wr
  • R5
en
conf t
!
hostname R5
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int gig0/0
ip address 3.5.0.5 255.255.255.0
no shut
exit
int gig0/3
ip address 5.0.0.5 255.255.0.0
no shut
exit
!
router bgp 50
neighbor 3.5.0.3 remote-as 10
network 5.0.0.0 mask 255.255.0.0
exit
!
end
wr
  • PC-2
ip 1.2.0.102 255.255.0.0 1.2.0.2
save
  • PC-3
ip 1.3.0.103 255.255.0.0 1.3.0.3
save
  • PC-4
ip 4.0.0.104 255.255.0.0 4.0.0.4
save
  • PC-5
ip 5.0.0.105 255.255.0.0 5.0.0.5
save

Verification

on PC-5

ping 4.0.0.104
R1#sh ip ro
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
C        10.1.1.1/32 is directly connected, Loopback1
C        10.1.2.0/24 is directly connected, GigabitEthernet0/0
L        10.1.2.1/32 is directly connected, GigabitEthernet0/0
C        10.1.3.0/24 is directly connected, GigabitEthernet0/1
L        10.1.3.1/32 is directly connected, GigabitEthernet0/1
O        10.2.2.2/32 [110/2] via 10.1.2.2, 00:10:29, GigabitEthernet0/0
O        10.3.3.3/32 [110/2] via 10.1.3.3, 00:10:19, GigabitEthernet0/1
R2#sh ip bgp
BGP table version is 7, local router ID is 10.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.2.0.0/16       0.0.0.0                  0         32768 i
 *>i 1.3.0.0/16       10.3.3.3                 0    100      0 i
 *>  4.0.0.0/16       2.4.0.4                  0             0 40 i
 *>i 5.0.0.0/16       10.3.3.3                 0    100      0 50 i
R2#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
B        1.3.0.0/16 [200/0] via 10.3.3.3, 00:02:52
      4.0.0.0/16 is subnetted, 1 subnets
B        4.0.0.0 [20/0] via 2.4.0.4, 00:02:57
      5.0.0.0/16 is subnetted, 1 subnets
B        5.0.0.0 [200/0] via 10.3.3.3, 00:02:52
R3#sh ip bgp
BGP table version is 5, local router ID is 10.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 1.2.0.0/16       10.2.2.2                 0    100      0 i
 *>  1.3.0.0/16       0.0.0.0                  0         32768 i
 *>i 4.0.0.0/16       10.2.2.2                 0    100      0 40 i
 *>  5.0.0.0/16       3.5.0.5                  0             0 50 i
R3#sh ip ro bgp 
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
B        1.2.0.0/16 [200/0] via 10.2.2.2, 00:08:50
      4.0.0.0/16 is subnetted, 1 subnets
B        4.0.0.0 [200/0] via 10.2.2.2, 00:08:50
      5.0.0.0/16 is subnetted, 1 subnets
B        5.0.0.0 [20/0] via 3.5.0.5, 00:08:50
R3#
R4#sh ip bgp
BGP table version is 5, local router ID is 4.0.0.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.2.0.0/16       2.4.0.2                  0             0 10 i
 *>  1.3.0.0/16       2.4.0.2                                0 10 i
 *>  4.0.0.0/16       0.0.0.0                  0         32768 i
 *>  5.0.0.0/16       2.4.0.2                                0 10 50 i
R4#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/16 is subnetted, 2 subnets
B        1.2.0.0 [20/0] via 2.4.0.2, 00:01:09
B        1.3.0.0 [20/0] via 2.4.0.2, 00:00:38
      5.0.0.0/16 is subnetted, 1 subnets
B        5.0.0.0 [20/0] via 2.4.0.2, 00:00:38
R5#sh ip bgp
BGP table version is 5, local router ID is 5.0.0.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.2.0.0/16       3.5.0.3                                0 10 i
 *>  1.3.0.0/16       3.5.0.3                  0             0 10 i
 *>  4.0.0.0/16       3.5.0.3                                0 10 40 i
 *>  5.0.0.0/16       0.0.0.0                  0         32768 i
R5#sh ip ro bpg
Translating "bpg"
             ^
% Invalid input detected at '^' marker.

R5#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/16 is subnetted, 2 subnets
B        1.2.0.0 [20/0] via 3.5.0.3, 00:00:30
B        1.3.0.0 [20/0] via 3.5.0.3, 00:00:30
      4.0.0.0/16 is subnetted, 1 subnets
B        4.0.0.0 [20/0] via 3.5.0.3, 00:00:30
R5#sh ip bgp
BGP table version is 5, local router ID is 5.0.0.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.2.0.0/16       3.5.0.3                                0 10 i
 *>  1.3.0.0/16       3.5.0.3                  0             0 10 i
 *>  4.0.0.0/16       3.5.0.3                                0 10 40 i
 *>  5.0.0.0/16       0.0.0.0                  0         32768 i
R5#sh ip ro bpg
Translating "bpg"
             ^
% Invalid input detected at '^' marker.

R5#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/16 is subnetted, 2 subnets
B        1.2.0.0 [20/0] via 3.5.0.3, 00:00:30
B        1.3.0.0 [20/0] via 3.5.0.3, 00:00:30
      4.0.0.0/16 is subnetted, 1 subnets
B        4.0.0.0 [20/0] via 3.5.0.3, 00:00:30
R3#sh ip ro 10.2.2.2
Routing entry for 10.2.2.2/32
  Known via "ospf 1", distance 110, metric 3, type intra area
  Last update from 10.1.3.1 on GigabitEthernet0/1, 00:17:47 ago
  Routing Descriptor Blocks:
  * 10.1.3.1, from 10.2.2.2, 00:17:47 ago, via GigabitEthernet0/1
      Route metric is 3, traffic share count is 1
R1#sh ip ro 4.0.0.104
% Network not in table

ping failing. because R1 do not know route to 4.0.0.0/16, but R4, R5 learned BGP advertised route to routing table.

PC-5> ping 4.0.0.104
4.0.0.104 icmp_seq=1 timeout
4.0.0.104 icmp_seq=2 timeout
4.0.0.104 icmp_seq=3 timeout
4.0.0.104 icmp_seq=4 timeout
4.0.0.104 icmp_seq=5 timeout
PC-5> trace 4.0.0.104
trace to 4.0.0.104, 8 hops max, press Ctrl+C to stop
 1   5.0.0.5   2.865 ms  2.190 ms  4.527 ms
 2   3.5.0.3   3.242 ms  2.581 ms  3.354 ms
 3     *  *  *
 4     *  *  *
 5     *  *  *
 6     *  *  *
 7     *  *  *
 8     *  *  *
R3#traceroute 4.0.0.104 source 10.3.3.3
Type escape sequence to abort.
Tracing the route to 4.0.0.104
VRF info: (vrf in name/id, vrf out name/id)
  1 10.1.3.1 5 msec 4 msec 5 msec
  2 10.1.3.1 !H  !H  !H 
R3#traceroute 4.0.0.104 source 1.3.0.103
% Invalid source address- IP address not on any of our up interfaces
R3#traceroute 4.0.0.104 source 1.3.0.3  
Type escape sequence to abort.
Tracing the route to 4.0.0.104
VRF info: (vrf in name/id, vrf out name/id)
  1  *  *  * 
  2  *  *  * 
  3  *  *  * 
  4  *  *  * 
  5  *  *  * 
  6  *  *  * 
  7 
R2#sh run all | sec router bgp
router bgp 10
 no synchronization
 bgp fast-external-fallover
 bgp route-map-cache
 no bgp asnotation dot
 no bgp consistency-checker
 bgp client-to-client reflection
 bgp client-to-client reflection intra-cluster cluster-id any
 bgp transport path-mtu-discovery
 bgp enforce-first-as
 bgp log-neighbor-changes
 bgp dynamic-med-interval 600
 bgp listen limit 100
 bgp update-delay 120
 bgp refresh stalepath-time 0
 bgp refresh max-eor-time 0
 bgp regexp deterministic
 bgp default ipv4-unicast
 bgp default ipv6-nexthop
 bgp default local-preference 100
 bgp default route-target filter
 bgp aggregate-timer 30
 bgp update-group split as-override
 bgp nexthop trigger enable
 bgp nexthop trigger delay 5
 bgp scan-time 60
 network 1.2.0.0 mask 255.255.0.0
 timers bgp 60 180 0
 neighbor IBGP-POL1 peer-group
 neighbor IBGP-POL1 remote-as 10
 neighbor IBGP-POL1 update-source Loopback1
 neighbor IBGP-POL1 next-hop-self
 neighbor 2.4.0.4 remote-as 40
 neighbor 10.3.3.3 peer-group IBGP-POL1
 distance bgp 20 200 200
 distance mbgp 20 200 200
 no auto-summary
R3#sh run all | sec router bgp
router bgp 10
 no synchronization
 bgp fast-external-fallover
 bgp route-map-cache
 no bgp asnotation dot
 no bgp consistency-checker
 bgp client-to-client reflection
 bgp client-to-client reflection intra-cluster cluster-id any
 bgp transport path-mtu-discovery
 bgp enforce-first-as
 bgp log-neighbor-changes
 bgp dynamic-med-interval 600
 bgp listen limit 100
 bgp update-delay 120
 bgp refresh stalepath-time 0
 bgp refresh max-eor-time 0
 bgp regexp deterministic
 bgp default ipv4-unicast
 bgp default ipv6-nexthop
 bgp default local-preference 100
 bgp default route-target filter
 bgp aggregate-timer 30
 bgp update-group split as-override
 bgp nexthop trigger enable
 bgp nexthop trigger delay 5
 bgp scan-time 60
 network 1.3.0.0 mask 255.255.0.0
 timers bgp 60 180 0
 neighbor IBGP-POL1 peer-group
 neighbor IBGP-POL1 remote-as 10
 neighbor IBGP-POL1 update-source Loopback1
 neighbor IBGP-POL1 next-hop-self
 neighbor 3.5.0.5 remote-as 50
 neighbor 10.2.2.2 peer-group IBGP-POL1
 distance bgp 20 200 200
 distance mbgp 20 200 200
 no auto-summary
 no synchronization

line found by above default configuration.

Let's say synchronization on.

  • R2
conf t
!
router bgp 10
synchronization
exit
!
end
  • R3
conf t
!
router bgp 10
synchronization
exit
!
end
R2#sh run | sec bgp
router bgp 10
 synchronization
 bgp log-neighbor-changes
 network 1.2.0.0 mask 255.255.0.0
 neighbor IBGP-POL1 peer-group
 neighbor IBGP-POL1 remote-as 10
 neighbor IBGP-POL1 update-source Loopback1
 neighbor IBGP-POL1 next-hop-self
 neighbor 2.4.0.4 remote-as 40
 neighbor 10.3.3.3 peer-group IBGP-POL1
R2#sh run | i synch  
 synchronization
 logging synchronous
 logging synchronous
R2#
R3#sh run | sec bgp
router bgp 10
 synchronization
 bgp log-neighbor-changes
 network 1.3.0.0 mask 255.255.0.0
 neighbor IBGP-POL1 peer-group
 neighbor IBGP-POL1 remote-as 10
 neighbor IBGP-POL1 update-source Loopback1
 neighbor IBGP-POL1 next-hop-self
 neighbor 3.5.0.5 remote-as 50
 neighbor 10.2.2.2 peer-group IBGP-POL1
R3#sh run | i synch
 synchronization
 logging synchronous
 logging synchronous
R3#
 synchronization

line found.

clear ip bgp *

Now.

R2#sh ip bgp   
BGP table version is 3, local router ID is 10.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.2.0.0/16       0.0.0.0                  0         32768 i
 * i 1.3.0.0/16       10.3.3.3                 0    100      0 i
 *>  4.0.0.0/16       2.4.0.4                  0             0 40 i
 * i 5.0.0.0/16       10.3.3.3                 0    100      0 50 i
R2#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      4.0.0.0/16 is subnetted, 1 subnets
B        4.0.0.0 [20/0] via 2.4.0.4, 00:01:46
R3#sh ip bgp   
BGP table version is 3, local router ID is 10.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 * i 1.2.0.0/16       10.2.2.2                 0    100      0 i
 *>  1.3.0.0/16       0.0.0.0                  0         32768 i
 * i 4.0.0.0/16       10.2.2.2                 0    100      0 40 i
 *>  5.0.0.0/16       3.5.0.5                  0             0 50 i
R3#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      5.0.0.0/16 is subnetted, 1 subnets
B        5.0.0.0 [20/0] via 3.5.0.5, 00:01:49
R4#sh ip bgp
BGP table version is 3, local router ID is 4.0.0.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.2.0.0/16       2.4.0.2                  0             0 10 i
 *>  4.0.0.0/16       0.0.0.0                  0         32768 i
R4#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/16 is subnetted, 1 subnets
B        1.2.0.0 [20/0] via 2.4.0.2, 00:01:46
R5#sh ip bgp
BGP table version is 3, local router ID is 5.0.0.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.3.0.0/16       3.5.0.3                  0             0 10 i
 *>  5.0.0.0/16       0.0.0.0                  0         32768 i
R5#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/16 is subnetted, 1 subnets
B        1.3.0.0 [20/0] via 3.5.0.3, 00:01:49

Now, synchronization enabled, another AS route not installed via transit AS.

because AS 10 Internally cannot route another BGP routes.

OK, Let's configure IBGP full mesh in this example. (partially duplicated configuration)

  • R1
conf t
!
router bgp 10
neighbor IBGP-POL1 peer-group
neighbor IBGP-POL1 remote-as 10
neighbor IBGP-POL1 update-source Lo1
neighbor 10.2.2.2 peer-group IBGP-POL1
neighbor 10.3.3.3 peer-group IBGP-POL1
exit
!
end
  • R2
conf t
!
router bgp 10
neighbor IBGP-POL1 peer-group
neighbor IBGP-POL1 remote-as 10
neighbor IBGP-POL1 update-source Lo1
neighbor IBGP-POL1 next-hop-self
neighbor 10.1.1.1 peer-group IBGP-POL1
neighbor 10.3.3.3 peer-group IBGP-POL1
exit
!
end
  • R3
conf t
!
router bgp 10
neighbor IBGP-POL1 peer-group
neighbor IBGP-POL1 remote-as 10
neighbor IBGP-POL1 update-source Lo1
neighbor IBGP-POL1 next-hop-self
neighbor 10.1.1.1 peer-group IBGP-POL1
neighbor 10.2.2.2 peer-group IBGP-POL1
exit
!
end
  • R1 - R3
clear ip bgp *
sh run | i synchronization
R3#sh ip bgp
BGP table version is 3, local router ID is 10.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 * i 1.2.0.0/16       10.2.2.2                 0    100      0 i
 *>  1.3.0.0/16       0.0.0.0                  0         32768 i
 * i 4.0.0.0/16       10.2.2.2                 0    100      0 40 i
 *>  5.0.0.0/16       3.5.0.5                  0             0 50 i
R5#sh ip bgp
BGP table version is 11, local router ID is 5.0.0.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.3.0.0/16       3.5.0.3                  0             0 10 i
 *>  5.0.0.0/16       0.0.0.0                  0         32768 i

still not advertised to another AS…

hmmm

IBGP full mesh and synchronization principle enabled configuration not allowed.

because IBGP full mesh must be configured no synchronization.

synchronization principle applied case router should know route from IGP.

In this case, define static route.

  • R2
conf t
!
ip route 5.0.0.0 255.255.0.0 10.3.3.3
!
end
  • R3
conf t
!
ip route 4.0.0.0 255.255.0.0 10.2.2.2
!
end
R2#sh ip bgp
BGP table version is 7, local router ID is 10.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.2.0.0/16       0.0.0.0                  0         32768 i
 * i 1.3.0.0/16       10.3.3.3                 0    100      0 i
 *>  4.0.0.0/16       2.4.0.4                  0             0 40 i
 r>i 5.0.0.0/16       10.3.3.3                 0    100      0 50 i
R2#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      4.0.0.0/16 is subnetted, 1 subnets
B        4.0.0.0 [20/0] via 2.4.0.4, 00:16:11
R3#sh ip bgp
BGP table version is 7, local router ID is 10.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 * i 1.2.0.0/16       10.2.2.2                 0    100      0 i
 *>  1.3.0.0/16       0.0.0.0                  0         32768 i
 r>i 4.0.0.0/16       10.2.2.2                 0    100      0 40 i
 *>  5.0.0.0/16       3.5.0.5                  0             0 50 i
R3#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      5.0.0.0/16 is subnetted, 1 subnets
B        5.0.0.0 [20/0] via 3.5.0.5, 00:16:08
R4#sh ip bgp
BGP table version is 14, local router ID is 4.0.0.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.2.0.0/16       2.4.0.2                  0             0 10 i
 *>  4.0.0.0/16       0.0.0.0                  0         32768 i
 *>  5.0.0.0/16       2.4.0.2                                0 10 50 i
R4#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/16 is subnetted, 1 subnets
B        1.2.0.0 [20/0] via 2.4.0.2, 00:16:10
      5.0.0.0/16 is subnetted, 1 subnets
B        5.0.0.0 [20/0] via 2.4.0.2, 00:01:51
R5#sh ip bgp
BGP table version is 14, local router ID is 5.0.0.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.3.0.0/16       3.5.0.3                  0             0 10 i
 *>  4.0.0.0/16       3.5.0.3                                0 10 40 i
 *>  5.0.0.0/16       0.0.0.0                  0         32768 i
R5#sh ip ro bgp
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/16 is subnetted, 1 subnets
B        1.3.0.0 [20/0] via 3.5.0.3, 00:16:08
      4.0.0.0/16 is subnetted, 1 subnets
B        4.0.0.0 [20/0] via 3.5.0.3, 00:01:45

RIB Failure… but route over AS 10 learned.

IBGP AD is 200

Redistributed to BGP route AD is 200

Static route is 1

PC-5> ping 4.0.0.104
4.0.0.104 icmp_seq=1 timeout
4.0.0.104 icmp_seq=2 timeout
84 bytes from 4.0.0.104 icmp_seq=3 ttl=59 time=6.329 ms
84 bytes from 4.0.0.104 icmp_seq=4 ttl=59 time=9.024 ms
84 bytes from 4.0.0.104 icmp_seq=5 ttl=59 time=9.090 ms

PC-5> trace 4.0.0.104
trace to 4.0.0.104, 8 hops max, press Ctrl+C to stop
 1   5.0.0.5   2.857 ms  3.012 ms  1.858 ms
 2   3.5.0.3   4.066 ms  3.794 ms  3.400 ms
 3   10.1.3.1   4.936 ms  4.566 ms  4.813 ms
 4   10.1.2.2   7.147 ms  5.655 ms  6.073 ms
 5   2.4.0.4   8.109 ms  7.701 ms  6.965 ms
 6   *4.0.0.104   7.970 ms (ICMP type:3, code:3, Destination port unreachable)

Let's say route redistribute.

Cisco redistribute(ルート再配布)の設定 - その1

  • R2
conf t
!
no ip route 5.0.0.0 255.255.0.0 10.3.3.3
!
router ospf 1
redistribute bgp 10
exit
!
end
  • R3
conf t
!
no ip route 4.0.0.0 255.255.0.0 10.2.2.2
!
router ospf 1
redistribute bgp 10
exit
!
end

still RIB failure…

IBGP malformed next hop caused issue??

R3#sh ip ro    
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O E2     1.2.0.0/16 [110/1] via 10.1.3.1, 00:02:59, GigabitEthernet0/1
C        1.3.0.0/16 is directly connected, GigabitEthernet0/3
L        1.3.0.3/32 is directly connected, GigabitEthernet0/3
      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        3.5.0.0/24 is directly connected, GigabitEthernet0/2
L        3.5.0.3/32 is directly connected, GigabitEthernet0/2
      4.0.0.0/16 is subnetted, 1 subnets
O E2     4.0.0.0 [110/1] via 10.1.3.1, 00:02:52, GigabitEthernet0/1
      5.0.0.0/16 is subnetted, 1 subnets
B        5.0.0.0 [20/0] via 3.5.0.5, 00:39:46
      10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O        10.1.1.1/32 [110/2] via 10.1.3.1, 02:11:20, GigabitEthernet0/1
O        10.1.2.0/24 [110/2] via 10.1.3.1, 00:53:51, GigabitEthernet0/1
C        10.1.3.0/24 is directly connected, GigabitEthernet0/1
L        10.1.3.3/32 is directly connected, GigabitEthernet0/1
O        10.2.2.2/32 [110/3] via 10.1.3.1, 00:53:31, GigabitEthernet0/1
C        10.3.3.3/32 is directly connected, Loopback1
R3#sh ip bgp rib-failure
  Network            Next Hop                      RIB-failure   RIB-NH Matches
1.2.0.0/16         10.2.2.2            Higher admin distance              n/a
4.0.0.0/16         10.2.2.2            Higher admin distance              n/a

RIB Failures - iBGP and eBGP - 103774 - The Cisco Learning Network

oh god…

R1 still running BGP process….

  • R1
R1#sh run | sec bgp
router bgp 10
 bgp log-neighbor-changes
 neighbor IBGP-POL1 peer-group
 neighbor IBGP-POL1 remote-as 10
 neighbor IBGP-POL1 update-source Loopback1
 neighbor 10.2.2.2 peer-group IBGP-POL1
 neighbor 10.3.3.3 peer-group IBGP-POL1

kill it.

  • R1
conf t
!
no router bgp 10
!
end

????

R3#sh ip bgp rib-failure
  Network            Next Hop                      RIB-failure   RIB-NH Matches
1.2.0.0/16         10.2.2.2            Higher admin distance              n/a
4.0.0.0/16         10.2.2.2            Higher admin distance              n/a
R3#sh ip ro             
Codes: L - local, C - connected, S - static, 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 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O E2     1.2.0.0/16 [110/1] via 10.1.3.1, 00:17:46, GigabitEthernet0/1
C        1.3.0.0/16 is directly connected, GigabitEthernet0/3
L        1.3.0.3/32 is directly connected, GigabitEthernet0/3
      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        3.5.0.0/24 is directly connected, GigabitEthernet0/2
L        3.5.0.3/32 is directly connected, GigabitEthernet0/2
      4.0.0.0/16 is subnetted, 1 subnets
O E2     4.0.0.0 [110/1] via 10.1.3.1, 00:17:39, GigabitEthernet0/1
      5.0.0.0/16 is subnetted, 1 subnets
B        5.0.0.0 [20/0] via 3.5.0.5, 00:54:33
      10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O        10.1.1.1/32 [110/2] via 10.1.3.1, 02:26:07, GigabitEthernet0/1
O        10.1.2.0/24 [110/2] via 10.1.3.1, 01:08:38, GigabitEthernet0/1
C        10.1.3.0/24 is directly connected, GigabitEthernet0/1
L        10.1.3.3/32 is directly connected, GigabitEthernet0/1
O        10.2.2.2/32 [110/3] via 10.1.3.1, 01:08:18, GigabitEthernet0/1
C        10.3.3.3/32 is directly connected, Loopback1
R3#sh ip bgp
BGP table version is 23, local router ID is 10.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 r>i 1.2.0.0/16       10.2.2.2                 0    100      0 i
 *>  1.3.0.0/16       0.0.0.0                  0         32768 i
 r>i 4.0.0.0/16       10.2.2.2                 0    100      0 40 i
 *>  5.0.0.0/16       3.5.0.5                  0             0 50 i

BGP - show ip bgpコマンドの見方

RIB failure caused by lower AD route found case. But I can't identify this state is anti-pattern implementation…

References

tech/network/cisco/bgp/bgp/bgp-synchronization-principle/bgp-synchronization-principle.txt · Last modified: 2018/12/27 21:40 by wnoguchi