Propagate iBGP discovered routes to route server clients
I have the following topology: 2 different networks (10.22.0.0/24, 10.66.0.0/24) that each contain:
- 3 route reflectors with addresses (lets say 10.22.0.6, 10.22.11.69, 10.22.0.133)
- Dynamic number of route reflector clients (addresses inside 10.22.0.0/24 range).
- Each of the clients advertises routes for containers that run run on an overlay network (10.2.0.0/16 and 10.4.0.0/16 respectively for the 2 networks)
- Each RR and its clients inside the same network have the same AS (64512 and 64513 respectively for the 2 networks)
- I am using gobgp
v2.0.0everywhere (in other words I have 2 kubernetes clusters configured to use gobgp instances as route reflectors) Routes for the containers are propagated nicely inside the same network.
Since those networks are reachable from one another I want to be able to advertise routes cross network. So in theory all I want is my 3 RRs from one side to become eBGP peers with the 3 RRs from the other network. Because the instances that run gobgp are not capable of routing traffic and since hosts inside one network can reach the ones on the other I want the RRs to have route server relationship between them. The only way I was able to do the above was by setting my dynamic cluster neighbors to be both route-reflectors and route servers. In particular I have the following configuration in one of my RRs:
[global.config]
as = 64513
router-id = "10.22.22.6"
[[peer-groups]]
[peer-groups.config]
peer-group-name = "k8s-bgp-clients"
peer-as = 64513
[peer-groups.route-reflector.config]
route-reflector-client = true
route-reflector-cluster-id = "10.22.22.6"
[peer-groups.route-server.config]
route-server-client = true
[[dynamic-neighbors]]
[dynamic-neighbors.config]
prefix = "10.22.22.0/24"
peer-group = "k8s-bgp-clients"
[[peer-groups]]
[peer-groups.config]
peer-group-name = "aws-bgp-clients"
peer-as = 64512
[peer-groups.timers.config]
connect-retry = 5
[peer-groups.route-server.config]
route-server-client = true
[[neighbors]]
[neighbors.config]
neighbor-address = "10.66.23.6"
peer-group = "aws-bgp-clients"
[neighbors.ebgp-multihop.config]
enabled = true
[[neighbors]]
[neighbors.config]
neighbor-address = "10.66.23.69"
peer-group = "aws-bgp-clients"
[neighbors.ebgp-multihop.config]
enabled = true
[[neighbors]]
[neighbors.config]
neighbor-address = "10.66.23.133"
peer-group = "aws-bgp-clients"
[neighbors.ebgp-multihop.config]
enabled = true
Plus some policies that I omitted for brevity. And with that I see that my dynamic iBGP neighbors are considered route reflector clients:
gobgp neighbor 10.22.22.11
BGP neighbor is 10.22.22.11, remote AS 64513, route-reflector-client
BGP version 4, remote router ID 10.22.22.11
BGP state = ESTABLISHED, up for 00:28:21
BGP OutQ = 0, Flops = 0
Hold time is 90, keepalive interval is 30 seconds
Configured hold time is 90, keepalive interval is 30 seconds
while the RRs from the other clusters are considered route server clients:
gobgp neighbor 10.66.23.6
BGP neighbor is 10.66.23.6, remote AS 64512, route-server-client
BGP version 4, remote router ID 10.66.23.6
BGP state = ESTABLISHED, up for 00:28:17
BGP OutQ = 0, Flops = 0
Hold time is 90, keepalive interval is 30 seconds
That way I have a local rib for each one of my neighbors and everything seems to work, but the solution feels a bit "hacky" as I have to set peers to be both route-reflector-clients and route-server-clients on the same time. Is there a proposed way to achieve what I am describing with gobgp.