RMU VLabNet 7.4.2-BGP_RR - Virtual Laboratory Networking Exercises – BGP Route Reflector Configuration
Command Summary and Examples
In development
1. Quagga makes the following commands available to support route reflection:
(See Quagga documentation, p. 61):
bgp cluster-id a.b.c.d
neighbor peer route-reflector-client
no neighbor peer
route-reflector-client
At router configuration prompt:
bgp client-to-client Configure client to client route
reflection
bgp cluster-id Configure Route-Reflector Cluster-id
Step sequence:
1) configure both 119, 120 as iBGP (route reflector) neighbors; advertise network, declare cluster-id, declare RR-clients
2) configure each of 116-118 as iBGP peer with both 119 and 120
Route reflection is implemented in BGP to improve scalability of autonomous systems. Where there are n ASBRs in an AS, it is necessary to establish n*(n-1)/2 iBGP peerings to support the full mesh topology required by BGP.
2. Example Topology with Paired Reflectors:
Configuration, using AS 64504, Fall 2010, as
an example:
reflector 1: (VM 119)
router bgp 64504
bgp router-id 10.10.10.119
network 10.10.119.0/29
redistribute connected
!
! Reflectors
!
bgp cluster-id
10.10.10.0
neighbor x.y.z.120
remote-as 64504
neighbor x.y.z.120
description RR2
!
! Clients
!
neighbor x.y.z.116
remote-as 64504
neighbor x.y.z.116
description client1
neighbor x.y.z.116
route-reflector-client
neighbor x.y.z.117
remote-as 64504
neighbor x.y.z.117
description client2
neighbor x.y.z.117
route-reflector-client
neighbor x.y.z.118
remote-as 64504
neighbor x.y.z.118
description client3
neighbor x.y.z.118
route-reflector-client
!
! External
!
neighbor x.y.z.112 remote-as 64503
neighbor x.y.z.112 prefix-list allowed-in
in
ip prefix-list
allowed-in seq 5 deny 10.10.112.0/29
ip prefix-list
allowed-in seq 10 permit any
! logging
!
log syslog
log file
/var/log/quagga/bgpd.log
log stdout
!
line vty
reflector 2: (VM
120)
router bgp 64504
bgp router-id 10.10.10.120
network 10.10.120.0/29
redistribute
connected!
!
! Reflectors
!
bgp cluster-id
10.10.10.0
neighbor x.y.z.119
remote-as 64504
neighbor x.y.z.119
description RR1
!
! Clients
!
neighbor x.y.z.116
remote-as 64504
neighbor x.y.z.116
description client1
neighbor x.y.z.116
route-reflector-client
neighbor x.y.z.117
remote-as 64504
neighbor x.y.z.117
description client2
neighbor x.y.z.117
route-reflector-client
neighbor x.y.z.118
remote-as 64504
neighbor x.y.z.118
description client3
neighbor x.y.z.118
route-reflector-client
!
! External
!
neighbor x.y.z.105 remote-as 64501
neighbor x.y.z.105 prefix-list allowed-in
in
ip prefix-list
allowed-in seq 5 deny 10.10.105.0/29
ip prefix-list
allowed-in seq 10 permit any
!
! logging
!
log syslog
log file
/var/log/quagga/bgpd.log
log stdout
!
line vty
clients:
(VMs 116, 117, 118)
router bgp 64504
bgp router-id 10.10.10.116
redistribute connected
!
! Reflectors
!
neighbor x.y.z.119 remote-as 64504
neighbor x.y.z.120 remote-as 64504
!
! External
!
neighbor x.y.z.123 remote-as 64505
neighbor x.y.z.123 prefix-list allowed-in
in
ip prefix-list
allowed-in seq 5 deny 10.10.123.0/29
ip prefix-list
allowed-in seq 10 permit any
!
! logging
!
log syslog
log file
/var/log/quagga/bgpd.log
log stdout
!
line vty
3.
Route
Reflection and Cluster Configuration Rules:
a. Each RR (Route Reflector) sends updates to all Reflector Clients
b. RRs in redundant configuration (as here) must all have the same Cluster-id.
c. If RR-client has more than 1 connection to an RR (as here), RRs must use same Cluster-id.
d. RR-client would not have other non-RR-client iBGP sessions to other RR-clients.
e. eBGP sessions to other ASs should be normally done at designated RR-clients (except in case of a Routeserver RR in a public exchange).
f. Each RR must be fully meshed with all other RRs in same cluster (in this example case K2 mesh).
4.
Revised
configuration file (recommended 1):
a. Edit your /etc/quagga/bgpd.conf file to revise it in accordance with configuration examples above and resave.
b. Stop both bgpd and zebra processes.
c. Restart both, zebra first.
d. If you are also running ripd and/or ospfd, include them in steps b and c as well; always restarting zebra first.
5.
Interactive
configuration at the vtysh prompt
(recommended 2):
a. Enter configuration statements (comment lines not necessary)
b. At end enter write memory (to save to configuration files).
c. Note: the command redistribute connected belongs with the router information and may not be accepted in interactive configuration
d. Note: do not enter comment lines (beginning with !) in interactive configuration (when logged in to the router or through vtysh).
6.
Interactive
configuration at the config-router prompt (telnet localhost
2605), example from VM 119 in AS 64504:
<system prompt>
telnet localhost
2605
Password: zebra
bgpd> enable
Password: #####
bgpd# config t [Note Prompt changes from bgpd> to bgpd#]
bgpd(config)#
bgpd(config)# router bgp
64504 çuse your
AS-number (ASN)
bgpd(config-router)# enter statements at this prompt
bgpd(config-router)# quit
bgpd(config)# quit
bgpd# show ip
bgp <options> çyou
can enter show ip bgp commands here
bgpd# quit
<back to system
prompt>
7.
Recommended
Cluster-Ids and Reflector Assignments for Deploying Route Reflection:
|
ASN |
Cluster-Id |
Reflector 1 |
Reflector 2 |
Clients |
Investigators |
|
64501 |
10.10.10.0 |
101 |
104 |
102, 103, 105 |
Wiles, Wijeysooriya |
|
64503 |
10.10.10.0 |
113 |
115 |
111, 112, 114 |
Kosturko, Гусьрэфович |
8.
By using the ? option at the router configuration prompt, you can see what
options you have:
bgpd(config-router)# ?
address-family Enter Address Family command mode
aggregate-address Configure BGP aggregate entries
bgp BGP specific
commands
distance Define an administrative distance
end End
current mode and change to enable mode.
exit Exit
current mode and down to previous mode
help Description of the interactive help
system
ipv6 IPv6
information
list Print command list
neighbor Specify neighbor router
network Specify a network to announce via
BGP
no Negate a command or set its
defaults
quit Exit current mode and down to
previous mode
redistribute Redistribute
information from another routing protocol
show Show
running system information
timers Adjust routing timers
write Write
running configuration to memory, network, or
terminal
bgpd(config-router)# bgp
?
always-compare-med Allow comparing MED from different
neighbors
bestpath Change the default bestpath selection
client-to-client Configure client to client route
reflection
cluster-id Configure Route-Reflector
Cluster-id
confederation AS confederation parameters
dampening Enable route-flap dampening
default Configure BGP defaults
deterministic-med Pick the best-MED path among paths
advertised from
the
neighboring AS
enforce-first-as Enforce the first AS for EBGP routes
fast-external-failover Immediately reset session if a link to
a directly
connected
external peer goes down
graceful-restart Graceful restart capability parameters
log-neighbor-changes Log neighbor up/down and reset reason
network BGP network command
router-id Override configured router
identifier
scan-time Configure background scanner
interval
bgpd(config-router)# neighbor ?
A.B.C.D
Neighbor address
X:X::X:X IPv6 address
WORD
Neighbor tag
9. Experiment: compare router command
results before and after implementing route reflection for your Autonomous
System (all Border Routers).
10.
Exercises:
Verify route reflection by packet capture using tcpdump and/or
tshark.
11.
Topology
recommendation (using AS 64504 as an example):
Paired Reflectors (Redundancy)

