Network Requirements
- Set up EBGP neighbors between Device3 and Device4, and configure Device4 to advertise route 100.0.0.0/24.
- Set up IBGP neighbors between Device2 and Device3 and between Device2 and Device1 respectively. On Device2, configure Route Reflectors (RRs), and configure Device1 and Device3 as clients, so that Device1 can learn route 100.0.0.0/24 that is advertised by Device4.
Network Topology
Figure 12–4 Networking for configuring a BGP route reflector
Configuration Steps
Step 1: Configure the VLAN and join the interface to the corresponding VLAN. (Omitted)
Step 2: Configure the IP addresses of the interfaces. (Omitted)
Step 3: Configure OSPF so that loopback routes are reachable between devices.
#Configure Device1.
Device1#configure terminal
Device1(config)#router ospf 100
Device1(config-ospf)#network 1.0.0.0 0.0.0.255 area 0
Device1(config-ospf)#network 10.0.0.1 0.0.0.0 area 0
Device1(config-ospf)#exit
|
#Configure Device2.
Device2#configure terminal
Device2(config)#router ospf 100
Device2(config-ospf)#network 1.0.0.0 0.0.0.255 area 0
Device2(config-ospf)#network 2.0.0.0 0.0.0.255 area 0
Device2(config-ospf)#network 20.0.0.1 0.0.0.0 area 0
Device2(config-ospf)#exit
|
#Configure Device3.
Device2#configure terminal
Device3(config)#router ospf 100
Device3(config-ospf)#network 2.0.0.0 0.0.0.255 area 0
Device3(config-ospf)#network 30.0.0.1 0.0.0.0 area 0
Device3(config-ospf)#exit
|
#Query the routing table of Device1.
Device1#show ip route ospf
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management, E - IRMP, EX - IRMP external
O 2.0.0.0/24 [110/2] via 1.0.0.2, 01:12:00, vlan2
O 20.0.0.1/32 [110/2] via 1.0.0.2, 01:11:47, vlan2
O 30.0.0.1/32 [110/3] via 1.0.0.2, 01:07:47, vlan2
#Query the routing table of Device2.
Device2#show ip route ospf
Codes: C - Connected, L - Local, S - static, R - RIP, B BGP, i-ISIS
U Per-user Static route
O - OSPF, OE-OSPF External, M - Management, E - IRMP, EX IRMP external
O 10.0.0.1/32 [110/2] via 1.0.0.1, 01:13:02, vlan2
O 30.0.0.1/32 [110/2] via 2.0.0.2, 01:08:58, vlan3
#Query the routing table of Device3.
Device3#show ip route ospf
Codes: C - Connected, L - Local, S - static, R - RIP, B BGP, i-ISIS
U Per-user Static route
O - OSPF, OE-OSPF External, M - Management, E - IRMP, EX IRMP external
O 1.0.0.0/24 [110/2] via 2.0.0.1, 01:10:04, vlan2
O 10.0.0.1/32 [110/3] via 2.0.0.1, 01:10:04, vlan2
O 20.0.0.1/32 [110/2] via 2.0.0.1, 01:10:04, vlan2
According to the routing table, Device1, Device2, and Device3 have learnt the routes of the loopback interfaces of each other.
Step 4: Configure BGP.
#Configure Device1.
Device1(config)#router bgp 100
Device1(config-bgp)#neighbor 20.0.0.1 remote-as 100
Device1(config-bgp)#neighbor 20.0.0.1 update-source loopback0
Device1(config-bgp)#exit
|
#Configure Device2.
Device2(config)#router bgp 100
Device2(config-bgp)#neighbor 30.0.0.1 remote-as 100
Device2(config-bgp)#neighbor 30.0.0.1 update-source loopback0
Device2(config-bgp)#neighbor 10.0.0.1 remote-as 100
Device2(config-bgp)#neighbor 10.0.0.1 update-source loopback0
Device2(config-bgp)#exit
|
#Configure Device3.
Device3(config)#router bgp 100
Device3(config-bgp)#neighbor 3.0.0.2 remote-as 200
Device3(config-bgp)#neighbor 20.0.0.1 remote-as 100
Device3(config-bgp)#neighbor 20.0.0.1 update-source loopback0
Device3(config-bgp)#neighbor 20.0.0.1 next-hop-self
Device3(config-bgp)#exit
|
#Configure Device4.
Device4#configure terminal
Device4(config)#router bgp 200
Device4(config-bgp)#neighbor 3.0.0.1 remote-as 100
Device4(config-bgp)#network 100.0.0.0 255.255.255.0
Device4(config-bgp)#exit
|
#On Device2, check the BGP neighbor status.
Device2#show ip bgp summary
BGP router identifier 20.0.0.1, local AS number 100 BGP table version is 1
2 BGP AS-PATH entries 0 BGP community entries
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.1 4 100 8 8 1 0 0 00:03:01 0
30.0.0.1 4 100 9 9 1 0 0 00:02:41 1
#On Device4, check the BGP neighbor status.
Device4#show ip bgp summary
BGP router identifier 100.0.0.1, local AS number 200 BGP table version is 1
1 BGP AS-PATH entries 0 BGP community entries
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
3.0.0.1 4 100 19 19 1 0 0 00:05:40 0
According to the queried information, BGP neighbors have been set up between the devices.
#Query the BGP routing table of Device3.
Device3#show ip bgp
BGP table version is 2, local router ID is 30.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
[B]*> 100.0.0.0/24 3.0.0.2 0 0 200 i
#Query the BGP routing table of Device2.
Device2#show ip bgp
BGP table version is 768, local router ID is 20.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i internal,
S Stale
Origin codes: i - IGP, e - EGP, ? incomplete
Network Next Hop Metric LocPrf Weight Path
[B]*>i100.0.0.0/24 30.0.0.1 0 100 0 200 i
#Query the BGP routing table of Device1.
Device1#show ip bgp
BGP table version is 2, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i internal,
S Stale
Origin codes: i - IGP, e - EGP, ? incomplete
Network Next Hop Metric LocPrf Weight Path
According to the routing table, Device2 and Device3 have learnt route 100.0.0.0/24, and Device2 has not advertised the route to Device1.
Step 5: Configure a BGP route reflector.
#Configure Device2.
Device2(config)#router bgp 100
Device2(config-bgp)#neighbor 10.0.0.1 route-reflector-client
Device2(config-bgp)#neighbor 30.0.0.1 route-reflector-client
Device2(config-bgp)#exit
|
On Device2, Device1 and Device3 have been configured as the RR clients.
Step 6: Check the result.
#Query the routing table of Device1.
Device1#show ip bgp
BGP table version is 2, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
[B]*>i100.0.0.0/24 30.0.0.1 0 100 0 200 i
Device1#show ip route bgp
Codes: C - Connected, L - Local, S - static, R - RIP, B BGP, i-ISIS
U Per-user Static route
O - OSPF, OE-OSPF External, M - Management, E - IRMP, EX IRMP external
B 100.0.0.0/24 [200/0] via 30.0.0.1, 00:01:40, vlan2
On BGP of Device2, Device1 and Device3 have been configured as the RR clients, and Device2 has successfully reflects route 100.0.0.0/24 to RR client Device1.
-
If you configure a peer as a RR client, the device and the neighbors of the peer will be reset.