BGP Route Server Setup Guide
BGP Route Server Setup Guide
BGP route server is a feature designed for internet exchange (IX) operators that provides an alternative to full
eBGP mesh peering among the service providers who have a presence at the IX. The route server provides
eBGP route reflection with customized policy support for each service provider. That is, a route server context
can override the normal BGP best path for a prefix with a different path based on a policy, or suppress all
paths for a prefix and not advertise the prefix. The BGP route server provides reduced configuration complexity
and reduced CPU and memory requirements on each border router. The route server also reduces overhead
expense incurred by individualized peering agreements.
• Finding Feature Information, on page 1
• Information About BGP Route Server, on page 1
• How to Configure a BGP Route Server, on page 7
• Configuration Examples for BGP Route Server, on page 14
• Additional References, on page 17
• Feature Information for BGP Route Server, on page 18
Although each SP’s border router is attached to the shared subnet, BGP sessions between each of the SPs
must still be configured and maintained individually, for every other SP with which a given SP wants to
establish a peering relationship.
Assuming that each SP wants to connect to every other SP, the resulting full mesh of BGP sessions established
is shown in the figure below.
Just as the required iBGP full mesh in an autonomous system presents a scaling and administrative challenge
within an SP network, the eBGP full mesh required for peering at an IX presents a challenge for eBGP, for
these reasons:
• The full mesh of direct peering sessions requires a BGP session to be configured and maintained for each
connection.
• There is additional operational overhead from contracts that would need to be negotiated with each SP
peer connecting to a given provider at the IX.
Because larger global SPs might have a presence at dozens or hundreds of internet exchanges worldwide, and
dozens or hundreds of potential peers at each IX, it would be a huge operational expense to connect to all of
the small providers. Consequently, the state of peering prior to the BGP Route Server feature is that a large
global SP connects to only a subset of other large providers to limit the management and operational overhead.
A more scalable alternative to direct peering would allow large global SPs to connect to more small providers.
Instead of maintaining individual, direct eBGP peerings with every other provider, an SP maintains only a
single connection to the route server operated by the IX. Peering with only the route server reduces the
configuration complexity on each border router, reduces CPU and memory requirements on the border routers,
and avoids most of the operational overhead incurred by individualized peering agreements.
The route server provides AS-path, MED, and nexthop transparency so that peering SPs at the IX still appear
to be directly connected. In reality, the IX route server mediates this peering, but that relationship is invisible
outside of the IX.
The figure below illustrates an example of transparent route propagation with a route server at an IX.
In the figure above, a routing update goes from AS 1 to AS 2 to AS 100. The update leaves the router in AS
100 advertising that the router can reach the prefix 10.9.9.0/24, use 10.0.0.1 as the next hop, and use the AS
path of AS100, AS2, AS1.
The router in AS 900 is a route server and the router in AS 500 is a route server client. A route server client
receives updates from a route server. As shown in the figure above, the router in AS 900 does not change the
update; route server updates are transparent in terms of MED, next hop and AS-path. The update goes to the
client with the same prefix, next hop and AS-path that came from the router at 10.0.0.1.
1. As shown in the figure above beginning at the left, when incoming eBGP updates arrive from a route
server client, the system will apply inbound route filters for a route server client the same way it does for
a non-route-server client (configured with the neighbor route-map in command). All routes permitted
by the client’s inbound filtering are installed in the global BGP table for the appropriate address family,
as usual, and anything else is dropped.
2. If any route server contexts have been configured with flexible policy using the import-map command,
the best path from among the subset of matching routes is imported into the virtual table for the contexts.
Route server clients associated with a context will then override any routes from the global BGP table
with customized routes from the context’s virtual table when generating updates.
3. A route server client’s outbound filtering policies (configured with the neighbor route-map out command)
will be applied to the global updates that do not have customized policy, and the outbound filtering policies
are also applied to any updates generated from the route server context’s virtual table.
Note This task does not enable flexible policy handling. To enable flexible policy handling, see the Configure a
Route Server with Flexible Policy Handling, on page 10.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. neighbor {ipv4-address| ipv6-address} remote-as remote-as-number
5. address-family {ipv4 | ipv6} { unicast | multicast}
6. neighbor {ipv4-address| ipv6-address} activate
7. neighbor {ipv4-address| ipv6-address} route-server-client
8. end
DETAILED STEPS
Router> enable
Step 4 neighbor {ipv4-address| ipv6-address} remote-as Adds an entry to the BGP neighbor table.
remote-as-number
Example:
Step 5 address-family {ipv4 | ipv6} { unicast | multicast} Enters address family configuration mode to configure a
routing session using IPv4 or IPv6 unicast or multicast
Example:
address prefixes.
Router(config-router)# address-family ipv4 unicast
Step 6 neighbor {ipv4-address| ipv6-address} activate Enables the exchange of information with a BGP neighbor.
Example:
Step 7 neighbor {ipv4-address| ipv6-address} route-server-client Configures the BGP neighbor at the specified address to be
a route server client.
Example:
Router(config-router-af)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. no bgp enforce-first-as
5. neighbor {ipv4-address| ipv6-address} remote-as remote-as-number
6. address-family {ipv4 | ipv6} { unicast | multicast}
7. neighbor {ipv4-address| ipv6-address} activate
8. exit-address-family
DETAILED STEPS
Router> enable
Step 4 no bgp enforce-first-as Disables requirement that an update received from an eBGP
peer list its AS number at the beginning of the AS_PATH.
Example:
• By default, a router is configured to deny an update
Router(config-router)# no bgp enforce-first-as received from an external BGP (eBGP) peer that does
not list its autonomous system number at the beginning
of the AS_PATH in the incoming update.
• In order to receive updates from the route server, which
will not have its AS first in the AS_PATH, specify no
bgp enforce-first-asto disable the enforcement.
Step 5 neighbor {ipv4-address| ipv6-address} remote-as Adds an entry to the BGP neighbor table.
remote-as-number
Example:
Step 6 address-family {ipv4 | ipv6} { unicast | multicast} Enters address family configuration mode to configure a
routing session using IPv4 or IPv6 unicast or multicast
Example:
address prefixes.
Router(config-router)# address-family ipv4 unicast
Step 7 neighbor {ipv4-address| ipv6-address} activate Enables the exchange of information with a BGP neighbor.
Example:
Router(config-router-af)# exit-address-family
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. route-server-context context-name
5. description string
6. address-family {ipv4 | ipv6} { unicast | multicast}
7. import-map route-map-name
8. exit-address-family
9. exit-route-server-context
10. exit
11. ip as-path access-list access-list-number {permit| deny} regexp
12. route-map route-map-name [permit | deny] sequence-number
13. match as-path access-list-number
14. exit
15. router bgp autonomous-system-number
16. neighbor {ipv4-address| ipv6-address} remote-as remote-as-number
17. address-family {ipv4 | ipv6} { unicast | multicast}
18. neighbor {ipv4-address| ipv6-address} activate
19. neighbor {ipv4-address| ipv6-address} route-server-client context ctx-name
20. end
DETAILED STEPS
Router> enable
Step 6 address-family {ipv4 | ipv6} { unicast | multicast} Enters address family configuration mode to configure a
routing session using IPv4 or IPv6 unicast or multicast
Example:
address prefixes.
Router(config-router-rsctx)# address-family ipv4
unicast
Step 7 import-map route-map-name Configures flexible policy handling by using the route map
that you will create in Step 12 to control which routes will
Example:
be added to the route server client virtual table.
Router(config-router-rsctx-af)# import-map
only_AS27_routemap
Router(config-router-rsctx-af)#
exit-address-family
Router(config-router-rsctx)#
exit-route-server-context
Router(config-router)# exit
Step 11 ip as-path access-list access-list-number {permit| Configures an AS path filter using a regular expression.
deny} regexp
• The ip as-path command is not necessarily the
Example: command you have to use. Determine what policy
you want to create.
Router(config)# ip as-path access-list 5 permit
27
Step 12 route-map route-map-name [permit | deny] Defines whether AS paths that match the subsequent match
sequence-number as-pathcommand will be permitted or denied in the route
map.
Example:
• Use the same route-map-name that you specified in
Router(config)# route-map only_AS27_routemap the import-map command above.
permit 10
Step 13 match as-path access-list-number Identifies an access list that determines which AS paths
are matched and become part of the route map configured
Example:
in the prior step.
Router(config-route-map)# match as-path 5 • This particular example references the
access-list-number configured in the ip as-path
access-list command.
• The match as-path command is not necessarily the
command you have to use. Determine what policy
you want to use.
• You may match on nexthop, AS path, communities,
and extended communities.
Router(config-route-map)# exit
Step 16 neighbor {ipv4-address| ipv6-address} remote-as Adds an entry to the BGP neighbor table.
remote-as-number
Example:
Step 18 neighbor {ipv4-address| ipv6-address} activate Enables the exchange of information with a BGP neighbor.
Example:
Step 19 neighbor {ipv4-address| ipv6-address} Configures the BGP neighbor at the specified address to
route-server-client context ctx-name be a route server client.
Example: • In this example, the route server client at this specified
address is assigned to the context called
Router(config-router-af)# neighbor 10.0.0.1 ONLY_AS27_CONTEXT.
route-server-client context ONLY_AS27_CONTEXT
Router(config-router-af)# end
SUMMARY STEPS
1. enable
2. show ip bgp {ipv4 | ipv6} unicast route-server {all | {context context-name}} [summary]
3. debug ip bgp route-server {client | context | event | import | policy} [detail]
DETAILED STEPS
Router> enable
Router#
Step 3 debug ip bgp route-server {client | context | event | Turns on debugging for BGP route server.
import | policy} [detail]
Caution The detail keyword is used for more complex
Example: issues and should only be turned on when
debugging with a Cisco representative.
Router# debug ip bgp route-server client
Example BGP Route Server Context for Flexible Policy (IPv4 Addressing)
In the following example, the local router is a BGP route server. Its neighbors at 10.10.10.12 and 10.10.10.13
are its route server clients. A route server context named ONLY_AS27_CONTEXT is created and applied to
the neighbor at 10.10.10.13. The context uses an import map that references a route map named
only_AS27_routemap. The route map matches routes permitted by access list 27. Access list 27 permits routes
that have 27 in the AS path.
Example Using Show Commands to See That Route Server Context Routes Overwrite Normal
Bestpath
In the following output, a BGP route server has two routes from AS 21 that have been selected as best:
For Peer12, which has been configured as a route-server client, but not associated with any context, the bestpath
is advertised in the following output. Note that AS-path, MED, and nexthop transparency have been maintained;
the routes look as if they had not passed through the route server.
Peer13 has also been configured as a route-server client, and it has been associated with a context named
ONLY_AS27_CONTEXT. The context references a route map that permits only routes that contain AS 27
in the AS path. This means that the route-server should not send any routes to Peer13 unless they contains
AS 27. In our scenario, the route server indeed sends the routes learned via AS 27, even though the routes
learned via AS 21 are marked as best. The output below demonstrates that the normal best path was overriden
by the best path based on policy. Again, MED, as-path, and nexthop transparency have been maintained.
Example BGP Route Server Context with No Routes Satisfying the Policy
It is possible that, due to policy, no routes are sent to a client even though paths exist. For instance, if we take
the prior example and change ONLY_AS27_CONTEXT to ONLY_AS100_CONTEXT, no paths would
satisfy this policy and no routes will be sent to the client. The following is the configuration and resulting
show output:
!
ip as-path access-list 100 permit 100
!
!
route-map only_AS100_routemap permit 10
match as-path 100
!
Because no routes satisfy the policy, no routes appear in the table of Peer13:
Example BGP Route Server Context for Flexible Policy (IPv6 Addressing)
In the following example under address-family IPv6, the local router is a BGP route server. Its neighbors at
2001:DB8:1::112 and 2001:DB8:1::113 are its route server clients. A route server context named
ONLY_AS27_CONTEXT is created and applied to the neighbor at 2001:DB8:1::113. The context uses an
import map that references a route map named only_AS27_routemap. The route map matches routes permitted
by access list 27. Access list 27 permits routes that have 27 in the AS path.
!
neighbor 2001:DB8:1::112 remote-as 12
neighbor 2001:DB8:1::112 description Peer12
neighbor 2001:DB8:1::113 remote-as 13
neighbor 2001:DB8:1::113 description Peer13
!
address-family ipv6
neighbor 2001:DB8:1::112 activate
neighbor 2001:DB8:1::112 route-server-client
neighbor 2001:DB8:1::113 activate
neighbor 2001:DB8:1::113 route-server-client context ONLY_AS27_CONTEXT
exit-address-family
!
ip as-path access-list 27 permit 27
!
route-map only_AS27_routemap permit 10
match as-path 27
!
Route-Server#show ip bgp ipv6 unicast route-server all summary
For Peer12, which has been configured as a route-server client, but not associated with any context, the bestpath
is advertised. Note that AS-path, MED, and nexthop transparency have been maintained; the routes look as
if they had not passed through the route server.
Additional References
Related Documents
Cisco IOS commands Cisco IOS Master Commands List, All Releases
BGP configuration tasks IP Routing: BGP Configuration Guide, Cisco IOS XE Release 3S
MIBs
-• -To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use
Cisco MIB Locator found at the following URL:
http://www.cisco.com/go/mibs
Technical Assistance
Description Link
BGP Route Cisco IOS XE BGP route server is a feature designed for internet exchange (IX) operators
Server Release 3.3S that provides an alternative to full eBGP mesh peering among the service
providers who have a presence at the IX. The route server provides eBGP
15.2(3)T
route reflection with customized policy support for each service provider.
That is, a route server context can override the normal BGP best path for a
prefix with a different path based on a policy, or suppress all paths for a
prefix and not advertise the prefix. The BGP route server provides reduced
configuration complexity and reduced CPU and memory requirements on
each border router. The route server also reduces overhead expense incurred
by individualized peering agreements.
The following commands were introduced:
• debug ip bgp route-server
• description (route server context)
• exit-route-server-context
• import-map
• neighbor route-server-client
• route-server-context
• show ip bgp unicast route-server