[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 12.12.12.1 as-number 100 [R2-bgp]peer 24.24.24.4 as-number 200 [R2-bgp]peer 24.24.24.4 next-hop-local
[R3]bgp 200
[R3-bgp]router-id 3.3.3.3
[R3-bgp]peer 13.13.13.1 as-number 100 [R3-bgp]peer 34.34.34.4 as-number 200 [R3-bgp]peer 34.34.34.4 next-hop-local
[R4]bgp 200
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 24.24.24.2 as-number 200 [R4-bgp]peer 24.24.24.2 reflect-client [R4-bgp]peer 34.34.34.3 as-number 200 [R4-bgp]peer 34.34.34.3 reflect-client [R4-bgp]network 4.4.4.4 255.255.255.255 ? 在R4上查看BGP路由表:
? 在R1上查看BGP路由表:
注:保持上面的配置不变,完成下面实验要求: 1.AS_path属性配置
实验要求:默认1.1.1.1/32条目经由R2转发;下面通过改变
AS_PATH属性,实现1.1.1.1/32条目经由R3转发。
主要配置:
[R1]acl number 2000
[R1-acl-basic-2000]rule 0 permit source 1.1.1.0 0.0.0.255 [R1]route-policy p1 permit node 10 [R1-route-policy]if-match acl 2000 [R1-route-policy]apply as-path 10 20 30 [R1]bgp 100
[R1-bgp]peer 12.12.12.2 route-policy p1 export
? 在R4上查看BGP路由表:1.1.1.1/32条目已经经由R3转发了。
2.Local_pref属性配置
实验要求:默认1.1.1.1/32是经由R2转发的;下通过改变Local_pref
属性,让其经由R3转发。
主要配置:
[R2]bgp 200
[R2-bgp]default local-preference 200 [R3]bgp 200
[R3-bgp]default local-preference 500
? 在R4上查看BGP路由表:1.1.1.1/32已经经由R3转发。
3.MED属性配置
实验要求:默认4.4.4.4/32条目是经由R2转发的;下面我们通过修
改MED值,让其经由R3转发。
主要配置:
[R2]bgp 200
[R2-bgp]default med 100 [R3]bgp 200
[R3-bgp]default med 10
? 在R1上查看BGP路由表:4.4.4.4/32已经经由R3转发。
4.Preferred-value属性配置
实验要求:默认4.4.4.4/32是经由R2转发的;下面我们通过修改
preferred-value值,让其经由R3转发。
主要配置:
[R1]bgp 100
[R1-bgp] peer 12.12.12.2 preferred-value 20 [R1-bgp] peer 13.13.13.3 preferred-value 80
? 在R1上查看BGP路由表:4.4.4.4/32已经经由R3转发。
相关推荐: