BGP路由实验

BGP路由实验_第1张图片

 要求1    使用 Preval 策略

[r4]ip ip-prefix PV permit 192.168.10.0 24
[r4]route-policy PV permit node 10
[r4-route-policy]if-match ip-prefix PV
[r4-route-policy]apply preferred-value 100
[r4]route-policy PV permit node 20
[r4-bgp]peer 24.0.0.2 route-policy PV import 
要求2   使用 AS Path 策略

[r2]ip ip-prefix AS permit 192.168.11.0 24
[r2]route-policy aa permit node 10
[r2-route-policy]if-match ip-prefix AS
[r2-route-policy]apply as-path 10 additive  
[r2-bgp]peer 24.0.0.4 route-policy aa import
要求3   配置 MED 策略

[r2]ip ip-prefix MED permit 192.168.12.0 24
[r2]route-policy aa permit node 20
[r2-route-policy]if-match ip-prefix MED
[r2-route-policy]apply cost 10
[r2]route-policy aa permit node 30
[r2-bgp]peer 24.0.0.4 route-policy aa export

要求4  配置Local Preference 策略
[r1]ip ip-prefix LP1 permit 192.168.1.0 24
[r1]route-policy bb permit node 10
[r1-route-policy]if-match ip-prefix LP1
[r1-route-policy]apply local-preference 200
[r1-bgp]peer 2.2.2.2 route-policy bb import

要求5  配置 Local Preference 策略

[r1]ip ip-prefix LP2 permit 192.168.2.0 24
[r1]route-policy bb permit node 20
[r1-route-policy]if-match ip-prefix LP2
[r1-route-policy]apply local-preference 200
[r1]route-policy bb permit node 30
[r1-bgp]peer 3.3.3.3 route-policy bb import
要求6  配置负载均衡

[r1-bgp]maximum load-balancing 2

要求7  配置AS 策略

你可能感兴趣的:(网络,运维,网络协议)