296
[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
[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 the route advertised to 193.1.1.2 (Router C), and
apply routing policy
apply_med_100
to the route advertised to 192.1.1.2 (Router B).
[RouterA] bgp 100
[RouterA-bgp] address-family ipv4 unicast
[RouterA-bgp-ipv4] peer 193.1.1.2 route-policy apply_med_50 export
[RouterA-bgp-ipv4] peer 192.1.1.2 route-policy apply_med_100 export
[RouterA-bgp-ipv4] quit
[RouterA-bgp] quit