H3C Technologies H3C SecPath F1000-E User Manual
Page 519
494
Method I: Specify a higher MED value for the route 1.0.0.0/8 advertised to 192.1.1.2 to make
SecPath D give priority to the route learned from SecPath C.
# Define ACL 2000 to permit the route 1.0.0.0/8
[SecPathA] acl number 2000
[SecPathA-acl-basic-2000] rule permit source 1.0.0.0 0.255.255.255
[SecPathA-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.
[SecPathA] route-policy apply_med_50 permit node 10
[SecPathA-route-policy] if-match acl 2000
[SecPathA-route-policy] apply cost 50
[SecPathA-route-policy] quit
[SecPathA] route-policy apply_med_100 permit node 10
[SecPathA-route-policy] if-match acl 2000
[SecPathA-route-policy] apply cost 100
[SecPathA-route-policy] quit
# Apply routing policy apply_med_50 to the route advertised to 193.1.1.2 (SecPath C), and
apply routing policy apply_med_100 to the route advertised to 192.1.1.2 (SecPath B).
[SecPathA] bgp 100
[SecPathA-bgp] peer 193.1.1.2 route-policy apply_med_50 export
[SecPathA-bgp] peer 192.1.1.2 route-policy apply_med_100 export
[SecPathA-bgp] quit
# Display the BGP routing table on SecPath D.
[SecPathD] display bgp routing-table
Total Number of Routes: 2
BGP Local router ID is 194.1.1.1
Status codes: * - valid, ^ - VPNv4 best, > - best, d – damped,
h – history, i – internal, s – suppressed, S – Stale
Origin : i – IGP, e – EGP, ? – incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 1.0.0.0 193.1.1.1 50 100 0 100i
* i 192.1.1.1 100 100 0 100i
The route 1.0.0.0/8 learned from SecPath C is the optimal.
Method II: Specify different local preferences for route 1.0.0.0/8 on SecPath B and C to make
SecPath D give priority to the route learned from SecPath C.
# Define ACL 2000 to permit the route 1.0.0.0/8 on SecPath C.
[SecPathC] acl number 2000
[SecPathC-acl-basic-2000] rule permit source 1.0.0.0 0.255.255.255
[SecPathC-acl-basic-2000] quit
# Define routing policy localpref on SecPath C to set the local preference of route 1.0.0.0/8 to
200 (the default is 100).
[SecPathC] route-policy localpref permit node 10
[SecPathC-route-policy] if-match acl 2000
[SecPathC-route-policy] apply local-preference 200
- H3C SecPath F5000-A5 Firewall H3C SecPath F1000-A-EI H3C SecPath F1000-E-SI H3C SecPath F1000-S-AI H3C SecPath F5000-S Firewall H3C SecPath F5000-C Firewall H3C SecPath F100-C-SI H3C SecPath F1000-C-SI H3C SecPath F100-A-SI H3C SecBlade FW Cards H3C SecBlade FW Enhanced Cards H3C SecPath U200-A U200-M U200-S H3C SecPath U200-CA U200-CM U200-CS H3C SecBlade LB Cards H3C SecPath L1000-A Load Balancer