Cisco配置实例BGP的各种属性配置是什么?
实验目的:
1、掌握使用指向NULL0接口的静态路由的汇总配置方法。
2、掌握使用聚合属性的路由汇总配置方法。
R1(config)#ip route 172。16。0。0 255。255。 252。0 null 0
R1(config)#router bgp 64512
R1(config-router)#aggregate-address 172。16。0。0 255。255。 252。0 summary-only
Lab 33。 BGP Neighbor Authentication
实验目的:
1、掌握其于MD5的BGP对等体认证配置。
R1(config)#router bg...全部
实验目的:
1、掌握使用指向NULL0接口的静态路由的汇总配置方法。
2、掌握使用聚合属性的路由汇总配置方法。
R1(config)#ip route 172。16。0。0 255。255。
252。0 null 0
R1(config)#router bgp 64512
R1(config-router)#aggregate-address 172。16。0。0 255。255。
252。0 summary-only
Lab 33。 BGP Neighbor Authentication
实验目的:
1、掌握其于MD5的BGP对等体认证配置。
R1(config)#router bgp 64512
R1(config-router)#neighbor 10。
1。255。2 password cisco123
R2(config)#router bgp 64513
R2(config-router)#neighbor 10。1。255。1 password cisco123
Lab 34。
Configuring BGP Local Preference
实验目的:
1、理解掌握BGP的本地优选属性概念和配置方法。
2、本地优选的属性默认值为100,较高值的路径会被优先选择。
3、本地优先属性,决定离开本自治系统最佳的路径。
(BGP在选择最佳路由时,并不会考具体链路的带宽。为了解决这一问题,可以在本
地配置“本地优先”来确定数据流如何流出本自治系统。BGP会优先选择本地优先
属性值较高的路由。
)
R4(config)#router bgp 64513
R4(config-router)#bgp default local-preference 200
R4(config-router)#exit
R4(config)#
(BGP在向IBGP对等体通告路由时,其下一跳不变,这种机制被称为BGP的下一跳属
性。
)
R4(config)#router bgp 64513
R4(config-router)#neighbor 10。1。1。1 next-hop-self
Lab 35。 Using Route Maps to Configuring BGP Local Preference
实验目的:
1、掌握基于route-map的本地优先配置方法。
2、使用route-map配置可以定置基于目标网络的本地优先。
(本地优先会影响数据流如何流出本地自治系统。BGP的选路规则:EBGP对等体通告
的路由优于IBGP对等体通告的路由。)
R4(config)#access-list 1 permit 130。
130。1。0 0。0。0。255
R4(config)#
R4(config)#route-map set_lp permit 10
R4(config-route-map)#match ip address 1
R4(config-route-map)#set local-preference 200
R4(config-route-map)#exit
R4(config)#
R4(config)#route-map set_lp permit 20
R4(config-route-map)#exit
R4(config)#
R4(config)#router bgp 64513
R4(config-router)#neighbor 192。
168。2。2 route-map set_lp in
R4(config-router)#exit
R4(config)#exit
R4#
R4#clear ip bgp * soft in
R4#
Lab 36。
Configuring BGP Multi-Exit Discriminator
实验目的:
1、理解MED属性能够影响,其它的自治系统的数据流如何流入本地自治系统。
2、掌握基于route-map的MED配置方法。
(MED属性可以实现:影响其它的自治系统的数据流,如何流入本地自治系统。根据
MED的属性值越低的哪条路由,会被优先选择的特性。而且MED值默认为0。)
R2(config)#access-list 1 permit 130。
130。1。0 0。0。0。255
R2(config)#
R2(config)#route-map set_med permit 10
R2(config-route-map)#match ip address 1
R2(config-route-map)#set metric 100
R2(config-route-map)#exit
R2(config)#
R2(config)#route-map set_med permit 20
R2(config-route-map)#exit
R2(config)#
R2(config)#router bgp 64512
R2(config-router)#neighbor 192。
168。1。2 route-map set_med out
R2(config-router)#exit
R2(config)#
R2#
R2#clear ip bgp * soft out
R2#
Lab 37。
Configuring BGP Weight
实验目的:
1、当本地出口路由器,有多条外出自治系统的链路时,应用权重(Weight)属性能够
决定数据流从本地路由器哪条出口链路流出本地自治系统。
2、权重(Weight)属性为Cisco私有属性。
(BGP的选路规则:
1、最先收到路由优先于后收到的路由。
2、优先选择BGP的
Router-ID较低的路由。)
R1(config)#router bgp 64512
R1(config-router)#neighbor 192。
168。4。1 weight 100
R1(config-router)#neighbor 192。168。1。2 weight 50
R1(config-router)#exit
R1#clear ip bgp * soft
R1(config)#access-list 1 permit 150。
150。1。0 0。0。0。255
R1(config)#
R1(config)#route-map set_weight permit 10
R1(config-route-map)#match ip address 1
R1(config-route-map)#set weight 100
R1(config-route-map)#exit
R1(config)#
R1(config)#
R1(config)#route-map set_weight permit 20
R1(config-route-map)#exit
R1(config)#
R1(config)#router bgp 64512
R1(config-router)#neighbor 192。
168。4。1 route-map set_weight in
R1(config-router)#exit
R1(config)#exit
R1#clear ip bgp * soft
R1#。
收起