3. Documentation1:
ip route | sort:
vm-test:/home/test# ip route | sort
10.10.10.96/27 dev eth1 proto kernel scope link
src 10.10.10.100
10.10.100.0/29 dev eth1 proto kernel scope link
src 10.10.100.1
10.10.101.0/29 via x.y.z.101 dev eth0 proto zebra
10.10.102.0/29 via x.y.z.102 dev eth0 proto zebra
10.10.103.0/29 via x.y.z.103 dev eth0 proto zebra
10.10.104.0/29 via x.y.z.104 dev eth0 proto zebra
10.10.105.0/29 via x.y.z.105 dev eth0 proto zebra
10.10.106.0/29 via x.y.z.106 dev eth0 proto zebra
10.10.107.0/29 via x.y.z.107 dev eth0 proto zebra
10.10.108.0/29 via x.y.z.108 dev eth0 proto zebra
10.10.109.0/29 via x.y.z.109 dev eth0 proto zebra
10.10.110.0/29 via x.y.z.110 dev eth0 proto zebra
10.10.111.0/29 via x.y.z.111 dev eth0 proto zebra
10.10.112.0/29 via x.y.z.112 dev eth0 proto zebra
10.10.113.0/29 via x.y.z.113 dev eth0 proto zebra
10.10.114.0/29 via x.y.z.114 dev eth0 proto zebra
10.10.115.0/29 via x.y.z.115 dev eth0 proto zebra
10.10.116.0/29 via
10.10.10.116 dev eth1 proto zebra metric 20
10.10.117.0/29 via x.y.z.117
dev eth0 proto zebra
10.10.118.0/29 via x.y.z.118
dev eth0 proto zebra
10.10.119.0/29 via x.y.z.119
dev eth0 proto zebra
10.10.120.0/29 via x.y.z.120
dev eth0 proto zebra
10.10.121.0/29 via x.y.z.121
dev eth0 proto zebra
10.10.122.0/29 via
10.10.10.122 dev eth1 proto zebra metric 20
10.10.123.0/29 via x.y.z.123
dev eth0 proto zebra
10.10.124.0/29 via x.y.z.124
dev eth0 proto zebra
10.10.125.0/29 via x.y.z.125
dev eth0 proto zebra
10.10.98.0/29 via
10.10.10.98 dev eth1 proto zebra metric 20
x.y.z.96/27 dev eth0 proto kernel scope link
src x.y.z.100
default via x.y.z.97 dev eth0
vm-test:/home/test#
netstat -rn
vm-test:/home/test# netstat -rn
Kernel IP routing table
Destination
Gateway Genmask
Flags MSS Window irtt Iface
10.10.101.0 x.y.z.101 255.255.255.248
UG 0 0 0 eth0
10.10.117.0 x.y.z.117 255.255.255.248
UG 0 0 0 eth0
10.10.116.0
10.10.10.116 255.255.255.248
UG 0 0 0 eth1
10.10.100.0
0.0.0.0 255.255.255.248
U 0 0 0 eth1
10.10.103.0 x.y.z.103 255.255.255.248
UG 0 0 0 eth0
10.10.119.0 x.y.z.119 255.255.255.248
UG 0 0 0 eth0
10.10.102.0 x.y.z.102 255.255.255.248
UG 0 0 0 eth0
10.10.118.0 x.y.z.118 255.255.255.248
UG 0 0 0 eth0
10.10.113.0 x.y.z.113 255.255.255.248
UG 0 0 0 eth0
10.10.112.0 x.y.z.112 255.255.255.248
UG 0 0 0 eth0
10.10.115.0 x.y.z.115 255.255.255.248
UG 0 0 0 eth0
10.10.114.0 x.y.z.114 255.255.255.248
UG 0 0 0 eth0
10.10.98.0
10.10.10.98 255.255.255.248
UG 0 0 0 eth1
10.10.109.0 x.y.z.109 255.255.255.248
UG 0 0 0 eth0
10.10.125.0 x.y.z.125 255.255.255.248
UG 0 0 0 eth0
10.10.124.0 x.y.z.124 255.255.255.248
UG 0 0 0 eth0
10.10.108.0 x.y.z.108 255.255.255.248
UG 0 0 0 eth0
10.10.111.0 x.y.z.111 255.255.255.248
UG 0 0 0 eth0
10.10.110.0 x.y.z.110 255.255.255.248
UG 0 0 0 eth0
10.10.105.0 x.y.z.105 255.255.255.248
UG 0 0 0 eth0
10.10.121.0 x.y.z.121 255.255.255.248
UG 0 0 0 eth0
10.10.104.0 x.y.z.104 255.255.255.248
UG 0 0 0 eth0
10.10.120.0 x.y.z.120 255.255.255.248
UG 0 0 0 eth0
10.10.107.0 x.y.z.107 255.255.255.248
UG 0 0 0 eth0
10.10.123.0 x.y.z.123 255.255.255.248
UG 0 0 0 eth0
10.10.106.0 x.y.z.106 255.255.255.248
UG 0 0 0 eth0
10.10.122.0
10.10.10.122 255.255.255.248
UG 0 0 0 eth1
10.10.10.96 0.0.0.0 255.255.255.224 U 0 0 0 eth1
x.y.z.96 0.0.0.0 255.255.255.224 U 0 0 0 eth0
0.0.0.0 x.y.z.97
0.0.0.0 UG 0 0 0 eth0
vm-test:/home/test#
(in router) show ip bgp (source ASBR 100 in AS 64506)
bgpd# show ip bgp
BGP table version is 0, local router ID is 10.10.10.100
Status codes: s suppressed, d damped, h history, * valid, >
best, i - internal,
r RIB-failure, S
Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf
Weight Path
*
10.10.10.96/27 x.y.z.103 0 64501 ?
*
x.y.z.115 1 0 64503 ?
*>i x.y.z.98 1
100 0 ?
*>i10.10.98.0/29
x.y.z.98 1 100
0 i
*> 10.10.100.0/29
0.0.0.0 0 32768 i
*> 10.10.101.0/29
x.y.z.101
0 64501 i
* i x.y.z.101 100 0 64501 i
*> 10.10.102.0/29
x.y.z.102
0 64501 i
* i x.y.z.102 100 0 64501 i
*> 10.10.103.0/29
x.y.z.103
0 64501 ?
*>i10.10.104.0/29
x.y.z.104 100 0 64501 i
*> 10.10.105.0/29
x.y.z.105
0 64501 i
* i x.y.z.105 100 0 64501 i
*
10.10.106.0/29 x.y.z.106 0 64501 64502 i
*>
x.y.z.106
0 64503 64502 i
* i x.y.z.106 100 0 64505 64502 i
*
x.y.z.106
0 64505 64502 i
*
10.10.107.0/29 x.y.z.107 0 64501 64502 i
*>
x.y.z.107
0 64503 64502 i
* i x.y.z.107 100 0 64505 64502 i
*
x.y.z.107
0 64505 64502 i
* 10.10.108.0/29 x.y.z.108 0 64501 64502 i
*
x.y.z.108
0 64503 64502 i
* i x.y.z.108 100 0 64505 64502 i
*>
x.y.z.108 0 64505 64502 i
*
10.10.109.0/29 x.y.z.109 0 64501 64502 i
*>
x.y.z.109
0 64503 64502 i
* i x.y.z.109 100 0 64505 64502 i
*
x.y.z.109
0 64505 64502 i
*
10.10.110.0/29 x.y.z.110 0 64501 64502 i
* i x.y.z.110 100 0 64501 64502 i
*>
x.y.z.110
0 64503 64502 i
*> 10.10.111.0/29
x.y.z.111
0 64503 i
*> 10.10.112.0/29
x.y.z.112
0 64503 i
*> 10.10.113.0/29
x.y.z.113
0 64503 i
*> 10.10.114.0/29
x.y.z.114
0 64503 i
*>i10.10.115.0/29
x.y.z.115 100 0 64505 64504 64503 i
*
10.10.117.0/29 x.y.z.117 0 64501 64504 i
*>
x.y.z.117
0 64503 64504 i
* i x.y.z.117 100
0 64501 64504 i
*
10.10.118.0/29 x.y.z.118 0 64501 64504 i
*
x.y.z.118
0 64505 64504 i
*>
x.y.z.118
0 64503 64504 i
* i x.y.z.118 100 0 64501 64504 i
*
10.10.119.0/29 x.y.z.119 0 64501 64504 i
*
x.y.z.119
0 64505 64504 i
*>
x.y.z.119
0 64503 64504 i
* i x.y.z.119 100 0 64501 64504 i
*
10.10.120.0/29 x.y.z.120 0 64505 64504 i
* i x.y.z.120 100 0 64505 64504 i
*>
x.y.z.120 0 64503 64504 i
*> 10.10.121.0/29
x.y.z.121
0 64505 i
*>i10.10.122.0/29
x.y.z.122 100 0 64505 i
* i10.10.123.0/29
x.y.z.123 100 0 64505 i
*>
x.y.z.123 0 64505 i
*> 10.10.124.0/29
x.y.z.124
0 64505 i
* i x.y.z.124 100 0 64505 i
* i10.10.125.0/29
x.y.z.125 100 0 64505 i
*>
x.y.z.125 0 64505 i
*
x.y.z.96/27
x.y.z.103 0 64501
?
*
x.y.z.115 1 0 64503 ?
*>i x.y.z.98 1
100 0 ?
Total number of prefixes 28
bgpd#
Next
Hop Routing Path (AS-path):

