CCNP实验:BGP抖动惩罚 二

Continue

原 因分析:

OSPF 管理距离 110 BGP EBGP 管理距离 20

路由走 BGP ,但是 OSPF 宣告的 1.1.1 .1 IGP 可达, BGP 利用 1.1.1.1 建立邻居

BGP 路由传输 1.1.1 .1 R2 上时, OSPF 宣告的 IGP 可达路由 1.1.1.1 被顶掉

BGP 邻居 DOWN 掉。过一段时间, OSPF 继续起用 BGP 邻居又建立成功,因此

BGP 的路由发生抖动。

 

解 决方法:

BGP 利用物理接口建立邻居

 

 

第 二种 BGP 抖动情况: OSPF IGP BGP 用物理接口建立邻居 环回口打开 关闭

配置命令:

r1#conf t

r1(config)#router bgp 123

r1(config-router )#no au

r1(config-router)#no sy

r1(config-router)#bgp router-id 1.1.1.1

r1(config-router)#neighbor 192.168.12.2 remote-as 456

r1(config-router)#net 1.1.1.1 m 255.255.255.255

r1(config-router-af)#^Z

 

r2#conf t

r2(config)#router bgp 456

r2(config-router)#no au

r2(config-router)#no sy

r2(config-router)#bgp router-id 2.2.2.2

r2(config-router)#neighbor 192.168.12.1 remote-as 123

r2(config-router-af)#^Z

 

通过 route-map 1.1.1 .1 流量观察 BGP 抖动路由情况

r2(config)#ip prefix-list 1 permit 1.1.1.1/32              // 配置 prefix-list 控制 1.1.1.1 流量

r2(config)#route-map damp permit 10                 // 配置 route-map

r2(config-route-map)#match ip add prefix-list 1          // 匹配 prefix-list

r2(config-route-map)#set dampening 15 750 2000 60    

// 匹配属性 4 个参数的缺省值分别是:半衰期: 15 分钟 开始抑制阀值: 2000                重新启用阀值: 750 最大抑制时间: 60 分钟

r2(config-route-map)#^Z

 

r2(config)#router bgp 456

r2(config-router)#bgp dampening                       // 启动 BGP 惩罚

r2(config-router)#neighbor 192.168.12.1 route-map damp in // 调用 route-map 控制流量

 

开 始通过 R1 宣告的 1.1.1 .1 路由在 R2 上显示为最优

r1(config)#int lo 0

r1(config-if)#shutdown

r2#show ip bgp

BGP table version is 5, local router ID is 2.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

h 1.1.1.1/32       192.168.12.1             0             0 123 i

//h 表示历史中出现过这条路由

 

r1(config)#int lo 0

r1(config-if)#no shutdown

 

r2#show ip bgp           

BGP table version is 4, local router ID is 2.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*> 1.1.1.1/32       192.168.12.1             0             0 123 i

// 环回口打开又出现最优路由

 

 

r1(config)#int lo 0

r1(config-if)#shutdown

r2#show ip bgp

BGP table version is 9, local router ID is 2.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*d 1.1.1 .1/32       192.168.12.1             0             0 123 i

//*d 表示路由被抑制

 

无忧网客联盟专业讨论网络技术,CCNA CCNP CCIE CCSP

文章转载至http://bbs.net527.cn   无忧网客联盟

无忧linux时代

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值