Thursday, April 9, 2015

BGP Route Reflection (pt. 2)

Building on the configuration of the previous post, here I will add non-client routers and show how the network handles the routes advertised to and from the cluster.

Below is the topology with the new iBGP non-client peers R5 and R6 added to AS 100.
Route Reflection Cluster w/ iBGP non-clients topology
Starting with the configuration of R5 as a non-client. The configuration on R1 is pretty straight forward; assuming the IP interface is up/up, the configuration is simply to add R5 in BGP with the command neighbor 10.0.15.5 remote-as 100 under the BGP process. Below is routing configuration done on R5.
R5#show run | section router bgp
router bgp 100
 bgp log-neighbor-changes
 network 172.16.5.0 mask 255.255.255.0
 neighbor 10.0.15.1 remote-as 100
R5#show run | section router eigrp
router eigrp 100
 network 10.0.0.0
And below is R5s routing table and BGP table after convergence has occurred.
R5#show ip route | begin Gateway
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D        10.0.12.0/24 [90/3072] via 10.0.15.1, 00:02:00, GigabitEthernet1.15
D        10.0.13.0/24 [90/3072] via 10.0.15.1, 00:02:00, GigabitEthernet1.15
D        10.0.14.0/24 [90/3072] via 10.0.15.1, 00:02:00, GigabitEthernet1.15
C        10.0.15.0/24 is directly connected, GigabitEthernet1.15
L        10.0.15.5/32 is directly connected, GigabitEthernet1.15
      172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
B        172.16.2.0/24 [200/0] via 10.0.12.2, 00:01:39
B        172.16.3.0/24 [200/0] via 10.0.13.3, 00:01:39
B        172.16.4.0/24 [200/0] via 10.0.14.4, 00:01:39
C        172.16.5.0/24 is directly connected, Loopback1
L        172.16.5.1/32 is directly connected, Loopback1
R5#show ip bgp
BGP table version is 5, local router ID is 172.16.5.1
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 172.16.2.0/24    10.0.12.2                0    100      0 i
 *>i 172.16.3.0/24    10.0.13.3                0    100      0 i
 *>i 172.16.4.0/24    10.0.14.4                0    100      0 i
 *>  172.16.5.0/24    0.0.0.0                  0         32768 i
So, BGP shows routes as valid and best and therefore installs the routes into the routing table. A simple ping test will reveal if the route reflection clients are indeed reachable.
R5#ping 172.16.2.1 source loopback 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:
Packet sent with a source address of 172.16.5.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
R5#ping 172.16.3.1 source loopback 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.1, timeout is 2 seconds:
Packet sent with a source address of 172.16.5.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
R5#ping 172.16.4.1 source loopback 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.4.1, timeout is 2 seconds:
Packet sent with a source address of 172.16.5.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms 
And indeed they are. So, router R5 is receiving iBGP advertisements from the route reflector (R1), which is relaying iBGP routes - which goes against the normal iBGP loop prevention mechanism. And since the there is reachability to and from the BGP advertised networks, we can safely assume that the route reflector is reflecting the non-client routes to its clients R2, R3 and R4.

Now we move on to adding router R6, which is also a non-client, to the network. This router is connecting to R2, which is a route reflection client.

The method is pretty much the same as with R5 - configure IP interfaces, enable IGP on 10.0.0.0 /8 network and configure the BGP neighbor peering between R2 and R6.

This is the resulting routing table and BGP table on R6 after convergence.
R6#show ip route | begin Gateway
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
D        10.0.12.0/24 [90/3072] via 10.0.26.2, 00:23:52, GigabitEthernet1.26
D        10.0.13.0/24 [90/3328] via 10.0.26.2, 00:23:52, GigabitEthernet1.26
D        10.0.14.0/24 [90/3328] via 10.0.26.2, 00:23:52, GigabitEthernet1.26
D        10.0.15.0/24 [90/3328] via 10.0.26.2, 00:23:52, GigabitEthernet1.26
C        10.0.26.0/24 is directly connected, GigabitEthernet1.26
L        10.0.26.6/32 is directly connected, GigabitEthernet1.26
      172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
