R1环回到R5走R2走,R5环回到R1走R3走(二)

R1环回到R5走R2走,R5环回到R1走R3走(二)

牢记MAD只能在ebgp上用并且越小越优,local pre 只能在ibgp上用并且越大越优,as path 两个都能用是越小越优。
访问控制列表
[R3]acl 2000
[R3-acl-basic -2000]rule permit source 1.1.1.1 0.0.0.0
[R3-acl-basic -2000]q
[R3-acl-basic -2000]route-policy
[R2]acl 2000
[R2-acl-basic -2000]rule permit source 1.1.1.1 0.0.0.0
[R2-acl-basic -2000]q
[R2]route-policy as permit node 10
Info:New Sequence of this List
[R2-route-policy]if-match acl 2000
[R2-route-policy]apply as-path 222 333 444 additive
[R2-route-policy]quit
[R2]rou-policy as permit node 20
Info:New Sequence of this List
[R2-route-policy]q
[R2]bgp 200
[R2-bgp]peer 4.4.4.4 route-policy as export
[R2-bgp]return
reset bgm all
display bgp peer
[R4]display bgp rou
[R5]tracert 1.1.1.1