合理规划ip 配bgp 和ospf
AS2区域 配置ospf
R2‘
R3
R4
R5
R6
bgp
R1
R2
R3
R4
R5
R6
干涉选路
[r2]ip ip-prefix as permit 1.1.1.0 24
[r2]route-policy as permit node 10
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix as
[r2-route-policy]apply as-path 3 4 5 additive
[r2]route-policy as permit node 20
Info: New Sequence of this List.
[r2]bgp 2
[r2-bgp]peer 12.1.1.1 route-policy as import
[r3]ip ip-prefix as permit 1.1.2.0 24
[r3]route-policy as permit node 10
Info: New Sequence of this List.
[r3-route-policy]if-match ip-prefix as
[r3-route-policy]apply as-path 3 4 5 additive
[r3-route-policy]q
[r3]route-policy as permit node 20
Info: New Sequence of this List.
[r3]bgp
[r3-bgp]peer 13.1.1.1 route-policy as import
负载分担
[r5]ip ip-prefix l permit 1.1.1.0 24
[r5]route-policy l permit node 10
[r5-route-policy]apply local-preference 101
[r5-route-policy]if-match ip-prefix l
[r5-route-policy]q
[r5]route-policy l permit node 20
[r5-route-policy]q
[r5]bgp 2
[r5-bgp]peer 6.6.6.6 route-policy l import