Categories R&S

BGP – implement and troubleshoot Peerings – iBGP Peerings

It’s now time to move to BGP.

We will build our BGP topology step by step and look at all the features that can be used with BGP.

 

Theory:

In order to establish BGP peering we must already have an IGP.

 

Requirements:

Establish a full mesh BGP peering between all the devices.

Advertise loopbacks into BGP.

 

Diagram:

This is our diagram to start with BGP.

All the IP addresses have been configured and OSPF is running has our IGP.

iBGP Peerings

 

Configuration and verification:

 

This is the configuration we have on R1, we have on line per neighbor:

router bgp 100
neighbor 10.100.10.2 remote-as 100
 neighbor 10.100.10.18 remote-as 100
 neighbor 10.100.10.34 remote-as 100
 neighbor 10.100.10.50 remote-as 100
 neighbor 10.100.10.66 remote-as 100

We do the same on all the devices and we can see we have now five BGP peers:

R1#sh ip bgp sum
BGP router identifier 10.100.1.1, local AS number 100
BGP table version is 7, main routing table version 7
6 network entries using 840 bytes of memory
6 path entries using 480 bytes of memory
2/2 BGP path/bestpath attribute entries using 288 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1608 total bytes of memory
BGP activity 6/0 prefixes, 6/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.100.10.2     4          100      14      14        7    0    0 00:09:54        1
10.100.10.18    4          100       6       8        7    0    0 00:01:13        1
10.100.10.34    4          100       7       8        7    0    0 00:00:57        1
10.100.10.50    4          100      12      12        7    0    0 00:08:23        1
10.100.10.66    4          100      12      11        7    0    0 00:08:11        1

 

To advertise our loopback into BGP, we will use the redistribute command under the BGP process, I’m using a route-map to match the loopback interface so I’m sure I’m not redistributing anything else.

route-map LOOPBACK permit 10
 match interface Loopback0

router bgp 100
redistribute connected route-map LOOPBACK

 

Let’s make sure we get the loopbacks properly advertise.

On R4, we can see some BGP routes into the routing table:

R4#sh ip route bgp
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
B        10.100.1.1/32 [200/0] via 10.100.10.1, 00:06:19
B        10.100.1.2/32 [200/0] via 10.100.10.33, 00:06:16
B        10.100.1.3/32 [200/0] via 10.100.10.18, 00:06:26
B        10.100.1.5/32 [200/0] via 10.100.10.50, 00:06:05
B        10.100.1.6/32 [200/0] via 10.100.10.66, 00:05:36

 

The “show ip bgp” command let us see the bgp prefixes learned with their next hop.

R4#sh ip bgp
BGP table version is 7, local router ID is 10.100.1.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
 *>i 10.100.1.1/32    10.100.10.1              0    100      0 ?
 *>i 10.100.1.2/32    10.100.10.33             0    100      0 ?
 *>i 10.100.1.3/32    10.100.10.18             0    100      0 ?
 *>  10.100.1.4/32    0.0.0.0                  0         32768 ?
 *>i 10.100.1.5/32    10.100.10.50             0    100      0 ?
 *>i 10.100.1.6/32    10.100.10.66             0    100      0 ?

 

Note that an iBGP learned route cannot be advertised to another iBGP neighbor.

If we break the peering between R4 and R5, R4 will not learn R5 loopback from another of his BGP peer.

This is a rule for iBGP to prevent loop.

R4(config)#router bgp 100
R4(config-router)#neighbor 10.100.10.50 remote-as 100 shutdown
R4(config-router)#
*Jun 30 20:29:35.406: %BGP-5-NBR_RESET: Neighbor 10.100.10.50 reset (Admin. shutdown)
*Jun 30 20:29:35.416: %BGP-5-ADJCHANGE: neighbor 10.100.10.50 Down Admin. shutdown

 

We are now missing the route to R5 loopback.

R4#sh ip route bgp

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 11 subnets, 2 masks
B        10.100.1.1/32 [200/0] via 10.100.10.1, 00:12:45
B        10.100.1.2/32 [200/0] via 10.100.10.33, 00:12:42
B        10.100.1.3/32 [200/0] via 10.100.10.18, 00:12:52
B        10.100.1.6/32 [200/0] via 10.100.10.66, 00:12:02

 

That’s all for iBGP peerings.

 

Thank you for reading.

 

 

BGP – implement and troubleshoot Peerings – iBGP Peerings