R0106-HP MSR Router Series Layer 3 - IP Routing Configuration Guide(V7)
317
# Inject network 1.0.0.0/8 into the BGP routing table of Router A.
[RouterA-bgp-ipv4] network 1.0.0.0 8
[RouterA-bgp-ipv4] quit
[RouterA-bgp] quit
# Configure Router B.
[RouterB] bgp 200
[RouterB-bgp] peer 192.1.1.1 as-number 100
[RouterB-bgp] peer 194.1.1.1 as-number 200
[RouterB-bgp] address-family ipv4 unicast
[RouterB-bgp-ipv4] peer 192.1.1.1 enable
[RouterB-bgp-ipv4] peer 194.1.1.1 enable
[RouterB-bgp-ipv4] quit
[RouterB-bgp] quit
# Configure Router C.
[RouterC] bgp 200
[RouterC-bgp] peer 193.1.1.1 as-number 100
[RouterC-bgp] peer 195.1.1.1 as-number 200
[RouterC-bgp] address-family ipv4 unicast
[RouterC-bgp-ipv4] peer 193.1.1.1 enable
[RouterC-bgp-ipv4] peer 195.1.1.1 enable
[RouterC-bgp-ipv4] quit
[RouterC-bgp] quit
# Configure Router D.
[RouterD] bgp 200
[RouterD-bgp] peer 194.1.1.2 as-number 200
[RouterD-bgp] peer 195.1.1.2 as-number 200
[RouterD-bgp] address-family ipv4 unicast
[RouterD-bgp-ipv4] peer 194.1.1.2 enable
[RouterD-bgp-ipv4] peer 195.1.1.2 enable
[RouterD-bgp-ipv4] quit
[RouterD-bgp] quit
4. Configure different attribute values for the route 1.0.0.0/8 to make Router D give priority to the
route learned from Router C:
{ (Method 1.) Specify a higher MED value for the route 1.0.0.0/8 advertised to 192.1.1.2 to make
Router D give priority to the route learned from Router C:
# Define ACL 2000 to permit the route 1.0.0.0/8.
[RouterA] acl number 2000
[RouterA-acl-basic-2000] rule permit source 1.0.0.0 0.255.255.255
[RouterA-acl-basic-2000] quit
# Define routing policy apply_med_50 that sets the MED value of route 1.0.0.0/8 to 50, and
routing policy apply_med_100 that sets the MED value of route 1.0.0.0/8 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