CISCO 修改命令如下:
C-R1(config)#buffers small ?
initial Temporary buffers allocated at system reload max-free Maximum number of free buffers min-free Minimum number of free buffers permanent Number of permanent buffers 参数:
Permanent:永久缓存值 Min-free:最小缓存值 Max-free:最大缓存值
对等体组
对等体组在具有多个相同属性的neighbor 的时候特别有用,不仅是配置的简化。关键对于 各种路径属性个过滤规则等只要生成一份update 报文通告给不通的neighbor 即可了。可大 大减少生成的通告的数量,从而减少资源消耗。
快速外部切断
此功能针对EBGP(非多跳)。传统的BGP 是靠TCP 的保活来中断连接的,这个通常要等 180s 。当开启快速外部切断时,如果形成邻居关系的接口down则立即通告给BGPdown掉 邻居关系,从而加快了BGP收敛。但负面作用就是如果接口抖动,则给BGP造成频繁的连 接。
CISCO 配置如下:
bgp fast-external-fallover
也可在接口下配置,原则是接口优先于全局。
IGP和BGP的收敛交互
因IGP 的收敛速度通常比BGP 要快,有时候在IGP 已经收敛完成,而BGP 尚未收敛时会 造成瞬时的路由黑洞,ISIS 和OSPF 都提供了各自的解决方法。思路就是等BGP 收敛完成 后,IGP再通告自己正常的链路状态条目。
1、ISIS
ISIS采用了一个专用的overload位的方法,凡是overload被标记的条目,其他的路由器是不 会选择的(除非直连的)。 ISIS的配置:
C-R4(config-router)#set-overload-bit on-startup ?
<5-86400> Time in seconds to advertise ourself as overloaded after reboot
wait-for-bgp Let BGP decide when to unset the overload bit
建议不要用wait-for-bgp ,避免BGP 永远不收敛,而IGP 停留在overload 状态。而是直接 指定一个超时值,建议120s。
2、OSPF
OSPF采用的是设置最大度量的方法,在BGP收敛前OSPF通告的条目度量最大。 OSPF的配__________置:
C-R1(config-router)#max-metric router-lsa on-startup ?
<5-86400> Time, in seconds, router-LSAs are originated with max-metric wait-for-bgp Let BGP decide when to originate router-LSA with normal metric 也是建议不要用Wait-for-bap,原理同ISIS.
Graceful-restart
Graceful-restart功能是在BGP的OPEN协商阶段通过capability协商的。用于在对端重启时, 保持对端的状态,从而减少更新的数目。为了保证在对端重启时不发送流量给对端,BGP 使用了重启标志以及RIB结束标志等信息。 CISCO 配置如下:
C-R4(config-router)#bgp graceful-restart ?
restart-time Set the max time needed to restart and come back up
stalepath-time Set the max time to hold onto restarting peer's stale paths
Restart-time 重启时间,用于告诉对端自己重启需要多久。 Stalepath-time 最大路径保持时间。
Dampening
路由惩罚,当一条路由在BGP路由表中不断的出现消失时,会造成BGP路由表的动荡,从 而消耗更多的资源。BGP允许对摆动的路由进行惩罚。 CISCO 配置如下:
bgp dampening Half-life reusing suppressing Maximum-suppress-time 各参数如下:
Half-life:半衰期,每经过该时间惩罚值就减半。 Reusing:重用值,低于该数值时,路由被重用 Suppressing:抑制门限,超过该数值路由被抑制。
Maximum-suppress-time:最大抑制时间。超过该数值惩罚值不再增加。 以上参数的配置要满足下列公式:否则不会产生惩罚。 抑制门限<重用值*2*(最大抑制时间/半衰期)
Soft reconfiguration
在对BGP参数修改时有时候需要重新运行BGP会话,如果neighbor 过多,则可能造成较大 的资源消耗,甚至是路由抖动。Soft reconfiguration 允许不真正的重置BGP会话,而是温和 的重新应用策略。
Soft reconfiguration特性应用后,如果有过滤列表拒绝了对端的条目,那么该条目仍然保留 在BGP 路由表中,只是标记为received-only 。 CISCO 配置如下:
neighbor x.x.x.x soft-reconfiguration inbound
路由刷新
是一种替代Soft reconfiguration 特性的配置同样是在OPEN 的capability 中被协商,允许用 命令来软重置BGP会话,例如: C-R4#clear ip bgp peer-group inter ? in Soft reconfig inbound updates out Soft reconfig outbound updates
soft Soft reconfig inbound and outbound updates
检验BGP 路由刷新特性命令如下:
C-R4#show ip bgp neighbors
BGP neighbor is 10.0.0.1, remote AS 100, external link BGP version 4, remote router ID 172.100.1.254 BGP state = Established, up for 00:43:49
Last read 00:00:49, last write 00:00:49, hold time is 180, keepalive interval is 60 seconds Neighbor capabilities:
Route refresh: advertised and received(old & new) Address family IPv4 Unicast: advertised and received Graceful Restart Capability: advertised
传输侧环路检测
BGP缺省的环路检测机制是对接收到的路由条目中的AS_PATH 进行检查,如果有和自己的 AS 号相同的AS ID,则拒绝该条目,此特性可不应用与出口,譬如AS100 要在传输侧对 AS 200 进行环路检测,则可配置route-map如下: !
ip as-path access-list 1 deny _200_ ip as-path access-list 1 permit .* !
route-map toas200-loop-test permit 10 match as-path 1 !
router bgp 100
neighbor toas200 route-map toas200-loop-test out
ORF
如果AS 200 对另一个AS 100 实施了inbound方向的路径过滤。哪么AS100发送给AS200 的路由符合条件__Yz?C<-C_的就会被过滤掉,如果有一种方式让AS100实现就过滤掉而不发送给AS200
则可以节省更多的资源,ORF正是对这个特性进行协商的。也是由capability进行协商。 CISCO 配置如下:
C-R4(config-router)#neighbor x.x.x.x capability orf prefix-list ? both Capability to SEND and RECEIVE the ORF to/from this neighbor receive Capability to RECEIVE the ORF from this neighbor send Capability to SEND the ORF to this neighbor 对于peer-group来说只能用于send方向的ORF。 并且ORF仅对prefix-list有效。