Title: Scaling BGP
1Scaling BGP
- Semester 5, Chapter 9
- Allan Johnson
- Modified by Sean He
2Route Reflectors
3Scalability and IBGP
- The IBGP Split Horizon rule
- An IBGP router will not advertise BGP routes
received from one IBGP peer to other IBGP peers - This rule, then, requires that all IBGP routers
in an AS form a logical full mesh. - Otherwise, all BGP routing updates will not be
received by all IBGP peers. - However, fully meshed internal BGP can become a
burden on router resources, bandwidth usage, and
administrative overhead.
4Solution Route Reflectors
- We can drastically reduce the number of internal
TCP and BGP connections by configuring router
reflectors. - A general rule is to configure route reflectors
according to the physical topology. - In other words, hub routers become reflectors and
spoke routers become clients. - Route reflectors must maintain a IBGP full mesh
with other routers that are nonclients (e.g.
other route reflectors). - Configuring route reflectors below would reduce
the number of TCP/BGP connections from 28 to just
8!
5Route Reflector Example
RTR_A(config)router bgp 100 RTR_A(config-router)
neighbor 10.0.0.3 remote-as 100 RTR_A(config-route
r)neighbor 10.0.0.3 route-reflector-client RTR_A(
config-router)neighbor 10.0.0.4 remote-as
100 RTR_A(config-router)neighbor 10.0.0.4
route-reflector-client ----------------- RTR_B(con
fig)router bgp 100 RTR_B(config-router)neighbor
10.0.0.2 remote-as 100 ----------------- RTR_C(con
fig)router bgp 100 RTR_C(config-router)neighbor
10.0.0.1 remote-as 100
6Route Reflector Operation
- Upon receiving an UPDATE, a route reflector takes
one of the following actions - If received from a nonclient (e.g. another route
reflector), the route reflector sends the update
only to its client peers (IBGP Split Horizon
Rule) - If received from a client, the route reflector
sends the update to all client and nonclient
peers (except for the client from which it
received the update). - If received from an EBGP peer, the route
reflector sends the update to all client and
nonclient peers.
7BGP Route Filtering
8Extended ACL Distribute Lists
- The syntax is similar to what weve seen before
- access-list ACL permitdeny source
source-wildcard mask mask-wildcard - The source and source-wildcard are the same.
- However, the mask and mask-wildcard arguments
have a different meaning. - The mask specifies the subnet mask of the source.
- The mask-wildcard specifies what bits in the
subnet mask are relevant
9Distribute List Example
- Our previous example when using an extended ACL
reduces the amount of routes advertised to
onethe supernet only - Router(config)access-list 101 deny 192.168.11.0
0.0.0.255 255.255.255.0 0.0.0.0 - Router(config)access-list 101 permit 172.16.0.0
0.0.255.255 255.255.0.0 0.0.0.0 - Router(config)router bgp 35623
- Router(config-router)neighbor 172.16.32.1
remote-as 369 - Router(config-router)neighbor 172.16.32.1
distribute-list 101 out - This distribute list will stop the
192.168.11.0/24 network from being advertised. - It will also only allow the supernet,
172.16.0.0/16, to be advertised. - Notice that because of the implicit deny any,
the first ACL statement is redundant.
10Simple Prefix List
- Router(config)ip prefix-list CISCO deny
192.168.11.0/24 - Router(config)ip prefix-list CISCO permit
172.16.0.0/16 - Router(config)router bgp 35623
- Router(config-router)neighbor 172.16.32.1
remote-as 369 - Router(config-router)neighbor 172.16.32.1
prefix-list CISCO out
11More Prefix Lists
- The following examples show how to use le and ge.
- To accept a mask length of up to 24 bits in
routes with the prefix 192/8 - ip prefix-list ABC permit 192.0.0.0/8 le 24
- To deny mask lengths greater than 25 bits in
routes with a prefix of 192/8 - ip prefix-list ABC deny 192.0.0.0/8 ge 25
- To permit mask lengths from 8 to 24 bits in all
address space - ip prefix-list ABC permit 0.0.0.0/0 ge 8 le 24
- To deny mask lengths greater than 25 bits in all
address space - ip prefix-list ABC deny 0.0.0.0/0 ge 25
- To deny all routes with a prefix of 10/8
- ip prefix-list ABC deny 10.0.0.0/8 le 32
- To deny all masks with a length greater than 25
bits routes with a prefix of 204.70.1/24 - ip prefix-list ABC deny 204.70.1.0/24 ge 25
- To permit all routes with a prefix of 0/0
- ip prefix-list ABC permit 0.0.0.0/0 le 32
12The COMMUNITY Attribute
13The COMMUNITY Attribute
- The COMMUNITY attribute is used by BGP peers to
group a list of destination networks by a common
policy. - For example, an ASBR may want to send all
internal routes to its ISP. However, it may want
to stop the ISP from further advertising some of
those routes.
14Well-known COMMUNITY Values
- NO_EXPORT
- Route is NOT to be advertised outside the
receiving AS to other EBGP peers. - NO_ADVERTISE
- Route is NOT to be advertised to any BGP peers.
- Internet
- Route is to be advertised to all BGP routers
- Local-as
- Route is to be advertised to peers within AS
15Configuring the COMMUNITY
- The COMMUNITY attribute uses route maps to set
the value. - Router(config)access-list 1 permit any
- Router(config)route map SET permit 10
- Router(route-map-config)math IP address 1
- Router(route-map-config)set community no_export
- The above commands will set the no_export
community value on all routes - Apply the route map to desired neighbor(s).
- Router(config-router)neighbor 10.0.0.1 route-map
SET out - Send the attribute to the desired neighbor(s).
- Router(config-router)neighbor 10.0.0.1
send-community
16Setting Up Peer Groups
17Peer Groups Example (IBGP)
- RTA(config-router)neighbor IBGP_PEERS peer-group
- !Names the peer group
- RTA(config-router)neighbor IBGP_PEERS remote-as
100 - !Avoids having to use the neighbor
remote-as command - RTA(config-router)neighbor 192.168.1.2
peer-group IBGP_PEERS - RTA(config-router)neighbor 192.168.2.2
peer-group IBGP_PEERS - !Assigned peers to the peer group
- RTA(config-router)neighbor IBGP_PEERS route-map
INTRA out - !Defines an outbound update policy for all
peers
18Peer Groups Example (EBGP)
- RTA(config-router)neighbor EBGP_PEERS peer-group
- !Names the peer group
- RTA(config-router)neighbor 10.10.10.1 remote-as
300 - RTA(config-router)neighbor 10.10.10.1 peer-group
EBGP_PEERS - RTA(config-router)neighbor 10.10.10.2 remote-as
200 - RTA(config-router)neighbor 10.10.10.2 peer-group
EBGP_PEERS - !Assigned peers their AS and peer group
- RTA(config-router)neighbor EBGP_PEERS route-map
EXTRA out - !Defines an outbound update policy for all
peers