R0106-HP MSR Router Series Layer 3 - IP Routing Configuration Guide(V7)
321
Figure 74 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 route policies, apply_med_50 and apply_med_100. Policy apply_med_50 sets the
MED for route 1.1.1.0/24 to 50. Policy apply_med_100 sets that to 100.
[RouterA] route-policy apply_med_50 permit node 10
[RouterA-route-policy-apply_med_50-10] if-match ip address acl 2000
[RouterA-route-policy-apply_med_50-10] apply cost 50
[RouterA-route-policy-apply_med_50-10] quit
[RouterA] route-policy apply_med_100 permit node 10
[RouterA-route-policy-apply_med_100-10] if-match ip address acl 2000
[RouterA-route-policy-apply_med_100-10] apply cost 100
[RouterA-route-policy-apply_med_100-10] quit
# Apply routing policy apply_med_50 to routes outgoing to peer 3.0.2.2, and apply routing
policy apply_med_100 to routes outgoing to peer 2.0.2.2.
[RouterA] bgp 200
[RouterA-bgp] address-family ipv4 unicast
[RouterA-bgp-ipv4] peer 3.0.2.2 route-policy apply_med_50 export
GE2/1/1
2.0.1.1/24
GE2/1/2
2.0.2.2/24
Router A Router C
AS 200
Router D
GE2/1/1
2.0.1.2/24
GE2/1/2
2.0.2.1/24
GE2/1/2
3.0.1.1/24
GE2/1/2
3.0.1.2/24
GE2/1/1
3.0.2.1/24
GE2/1/1
3.0.2.2/24
Router B
AS 100 AS 300
1.1.1.0/24