BGP-MED-2
如图:当AS100去往AS300的60、10的网络时,60走R3,10走R1!使用MED属性影响选路!
R2的配置
bgp 200
peer 1.1.1.1 as-number 100
peer 1.1.1.1 ebgp-max-hop 255
peer 1.1.1.1 connect-interface LoopBack0
peer 4.4.4.4 as-number 200
peer 4.4.4.4 connect-interface LoopBack0
peer 5.5.5.5 as-number 200
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
peer 1.1.1.1 route-policy 10 export
peer 4.4.4.4 enable
peer 4.4.4.4 next-hop-local
peer 5.5.5.5 enable
peer 5.5.5.5 next-hop-local
route-policy 10 permit node 10
if-match acl 2000
apply cost 100
route-policy 10 permit node 20
acl nu 2000
ru per so 60.1.0.0 0.0.255.255
R1路由表
转载于:https://blog.51cto.com/9616635/2063609