13. Monitoring Route Reflection – Show run for
VM101 (RR):
bgpd# show run
Current configuration:
!
hostname bgpd
password zebra
enable password horse
log file /var/log/quagga/bgpd.log
log stdout
log syslog
!
router bgp 64501
bgp router-id 10.10.10.101
bgp cluster-id
10.10.10.0
network 10.10.101.0/29
redistribute connected
neighbor x.y.z.102 remote-as 64501
neighbor x.y.z.102 description client1
neighbor x.y.z.102 route-reflector-client
neighbor x.y.z.103 remote-as 64501
neighbor x.y.z.103 description client2
neighbor x.y.z.103 route-reflector-client
neighbor x.y.z.104 remote-as 64501
neighbor x.y.z.104 description RR2
neighbor x.y.z.105 remote-as 64501
neighbor x.y.z.105 description client3
neighbor x.y.z.105 route-reflector-client
neighbor x.y.z.108 remote-as 64502
neighbor x.y.z.108 prefix-list allowed-in in
!
ip prefix-list allowed-in seq 5 deny 10.10.108.0/29
ip prefix-list allowed-in seq
10 permit any
!
line vty
!
end
bgpd#
14. Monitoring Route Reflection – showing
Originator-id and Cluster-id (list): Obtained from RR-client.
bgpd# show ip bgp x.y.z.113
BGP routing table entry for x.y.z.96/27
Paths: (4 available, best #4, table Default-IP-Routing-Table)
Advertised to non
peer-group peers:
x.y.z.113 x.y.z.115
x.y.z.119
Local
x.y.z.113 (metric 1)
from x.y.z.113 (10.10.10.113)
Origin incomplete,
metric 1, localpref 100, valid, internal
Last update: Wed Dec 8 02:24:35 2010
64504
x.y.z.119
from x.y.z.119 (10.10.10.119)
Origin incomplete,
metric 1, localpref 100, valid, external
Last update: Wed Dec 8 02:24:35 2010
Local
x.y.z.111 (metric 1)
from x.y.z.115 (10.10.10.111)
Origin incomplete,
metric 1, localpref 100, valid, internal
Originator: 10.10.10.111, Cluster list: 10.10.10.0
Last update: Wed Dec 8 02:24:34 2010
Local
0.0.0.0 from 0.0.0.0
(10.10.10.112)
Origin incomplete,
metric 1, localpref 100, weight 32768, valid,
sourced, best
Last update: Wed Dec 8 02:24:29 2010
bgpd#
15. Monitoring Route Reflection – referring to
RR-client: Obtained from Route Reflector (RR).
bgpd# show ip bgp 10.10.105.0/29
BGP routing table entry for 10.10.105.0/29
Paths: (3 available, best #3, table Default-IP-Routing-Table)
Advertised to non
peer-group peers:
x.y.z.111 x.y.z.112
x.y.z.114 x.y.z.115
64502 64501, (Received from a RR-client)
x.y.z.101 (metric 1)
from x.y.z.114 (10.10.10.114)
Origin IGP, localpref 100, valid, internal
Last update: Wed Dec 8 02:42:59 2010
64506 64501
x.y.z.105 (metric 1)
from x.y.z.115 (10.10.10.115)
Origin IGP, localpref 100, valid, internal
Last update: Wed Dec 8 02:06:18 2010
64502 64501
x.y.z.101
from x.y.z.106 (10.10.10.106)
Origin IGP, localpref 100, valid, external, best
Last update: Sun Dec 5 22:34:11 2010
bgpd#
16. ASNs with
and without Route Reflection, Fall 2010:

17. Documentation
2:
·
Pepelnjak I, “BGP Route Reflectors,” http://wiki.nil.com/BGP_route_reflectors
· http://www.computerfreetips.com/cisco-router/BGP-Route-Reflectors.html
· http://evilrouters.net/2010/03/08/bgp-route-reflectors/
· http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml
·
RFC: http://tools.ietf.org/html/rfc4271
, BGP
·
RFC: http://tools.ietf.org/html/rfc4456
(2006)
·
Juniper, “Application note: Differences Between BGP Route
Reflectors and Confederations,” https://www.juniper.net/customers/csc/documentation/techdocs/downloads/pdf/350010.pdf
·
Cisco Best Path selection: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml
·
Standard Cisco Routing Table: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094823.shtml
· Chen and Rekhter, “Cooperative Route Filtering Capability for BGP-4” http://tools.ietf.org/html/draft-ietf-idr-route-filter-09
· http://www.networkers-online.com/blog/2009/02/bgp-route-reflector-basics/
·
Schmied G, Integrated Cisco and UNIX® Network
Architectures (Ciscopress, 2005), Lab 10-1,
“Route Reflection,” pp. 251-267.
Bit budget for ORIGINATOR_ID: 4 bytes (32 bits)
Bit budget for CLUSTER_ID: 4 bytes (32 bits)
m, n = student domain number {nÎN | ((n ≥ 101) Ù (n ≤ 125))}
x.y.z.
= first three octets of assigned routable network addresses for
Valerie J. H. Powell, RMU C&IS; Randall S. Johnson, RMU IT Services; thanks to Ingo Flaschberger, Crossip Communications GmbH (http://www.crossip.net/, Vienna, Austria), input and guidance on this topic.
© 2010 by Robert Morris University
Update: 2011-11-24