Feture Overview:
对每个peer的policy(如,route-map,distribute-list,prefix-list,filter-list等),可能会影响inbound或outbound的路由更新。每当policy变更时,必须重置BGP Session(reset),从而使它生效。
受影响的policy有:
* Additions or changes to the BGP-related access lists
* Changes to BGP-related weights
* Changes to BGP-related distribution lists
* Changes in the specifications of the BGP timer
* Changes to the BGP administrative distance
* Changes to BGP-related route maps
有两种reset方式:
(1)hard reset:
使用hard reset方式,会至使路由cache被清空,从而导致流量的中断。
(2)soft reset(recommended):
不用clear bgp session,从而达到reset的效果。
soft reset 是基于每neighbor实现的。
有两种soft reset方式:
1>dynamic inbound soft reset:产生inbound updates从邻居
旧的实现方式:
必须预先在router上配置命令:neighbor soft-reconfiguration 以指示IOS存储一份没有修改过的inbound updates,从而在clear ip bgp的时候用存储的updates信息产生一个新的inbound过滤updates,进而实现soft reset。此方式是memory-intensive,所以除非绝对需要,不推荐使用。
新的实现方式:
不依赖于存储一份没有修改过的inbound路由信息,也不需要任何的预先配置(neighbor soft-reconfiguration),有更小的memory消耗。
2>dynamic outbound soft reset:产生outbound updates到邻居
Outbound updates 没有memory的过多需要,也不需要任何配置实现。
Managing Routing Policy Changes:
新的feture允许在BGP peer之间动态的交换route refresh request和routing information,并随后重新advertise相应的outbound routing table.且它不需要预告的配置,消耗memory也比较少。
为了使用这个feture,两BGP router必须有处理它的capability,所以它们在给对方发送routing bable
update的OPEN 消息中通告这些参数,进而进行相应的检测。如果有一方不能支持此feture,那他们之间只
能使用old method方式时行soft reset。
新的feture只对inbound soft reset有效,outbound reset原来就不会消耗太多的memory.
优点:
Allows Dynamic Route Refresh Requests
通过在BGP routers之间动态交换route refresh requests,并随后re-advertise相应的outbound routing
tables,可以实现无中断路由policy变更。
Requires No Preconfiguration
无需其它的预先配置,简单使用clear ip bgp in 即可实现inbound soft reset.
Requires No Additional Memory Resources
因为soft reset请求被动态交换,且动态更新,所以不需要过多的memory去存放inbound routing updates的备份。
Flexibility
有两种可选的inbound soft reset方式。
old method使用存储inbound routing table updates的方式,new feture使用动态交换update
information方式。
限制:
Route Refresh Support for BGP Peers
BGP peers必须支持此route refresh capability才能使用此inbound soft reset feture.
如果一端不支持此feture,那么只能使用old method用预先配置neighbor soft-reconfiguration命令实现存储备份routing table updates的方式。
Dynamic and Stored Inbound Soft Reset Functions are Mutually Exclusive
dynamic inbound soft reset与inbound soft reset using sotred information这两种方式只能使用一种,它们是互不兼容的,不能同时配置的。
支持:
Supported Platforms
* Cisco 1003
* Cisco 1004
* Cisco 1005
* Cisco 1600 series
* Cisco 2500 series
* Cisco 3600 series
* Cisco 3800 series
* Cisco 4000 series (Cisco 4000, 4000-M, 4500, 4500-M, 4700, 4700-M)
* Cisco 5200 series
* Cisco 7000 series
* Cisco 7200 series
* Cisco 7500 series
配置:
(1) Configuring BGP Dynamic Inbound Soft Reset
如果peer两端都支持route refresh capability,那就可以实现dynamic soft inbound reset feture。它有两个优点:
1>不需要预先的配置.
2>不需要过多的memory存储routing update information.
使用命令:show ip bgp neighbors [ip-address]查看peer是否支持此capability,如果支持,它会显示一条信息:
Received route refresh capability from peer.
这样我们可以使用inbound soft reset了:
Router# clear ip bgp {* | address | peer-group-name} soft in
outbound soft reset使用命令:
clear ip bgp {* | address | peer-group-name} soft out
注:outbound soft reset不用任何的feture支持,且不会导致大量的memory占用。
(2)Configuring BGP Soft Reset Using Stored Routing Policy Information
如果所有的routers都不支持route refresh capability,那就只能使用old method的soft reset,通过从以前保存的没有修改过的inbound updates,产生新的routing table updates。
初始化一个storage of inbound routing table updates,必须预先配置router使用命令:neighbor soft-reconfiguration
注:存储inbound update information所需要的memory可能什么非常大。
配置以每个peer为基础:
Router config# neighbor {ip-address |peer-group-name} soft-reconfiguration inbound
当你为一个peer或一个peer group初始化了一个storage of inbound routing table updates时,可以使用下面命令对那个peer或peer group实现一个soft inbound reset。
Router config# clear ip bgp {* | address | peer-group�Cname} soft in
验证bgp soft reset:
Router# show ip bgp neighbors
BGP neighbor is 10.4.9.8, remote AS 101, internal link
BGP version 4, remote router ID 10.4.9.8
BGP state = Established, up for 00:03:50
Last read 00:00:50, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new) //说明peer支持此新Feture
Address family IPv4 Unicast: advertised and received
Received 7 messages, 0 notifications, 0 in queue
Sent 7 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Route refresh request: received 0, sent 0
0 accepted prefixes consume 0 bytes
Prefix advertised 0, suppressed 0, withdrawn 0
Number of NLRIs in the update sent: max 0, min 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 10.4.9.21, Local port: 179
Foreign host: 10.4.9.8, Foreign port: 11004
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x134F4D2B4):
Timer Starts Wakeups Next
Retrans 8 0 0x0
TimeWait 0 0 0x0
AckHold 7 3 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 4229692689 snduna: 4229692849 sndnxt: 4229692849 sndwnd: 16225
irs: 339739239 rcvnxt: 339739399 rcvwnd: 16225 delrcvwnd: 159
SRTT: 540 ms, RTTO: 3809 ms, RTV: 1364 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
Datagrams (max data segment is 1460 bytes):
Rcvd: 10 (out of order: 0), with data: 7, total data bytes: 159
Sent: 11 (retransmit: 0, fastretransmit: 0), with data: 7, total data bytes: 159
如果两peers都支持此dynamic route refresh capability,就可以使用命令:
clear ip bgp {*|address|peer-groupname} in
实现dynamic inbound soft reset,并且命令中不用指定soft参数,因为当route refresh capability被支持,soft reset是自动被应用的。
配置实例:
(1)Inbound Soft Reset Using Stored Information
目标:开启neighbor 131.108.1.1的inbound soft reconfiguration.
说明:所有的从那个邻居收到的updates都会被无修改的保存一个备份,无论使用什么inboun policy.当后
边实现inbound soft reconfiguration的时候,存储的routing information被用来产生一系列新的inbound updates.
preconfiguration:
router bgp 100
neighbor 131.108.1.1 remote-as 200
neighbor 131.108.1.1 soft-reconfiguration inbound
inbound soft reset:
clear ip bgp 131.108.1.1 soft in
命令指南:
show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes |
{paths regexp} |dampened-routes]
语法说明:
neighbor-address(Optional) 指定显示哪个neighbor的信息,如果不指定则显示所有neighbor的信息。
received-routes(Optional) 显示所有从此neighbor收到的routes (both accepted and rejected)。
routes(Optional) 显示从此neighbor收到的被accepted的routes.
advertised-routes(Optional) 显示所有本地router发送给那个neighbor的 routes。
paths regexp (Optional) Regular expression that is used to match the paths received.
dampened-routes(Optional) Displays the dampened routes to the neighbor at the IP address
specified.
实例:
Router# show ip bgp neighbors 172.16.232.178 advertised-routes
BGP table version is 27, local router ID is 172.16.232.181
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i110.0.0.0 172.16.232.179 0 100 0 ?
*> 200.2.2.0 0.0.0.0 0 32768 i
Router# show ip bgp neighbors 172.16.232.178 routes
BGP table version is 27, local router ID is 172.16.232.181
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0 172.16.232.178 40 0 10 ?
*> 20.0.0.0 172.16.232.178 40 0 10 ?
本文出自 “SENSE” 博客,转载请与作者联系!