B        172.16.2.0/24 [200/0] via 10.0.26.2, 00:22:19
C        172.16.6.0/24 is directly connected, Loopback1
L        172.16.6.1/32 is directly connected, Loopback1
R6#show ip bgp
BGP table version is 3, local router ID is 172.16.6.1
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 172.16.2.0/24    10.0.26.2                0    100      0 i
 *>  172.16.6.0/24    0.0.0.0                  0         32768 i
There is a distinct lack of prefixes in the BGP table, but EIGRP does seem to work properly; giving us IGP reachability to the link networks of all the iBGP routers in the network.

The problem here is that there is no configuration done on R2 to make it a route reflection client and it therefore cannot do anything else with the iBGP connection to R6, than treat as a regular iBGP peer - and not advertise the route to any other iBGP peer, including the route reflector (R1).

One way to fix this problem would be to create a neighbor relationship between R6 and all the other iBGP routers in the network - the EIGRP routes would allow for the establishment of the BGP peering without an issue. However, we just set up a route reflector to avoid having to this kind of configuration. What we can do to fix the problem is quite easy - just make R2 a route reflector with R6 as its route reflection client.
R2#configure terminal
R2(config)#router bgp 100
R2(config-router)#neighbor 10.0.26.6 route-reflector-client
*Apr  9 13:39:43.239: %BGP-5-ADJCHANGE: neighbor 10.0.26.6 Down RR client config change
*Apr  9 13:39:43.239: %BGP_SESSION-5-ADJCHANGE: neighbor 10.0.26.6 IPv4 Unicast topology base removed from session  RR client config change
*Apr  9 13:39:43.412: %BGP-5-ADJCHANGE: neighbor 10.0.26.6 Up
Now we have configured a nested route reflector - a route reflector that is itself a route reflection client. Lets have look at the routing table on R6 after the network has converged again.
R6#show ip route | begin Gateway
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
D        10.0.12.0/24 [90/3072] via 10.0.26.2, 00:33:47, GigabitEthernet1.26
D        10.0.13.0/24 [90/3328] via 10.0.26.2, 00:33:47, GigabitEthernet1.26
D        10.0.14.0/24 [90/3328] via 10.0.26.2, 00:33:47, GigabitEthernet1.26
D        10.0.15.0/24 [90/3328] via 10.0.26.2, 00:33:47, GigabitEthernet1.26
C        10.0.26.0/24 is directly connected, GigabitEthernet1.26
L        10.0.26.6/32 is directly connected, GigabitEthernet1.26
      172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
B        172.16.2.0/24 [200/0] via 10.0.26.2, 00:03:06
B        172.16.3.0/24 [200/0] via 10.0.13.3, 00:03:06
B        172.16.4.0/24 [200/0] via 10.0.14.4, 00:03:06
B        172.16.5.0/24 [200/0] via 10.0.15.5, 00:03:06
C        172.16.6.0/24 is directly connected, Loopback1
L        172.16.6.1/32 is directly connected, Loopback1
R6#show ip bgp
BGP table version is 8, local router ID is 172.16.6.1
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 172.16.2.0/24    10.0.26.2                0    100      0 i
 *>i 172.16.3.0/24    10.0.13.3                0    100      0 i
 *>i 172.16.4.0/24    10.0.14.4                0    100      0 i
 *>i 172.16.5.0/24    10.0.15.5                0    100      0 i
 *>  172.16.6.0/24    0.0.0.0                  0         32768 i
All the BGP entries are there and they are populated into the routing table. The network topology now looks like this.
Route Reflection Cluster w/ non-client and nested RR cluster
Next post will be about adding eBGP peers to the network.

No comments:

Post a Comment