298
The route 1.0.0.0/8 learned from Router C is the optimal route.
BFD for BGP configuration example
Network requirements
As shown in
Figure 70
,
•
Run OSPF in AS 200.
•
Establish two IBGP connections between Router A and Router C. When both paths are working,
Router C adopts the path Router A<—>Router B<—>Router C to communicate with network
1.1.1.0/24. Configure BFD over the path. If the path fails, BFD can quickly detect the failure and
notify it to BGP. Then the path Router A<—>Router D<—>Router C takes effect immediately.
Figure 70
Network diagram
Configuration procedure
1.
Configure IP addresses for interfaces. (Details not shown.)
2.
Configure OSPF so that Router A and Router C can reach each other. (Details not shown.)
3.
Configure BGP on Router A:
# Establish two IBGP connections to Router C.
<RouterA> system-view
[RouterA] bgp 200
[RouterA-bgp] peer 3.0.2.2 as-number 200
[RouterA-bgp] peer 2.0.2.2 as-number 200
[RouterA-bgp] address-family ipv4 unicast
[RouterA-bgp-ipv4] peer 3.0.2.2 enable
[RouterA-bgp-ipv4] peer 2.0.2.2 enable
[RouterA-bgp-ipv4] quit
# Create ACL 2000 to permit 1.1.1.0/24 to pass.
[RouterA] acl number 2000
[RouterA-acl-basic-2000] rule permit source 1.1.1.0 0.0.0.255
[RouterA-acl-basic-2000] quit
# Create two routing policies to set the MED for route 1.1.1.0/24. The policy
apply_med_50
sets
the MED to 50, and the policy
apply_med_100
sets the MED to 100.
GE1/0
2.0.1.1/24
GE2/0
2.0.2.2/24
Router A
Router C
AS 200
Router D
GE1/0
2.0.1.2/24
GE2/0
2.0.2.1/24
GE2/0
3.0.1.1/24
GE2/0
3.0.1.2/24
GE1/0
3.0.2.1/24
GE1/0
3.0.2.2/24
Router B
AS 100
AS 300
1.1.1.0/24