Example for Configuring a BGP Route Reflector
Networking Requirements
As shown in Figure 9-32, seven Routers need to form an IBGP network. Full-mesh BGP connections have been established between Router B, Router D, and Router E. Users require that the IBGP network be formed without interrupting full-mesh BGP connections between Router B, Router D, and Router E and require simplified device configuration and management.
Device |
Interface |
IP address |
---|---|---|
RouterA |
GE 1/0/0 |
10.1.1.2/24 |
GE 2/0/0 |
10.1.3.2/24 |
|
GE 3/0/0 |
9.1.1.1/24 |
|
RouterB |
GE 1/0/0 |
10.1.1.1/24 |
GE 2/0/0 |
10.1.4.1/24 |
|
GE 3/0/0 |
10.1.5.1/24 |
|
GE 4/0/0 |
10.1.2.1/24 |
|
RouterC |
GE 1/0/0 |
10.1.2.2/24 |
GE 2/0/0 |
10.1.3.1/24 |
|
GE 3/0/0 |
10.1.7.1/24 |
|
GE 4/0/0 |
10.1.8.1/24 |
|
RouterD |
GE 1/0/0 |
10.1.4.2/24 |
GE 2/0/0 |
10.1.6.1/24 |
|
RouterE |
GE 2/0/0 |
10.1.6.2/24 |
GE 3/0/0 |
10.1.5.2/24 |
|
RouterF |
GE 1/0/0 |
10.1.7.2/24 |
RouterG |
GE 1/0/0 |
10.1.8.2/24 |
Configuration Roadmap
The configuration roadmap is as follows:
Configure RouterB as the route reflector of Cluster1 and RouterD and RouterE as the clients of RouterB. Prohibit communication between the clients to form an IBGP network without interrupting full-mesh BGP connections between RouterB, RouterD, and RouterE.
Configure RouterC as the route reflector of Cluster2 and RouterF and RouterG, as the clients of RouterC to simplify device configuration and management.
Procedure
- Configure an IP address for each interface. The configuration details are not mentioned here.
- Configure the IBGP connections between the clients and the RR and between the non-clients and the RR. The configuration details are not mentioned here.
- Configure the RR.
# Configure Router B.
<Huawei> system-view
[Huawei] sysname RouterB
[RouterB] bgp 65010
[RouterB-bgp] router-id 2.2.2.2
[RouterB-bgp] group in_rr internal
[RouterB-bgp] peer 10.1.4.2 group in_rr
[RouterB-bgp] peer 10.1.5.2 group in_rr
[RouterB-bgp] ipv4-family unicast
[RouterB-bgp-af-ipv4] peer in_rr reflect-client
[RouterB-bgp-af-ipv4] undo reflect between-clients
[RouterB-bgp-af-ipv4] reflector cluster-id 1
[RouterB-bgp-af-ipv4] quit
# Configure Router C.
[RouterC] bgp 65010
[RouterC-bgp] router-id 3.3.3.3
[RouterC-bgp] group in_rr internal
[RouterC-bgp] peer 10.1.7.2 group in_rr
[RouterC-bgp] peer 10.1.8.2 group in_rr
[RouterC-bgp] ipv4-family unicast
[RouterC-bgp-af-ipv4] peer in_rr reflect-client
[RouterC-bgp-af-ipv4] reflector cluster-id 2
[RouterC-bgp-af-ipv4] quit
# Display the routing table of Router D.
[RouterD] display bgp routing-table 9.1.1.0
BGP local router ID : 4.4.4.4 Local AS number : 65010 Paths: 1 available, 0 best, 0 select BGP routing table entry information of 9.1.1.0/24: From: 10.1.4.1 (2.2.2.2) Route Duration: 00h00m14s Relay IP Nexthop: 0.0.0.0 Relay IP Out-Interface: Original nexthop: 10.1.1.2 Qos information : 0x0 AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, internal, pre 255 Originator: 1.1.1.1 Cluster list: 0.0.0.1 Not advertised to any peer yet
You can view that Router D has learned the route advertised by Router A from Router B. For details, see the Originator and Cluster_ID attributes of the route.
Configuration Files
Configuration file of Router A
#
sysname RouterA
#
interface GigabitEthernet1/0/0
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet2/0/0
ip address 10.1.3.2 255.255.255.0
#
interface GigabitEthernet3/0/0
ip address 9.1.1.1 255.255.255.0
#
bgp 65010
router-id 1.1.1.1
peer 10.1.1.1 as-number 65010
peer 10.1.3.1 as-number 65010
#
ipv4-family unicast
undo synchronization
network 9.1.1.0 255.255.255.0
peer 10.1.1.1 enable
peer 10.1.3.1 enable
#
return
Configuration file of Router B
#
sysname RouterB
#
interface GigabitEthernet1/0/0
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet2/0/0
ip address 10.1.4.1 255.255.255.0
#
interface GigabitEthernet3/0/0
ip address 10.1.5.1 255.255.255.0
#
interface GigabitEthernet4/0/0
ip address 10.1.2.1 255.255.255.0
#
bgp 65010
router-id 2.2.2.2
peer 10.1.1.2 as-number 65010
peer 10.1.2.2 as-number 65010
group in_rr internal
peer 10.1.4.2 as-number 65010
peer 10.1.4.2 group in_rr
peer 10.1.5.2 as-number 65010
peer 10.1.5.2 group in_rr
#
ipv4-family unicast
undo synchronization
undo reflect between-clients
reflector cluster-id 1
peer 10.1.1.2 enable
peer 10.1.2.2 enable
peer in_rr enable
peer in_rr reflect-client
peer 10.1.4.2 enable
peer 10.1.4.2 group in_rr
peer 10.1.5.2 enable
peer 10.1.5.2 group in_rr
#
return
Configuration file of Router C
#
sysname RouterC
#
interface GigabitEthernet1/0/0
ip address 10.1.2.2 255.255.255.0
#
interface GigabitEthernet2/0/0
ip address 10.1.3.1 255.255.255.0
#
interface GigabitEthernet3/0/0
ip address 10.1.7.1 255.255.255.0
#
interface GigabitEthernet4/0/0
ip address 10.1.8.1 255.255.255.0
#
bgp 65010
router-id 3.3.3.3
peer 10.1.2.1 as-number 65010
peer 10.1.3.2 as-number 65010
group in_rr internal
peer 10.1.7.2 as-number 65010
peer 10.1.7.2 group in_rr
peer 10.1.8.2 as-number 65010
peer 10.1.8.2 group in_rr
#
ipv4-family unicast
undo synchronization
reflector cluster-id 2
peer 10.1.2.1 enable
peer 10.1.3.2 enable
peer in_rr enable
peer in_rr reflect-client
peer 10.1.7.2 enable
peer 10.1.7.2 group in_rr
peer 10.1.8.2 enable
peer 10.1.8.2 group in_rr
#
return
Configuration file of Router D
#
sysname RouterD
#
interface GigabitEthernet1/0/0
ip address 10.1.4.2 255.255.255.0
#
interface GigabitEthernet2/0/0
ip address 10.1.6.1 255.255.255.0
#
bgp 65010
router-id 4.4.4.4
peer 10.1.4.1 as-number 65010
peer 10.1.6.2 as-number 65010
#
ipv4-family unicast
undo synchronization
peer 10.1.4.1 enable
peer 10.1.6.2 enable
#
return
The configuration file of other routers is similar to that of Router D and is omitted here.