BGP Route Server Benefits and Example Configuration
- What is a BGP Route Server? ‹
- What is the difference between a Route Server and a Route Reflector? ‹
- How to configure a BGP Route Server? ‹
- Configuring Route Server context with import-map command ‹
- Download section ‹
What is a BGP Route Server?
A route server facilitates the exchange of eBGP routes between connected peers. This is especially useful in Internet Exchange (IX) locations where many network edge routers share a common peering LAN segment. By establishing an eBGP session only with the route server, each peering customer can receive prefixes while reducing the number of BGP neighborships between peers.
What is the difference between a Route Server and a Route Reflector?
| Route Server | Route Reflector |
|---|---|
| Defined in RFC 7947. Facilitates eBGP peering by reducing number of BGP neighborships in Internet Exchange. Works between Autonomous Systems. | Defined in RFC 4456. Facilitates iBGP scalability by overriding full-mesh requirement. Works within a single local Autonomous System, except when used for MPLS Inter-AS option C. |
| Advertises unmodified AS-Path and BGP Next-Hop IP address, this is called attribute transparency.
Peers have no bgp enforce-first-as command configured under BGP routing process, to ignore verifying Route Server AS number in AS-Path attribute. |
Adds RR attributes Originator ID, and Cluster List. Uses the Route Reflector rule to influence route advertisement. |
| Works out-of-band as a BGP control-plane function. Does not participate in data forwarding. | Mostly works out-of-band as a BGP control-plane, however can also work as an inline Route Reflector (for example Unified MPLS). |
| Is not likely to cause suboptimal routing unless misconfigured. | By default selects and advertises a single best path (also called path hiding) which can lead to suboptimal routing. |
How to configure a BGP Route Server?
In the following scenario, an example Internet Exchange is configured with four peering customers. Instead of configuring BGP neighborships between each customer connected to the Peering LAN, the central Route Server is used to distribute BGP routes. This means, each customer only needs to configure a single eBGP neighborship with the Route Server to receive all peering customer routes.
Configuration:
RServer
RServer#show run | sec ^router router bgp 65100 bgp router-id 10.100.100.100 bgp log-neighbor-changes neighbor 10.0.0.1 remote-as 65001 neighbor 10.0.0.2 remote-as 65002 neighbor 10.0.0.3 remote-as 65003 neighbor 10.0.0.4 remote-as 65004 ! address-family ipv4 neighbor 10.0.0.1 activate neighbor 10.0.0.1 route-server-client neighbor 10.0.0.2 activate neighbor 10.0.0.2 route-server-client neighbor 10.0.0.3 activate neighbor 10.0.0.3 route-server-client neighbor 10.0.0.4 activate neighbor 10.0.0.4 route-server-client exit-address-family RServer#show run int Gi0/0 | sec int interface GigabitEthernet0/0 ip address 10.0.0.100 255.255.255.0 duplex auto speed auto media-type rj45
R1
R1#show run | sec ^router router bgp 65001 bgp router-id 1.1.1.1 no bgp enforce-first-as bgp log-neighbor-changes neighbor 10.0.0.100 remote-as 65100 ! address-family ipv4 network 192.168.1.0 neighbor 10.0.0.100 activate exit-address-family R1#show run int Gi0/0 | sec int interface GigabitEthernet0/0 ip address 10.0.0.1 255.255.255.0 duplex auto speed auto media-type rj45 R1#show run int Lo10 | sec int interface Loopback10 ip address 192.168.1.1 255.255.255.0
R2
R2#show run | sec ^router router bgp 65002 bgp router-id 2.2.2.2 no bgp enforce-first-as bgp log-neighbor-changes neighbor 10.0.0.100 remote-as 65100 ! address-family ipv4 network 192.168.2.0 neighbor 10.0.0.100 activate exit-address-family R2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 ip address 10.0.0.2 255.255.255.0 duplex auto speed auto media-type rj45 R2#show run int Lo10 | sec int interface Loopback10 ip address 192.168.2.1 255.255.255.0
R1#show ip bgp all sum | beg Ne Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.0.100 4 65100 35 33 11 0 0 00:24:51 3 « Three prefixes received from BGP Route Server R1#show ip bgp | beg Ne Network Next Hop Metric LocPrf Weight Path *> 192.168.1.0 0.0.0.0 0 32768 i *> 192.168.2.0 10.0.0.2 0 0 65002 i « Route Server does not add its own AS number *> 192.168.3.0 10.0.0.3 0 0 65003 i *> 192.168.4.0 10.0.0.4 0 0 65004 i R1#show ip bgp 192.168.2.0 BGP routing table entry for 192.168.2.0/24, version 9 Paths: (1 available, best #1, table default) Not advertised to any peer Refresh Epoch 1 65002 10.0.0.2 from 10.0.0.100 (10.100.100.100) Origin IGP, metric 0, localpref 100, valid, external, best « Even though eBGP neighborship, the AS of the Route Server is not added rx pathid: 0, tx pathid: 0x0
Configuring Route Server context with import-map command
In the following example scenario a Route Server context is configured to advertise only particular routes to Customer 1 router R1. Namely, the Route Server only advertises prefixes that have the BGP community attribute 65100:1 attached. As a result, R1 only receives routes from Customer 2 and Customer 4.
Configuration:
RServer
RServer#show run | sec ^router router bgp 65100 route-server-context EXAMPLE-CONTEXT ! address-family ipv4 unicast import-map RM-ROUTE-SERVER exit-address-family exit-route-server-context ! bgp router-id 10.100.100.100 bgp log-neighbor-changes neighbor 10.0.0.1 remote-as 65001 neighbor 10.0.0.2 remote-as 65002 neighbor 10.0.0.3 remote-as 65003 neighbor 10.0.0.4 remote-as 65004 ! address-family ipv4 neighbor 10.0.0.1 activate neighbor 10.0.0.1 route-server-client context EXAMPLE-CONTEXT neighbor 10.0.0.2 activate neighbor 10.0.0.2 route-server-client neighbor 10.0.0.3 activate neighbor 10.0.0.3 route-server-client neighbor 10.0.0.4 activate neighbor 10.0.0.4 route-server-client exit-address-family RServer#show run | sec ^route-map route-map RM-ROUTE-SERVER permit 10 match community CL-ROUTE-SERVER RServer#show run | sec ^ip community ip community-list standard CL-ROUTE-SERVER permit 65100:1 RServer#show run | sec ^ip bgp ip bgp-community new-format RServer#show run int Gi0/0 | sec int interface GigabitEthernet0/0 ip address 10.0.0.100 255.255.255.0 duplex auto speed auto
R1
R1#show run | sec ^router router bgp 65001 bgp router-id 1.1.1.1 no bgp enforce-first-as bgp log-neighbor-changes neighbor 10.0.0.100 remote-as 65100 ! address-family ipv4 network 192.168.1.0 neighbor 10.0.0.100 activate exit-address-family R1#show run int Gi0/0 | sec int interface GigabitEthernet0/0 ip address 10.0.0.1 255.255.255.0 duplex auto speed auto media-type rj45 R1#show run int Lo10 | sec int interface Loopback10 ip address 192.168.1.1 255.255.255.0
R2
R2#show run | sec ^router router bgp 65002 bgp router-id 2.2.2.2 no bgp enforce-first-as bgp log-neighbor-changes neighbor 10.0.0.100 remote-as 65100 ! address-family ipv4 network 192.168.2.0 neighbor 10.0.0.100 activate neighbor 10.0.0.100 send-community neighbor 10.0.0.100 route-map RM-ASSIGN-COMMUNITY out exit-address-family R2#show run | sec ^route-map route-map RM-ASSIGN-COMMUNITY permit 10 set community 65100:1 R2#show run | sec ^ip bgp ip bgp-community new-format R2#show run int Gi0/0 | sec int interface GigabitEthernet0/0 ip address 10.0.0.2 255.255.255.0 duplex auto speed auto media-type rj45 R2#show run int Lo10 | sec int interface Loopback10 ip address 192.168.2.1 255.255.255.0
RServer#show ip bgp 192.168.2.0 BGP routing table entry for 192.168.2.0/24, version 13 Paths: (1 available, best #1, table default) Advertised to update-groups: 8 9 Refresh Epoch 1 65002 10.0.0.2 from 10.0.0.2 (2.2.2.2) Origin IGP, metric 0, localpref 100, valid, external, best Community: 65100:1 « Customer 2 prefix has BGP community 65100:1 assigned rx pathid: 0, tx pathid: 0x0 RServer#show ip bgp community 65100:1 « Output of this show command displays prefixes which have BGP community 65100:1 assigned BGP table version is 13, local router ID is 10.100.100.100 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, t secondary path, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 192.168.2.0 10.0.0.2 0 0 65002 i *> 192.168.4.0 10.0.0.4 0 0 65004 i RServer#show ip bgp | beg Ne Network Next Hop Metric LocPrf Weight Path *> 192.168.1.0 10.0.0.1 0 0 65001 i *> 192.168.2.0 10.0.0.2 0 0 65002 i *> 192.168.3.0 10.0.0.3 0 0 65003 i « Prefix from Customer 3 does not have community 65100:1 assigned *> 192.168.4.0 10.0.0.4 0 0 65004 i R1#show ip bgp | beg Ne Network Next Hop Metric LocPrf Weight Path *> 192.168.1.0 0.0.0.0 0 32768 i *> 192.168.2.0 10.0.0.2 0 0 65002 i *> 192.168.4.0 10.0.0.4 0 0 65004 i
As visible in the above output from R1, it only receives the prefixes from the Route Server that have the BGP community 65100:1 assigned. The prefix originating from Customer 3 has no BGP community assigned, and therefore it is not advertise by the Route Server to R1.