Configuration Roadmap
The configuration roadmap is as follows:
- Configure EBGP connections between Router A and Router B and between Router A and Router C. Configure IBGP connections between Router D and Router B, and between Router D and Router C.
- Configure routing policies on Router B and Router C to change the MED values of routes to Router D to facilitate route selection.
- Configure BGP Auto FRR on Router A.
Data Preparation
To complete the configuration, you need the following data:
- Router IDs and AS numbers of Router A, Router B, Router C, and Router D
- Names of routing policies and MED values of routes on Router B and Router C
Procedure
- Configure IP addresses for interfaces. The configuration details are not mentioned here.
- Configure EBGP connections between Router A and Router B, and between Router A and Router C. Configure IBGP connections between Router B and Router D, and between Router C and Router D. # Configure EBGP connections on Router A.
<RouterA> system-view
[RouterA] bgp 100
[RouterA-bgp] router-id 1.1.1.1
[RouterA-bgp] peer 10.1.1.2 as-number 200
[RouterA-bgp] peer 10.2.1.2 as-number 200
NOTE:The configurations of Router B and Router C are the same as that of Router A, and the detailed configurations are not mentioned here.# Configure IBGP connections on Router D.
<RouterD> system-view
[RouterD] bgp 200
[RouterD-bgp] router-id 4.4.4.4
[RouterD-bgp] peer 10.3.1.1 as-number 200
[RouterD-bgp] peer 10.4.1.1 as-number 200
NOTE:The configurations on Router B and Router C are similar, and the detailed configurations are not mentioned here. - Configuring routing policies on Router B and Router C so that the MED values of routes to Router D are different # Configure a routing policy on Router B.
<RouterB> system-view
[RouterB] route-policy rtb permit node 10
[RouterB-route-policy] apply cost 80
[RouterB-route-policy] quit
[RouterB] bgp 200
[RouterB-bgp] ipv4-family unicast
[RouterB-bgp-af-ipv4] peer 10.1.1.1 route-policy rtb export
# Configure a routing policy on Router C.
<RouterC> system-view
[RouterC] route-policy rtc permit node 10
[RouterC-route-policy] apply cost 120
[RouterC-route-policy] quit
[RouterC] bgp 200
[RouterC-bgp] ipv4-family unicast
[RouterC-bgp-af-ipv4] peer 10.2.1.1 route-policy rtc export
# Advertise a route to 4.4.4.4/32 on Router D.
[RouterD] bgp 200
[RouterD-bgp] ipv4-family unicast
[RouterD-bgp] network 4.4.4.4 32
# Run the display ip routing-table verbose command on Router A to check detailed information about the learned route to 4.4.4.4/32.
<RouterA> display ip routing-table 4.4.4.4 32 verbose Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Table : Public Summary Count : 1 Destination: 4.4.4.4/32 Protocol: BGP Process ID: 0 Preference: 255 Cost: 80 NextHop: 10.1.1.2 Neighbour: 10.1.1.2 State: Active Adv Age: 00h00m12s Tag: 0 Priority: low Label: NULL QoSInfo: 0x0 IndirectID: 0x4 RelayNextHop: 0.0.0.0 Interface: Pos1/0/0 TunnelID: 0x0 Flags: D
Because the MED value of the route learnt from Router B is smaller, on Router A, the route to 4.4.4.4/32 selects the path RouterA→RouterB→RouterD. Because FRR is not configured, no backup information is available.
- Enabling BGP Auto FRR on Router A, and checking the routing information # Enable BGP Auto FRR on Router A.
<RouterA> system-view
[RouterA] bgp 100
[RouterA-bgp] ipv4-family unicast
[RouterA-bgp-af-ipv4] auto-frr
# After the configuration, run the display ip routing-table verbose command on Router A to check the routing information.
<RouterA> display ip routing-table 4.4.4.4 32 verbose Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Table : Public Summary Count : 1 Destination: 4.4.4.4/32 Protocol: BGP Process ID: 0 Preference: 255 Cost: 80 NextHop: 10.1.1.2 Neighbour: 10.1.1.2 State: Active Adv Age: 00h52m45s Tag: 0 Priority: low Label: NULL QoSInfo: 0x0 IndirectID: 0x4 RelayNextHop: 0.0.0.0 Interface: Pos1/0/0 TunnelID: 0x0 Flags: D BkNextHop: 10.2.1.2 BkInterface: Pos2/0/0 BkLabel: NULL SecTunnelID: 0x0 BkPETunnelID: 0x0 BkPESecTunnelID: 0x0 BkIndirectID: 0x2
The preceding information shows that Router A has a backup next hop and a backup outbound interface to 4.4.4.4/32.
Configuration Files
- Configuration file of Router A
# sysname RouterA # interface Pos1/0/0 ip address 10.1.1.1 255.255.255.0 # interface Pos2/0/0 ip address 10.2.1.1 255.255.255.0 # bgp 100 router-id 1.1.1.1 peer 10.1.1.2 as-number 200 peer 10.2.1.2 as-number 200 # ipv4-family unicast auto-frr # return
- Configuration file of Router B
# sysname RouterB # interface Pos1/0/0 ip address 10.1.1.2 255.255.255.0 # interface Pos2/0/0 ip address 10.3.1.1 255.255.255.0 # bgp 200 router-id 2.2.2.2 peer 10.1.1.1 as-number 100 peer 10.3.1.2 as-number 200 # ipv4-family unicast peer 10.1.1.1 route-policy rtb export # route-policy rtb permit node 10 apply cost 80 # return
- Configuration file of Router C
# sysname RouterC # interface Pos1/0/0 ip address 10.2.1.2 255.255.255.0 # interface Pos2/0/0 ip address 10.4.1.1 255.255.255.0 # bgp 200 router-id 3.3.3.3 peer 10.2.1.1 as-number 100 peer 10.4.1.2 as-number 200 # ipv4-family unicast peer 10.2.1.1 route-policy rtc export # route-policy rtc permit node 10 apply cost 120 # return
- Configuration file of Router D
# sysname RouterD # interface Pos1/0/0 ip address 10.3.1.2 255.255.255.0 # interface Pos2/0/0 ip address 10.4.1.2 255.255.255.0 # interface LoopBack1 ip address 4.4.4.4 255.255.255.255 # bgp 200 router-id 4.4.4.4 peer 10.3.1.1 as-number 200 peer 10.4.1.1 as-number 200 # ipv4-family unicast network 4.4.4.4 255.255.255.255 # return
#
Any one can tell how much effort this feature may take to implement.