配置平滑重启
请按照以下步骤在设备上配置平稳重启。
启用平滑重启
默认情况下,平滑重启处于禁用状态。您必须在 [edit routing-options]
或 [edit routing-instances instance-name routing-options]
层级配置平滑重启,才能全局启用该功能。
例如:
routing-options { graceful-restart; }
您可以选择在单个协议级别修改全局设置,或者从 Junos OS 15.1 开始,在单个路由实例级别修改全局设置。
如果在建立 BGP 或 LDP 会话后配置平稳重启,则 BGP 或 LDP 会话将重新启动,并且对等方协商平稳重启功能。
要禁用平滑重启,请包含语disable
句。您可以通过在[edit routing-options]
层次结构级别包含disable
语句来对所有协议执行全局执行此操作,也可以通过在[edit protocols protocol graceful-restart]
层次结构级别包含 disable 语句来禁用单个协议的正常重启。要配置完全重新启动的时间段,请包含语restart-duration
句。您可以指定一个介于 120 和 900 之间的数字。
有关可包含此语句的层次结构级别的列表,请参阅此语句的语句摘要部分。
在[edit routing-options]
层次结构级别包含graceful-restart
语句时,还会为聚合路由和静态路由启用平稳重启。
另见
配置平滑重启
要启用平稳重新启动,请在 [edit routing-instance instance-name routing-options]
或 [edit routing-options]
层次结构级别包含graceful-restart
语句。这样就可以对所有路由协议进行全局平稳重启。您可以选择在各个协议级别修改或补充全局设置。
当配置为接受动态 BGP 会话时 set protocols bgp group group-name allow network
, unconfigured-peer-graceful-restart
应将语句配置为避免在平稳重启或平稳路由引擎切换期间丢弃流量。
例如:
protocols { bgp { group ext { graceful-restart { restart-time 400; } } } } routing-options { graceful-restart; }
图 1 显示了一个标准 MPLS VPN 网络。路由器 CE1 和 CE2 是客户边缘路由器,PE1 和 PE2 是提供商边缘路由器,P0 是提供商核心路由器。此网络中配置了多个第 3 层 VPN 和一个第 2 层 VPN。接口如图所示,不包含在下面的配置示例中。

路由器 CE1
在路由器 CE1 上,在 t3-3/1/0 的逻辑接口上配置以下协议:单元 101 上的 OSPF、单元 102 上的 RIP、单元 103 上的 BGP 和单元 512 上的 IS-IS。同时在主实例上配置平稳重启、BGP、IS-IS、OSPF 和 RIP,以便能够连接到路由器 PE1 上的路由实例。
[edit] interfaces { t3-3/1/0 { encapsulation frame-relay; unit 100 { dlci 100; family inet { address 10.96.100.2/30; } } unit 101 { dlci 101; family inet { address 10.96.101.2/30; } } unit 102 { dlci 102; family inet { address 10.96.102.2/30; } } unit 103 { dlci 103; family inet { address 10.96.103.2/30; } } unit 512 { dlci 512; family inet { address 10.96.252.1/30; } } } lo0 { unit 0 { family inet { address 10.245.14.172/32; primary; } address 10.96.110.1/32; address 10.96.111.1/32; address 10.96.112.1/32; address 10.96.113.1/32; address 10.96.116.1/32; } family iso { address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4172.00; } } } routing-options { graceful-restart; autonomous-system 65100; } protocols { bgp { group CE-PE-INET { type external; export BGP_INET_LB_DIRECT; neighbor 10.96.103.1 { local-address 10.96.103.2; family inet { unicast; } peer-as 65103; } } } isis { export ISIS_L2VPN_LB_DIRECT; interface t3-3/1/0.512; } ospf { export OSPF_LB_DIRECT; area 0.0.0.0 { interface t3-3/1/0.101; } } rip { group RIP { export RIP_LB_DIRECT; neighbor t3-3/1/0.102; } } } policy-options { policy-statement OSPF_LB_DIRECT { term direct { from { protocol direct; route-filter 10.96.101.0/30 exact; route-filter 10.96.111.1/32 exact; } then accept; } term final { then reject; } } policy-statement RIP_LB_DIRECT { term direct { from { protocol direct; route-filter 10.96.102.0/30 exact; route-filter 10.96.112.1/32 exact; } then accept; } term final { then reject; } } policy-statement BGP_INET_LB_DIRECT { term direct { from { protocol direct; route-filter 10.96.103.0/30 exact; route-filter 10.96.113.1/32 exact; } then accept; } term final { then reject; } } policy-statement ISIS_L2VPN_LB_DIRECT { term direct { from { protocol direct; route-filter 10.96.116.1/32 exact; } then accept; } term final { then reject; } } }
路由器 PE1
在路由器 PE1 上,在主实例中配置平滑重启以及 BGP、OSPF、MPLS 和 LDP。接下来,配置多个特定于协议的平稳重启实例。通过包括 BGP、OSPF、第 2 层 VPN、RIP 和静态路由的实例,您可以观察到在实施平滑重启时可用的各种选项。在 t3-0/0/0 的逻辑接口上的各个实例中配置以下协议:单元 100 上的静态路由、单元 101 上的 OSPF、单元 102 上的 RIP、单元 103 上的 BGP 以及单元 512 上的帧中继对于第 2 层 VPN 实例。
[edit] interfaces { t3-0/0/0 { dce; encapsulation frame-relay-ccc; unit 100 { dlci 100; family inet { address 10.96.100.1/30; } family mpls; } unit 101 { dlci 101; family inet { address 10.96.101.1/30; } family mpls; } unit 102 { dlci 102; family inet { address 10.96.102.1/30; } family mpls; } unit 103 { dlci 103; family inet { address 10.96.103.1/30; } family mpls; } unit 512 { encapsulation frame-relay-ccc; dlci 512; } } t1-0/1/0 { unit 0 { family inet { address 10.96.0.2/30; } family mpls; } } lo0 { unit 0 { family inet { address 10.245.14.176/32; } family iso { address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4176.00; } } } } routing-options { graceful-restart; router-id 10.245.14.176; autonomous-system 69; } protocols { mpls { interface all; } bgp { group PEPE { type internal; neighbor 10.245.14.182 { local-address 10.245.14.176; family inet-vpn { unicast; } family l2vpn { unicast; } } } } ospf { area 0.0.0.0 { interface t1-0/1/0.0; interface fxp0.0 { disable; } interface lo0.0 { passive; } } } ldp { interface all; } } policy-options { policy-statement STATIC-import { from community STATIC; then accept; } policy-statement STATIC-export { then { community add STATIC; accept; } } policy-statement OSPF-import { from community OSPF; then accept; } policy-statement OSPF-export { then { community add OSPF; accept; } } policy-statement RIP-import { from community RIP; then accept; } policy-statement RIP-export { then { community add RIP; accept; } } policy-statement BGP-INET-import { from community BGP-INET; then accept; } policy-statement BGP-INET-export { then { community add BGP-INET; accept; } } policy-statement L2VPN-import { from community L2VPN; then accept; } policy-statement L2VPN-export { then { community add L2VPN; accept; } } community BGP-INET members target:69:103; community L2VPN members target:69:512; community OSPF members target:69:101; community RIP members target:69:102; community STATIC members target:69:100; } routing-instances { BGP-INET { instance-type vrf; interface t3-0/0/0.103; route-distinguisher 10.245.14.176:103; vrf-import BGP-INET-import; vrf-export BGP-INET-export; routing-options { graceful-restart; autonomous-system 65103; } protocols { bgp { group BGP-INET { type external; export BGP-INET-import; neighbor 10.96.103.2 { local-address 10.96.103.1; family inet { unicast; } peer-as 65100; } } } } } L2VPN { instance-type l2vpn; interface t3-0/0/0.512; route-distinguisher 10.245.14.176:512; vrf-import L2VPN-import; vrf-export L2VPN-export; protocols {# There is no graceful-restart statement for Layer 2 VPN instances. l2vpn { encapsulation-type frame-relay; site CE1-ISIS { site-identifier 512; interface t3-0/0/0.512 { remote-site-id 612; } } } } } OSPF { instance-type vrf; interface t3-0/0/0.101; route-distinguisher 10.245.14.176:101; vrf-import OSPF-import; vrf-export OSPF-export; routing-options { graceful-restart; } protocols { ospf { export OSPF-import; area 0.0.0.0 { interface all; } } } } RIP { instance-type vrf; interface t3-0/0/0.102; route-distinguisher 10.245.14.176:102; vrf-import RIP-import; vrf-export RIP-export; routing-options { graceful-restart; } protocols { rip { group RIP { export RIP-import; neighbor t3-0/0/0.102; } } } } STATIC { instance-type vrf; interface t3-0/0/0.100; route-distinguisher 10.245.14.176:100; vrf-import STATIC-import; vrf-export STATIC-export; routing-options { graceful-restart; static { route 10.96.110.1/32 next-hop t3-0/0/0.100; } } } }
路由器 P0
在路由器 P0 上,在主实例中配置平稳重启,以及 OSPF、MPLS 和 LDP。这使得 PE 路由器上的协议能够相互通信。
[edit] interfaces { t3-0/1/3 { unit 0 { family inet { address 10.96.0.5/30; } family mpls; } } t1-0/2/0 { unit 0 { family inet { address 10.96.0.1/30; } family mpls; } } lo0 { unit 0 { family inet { address 10.245.14.174/32; } family iso { address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4174.00; } } } } routing-options { graceful-restart; router-id 10.245.14.174; autonomous-system 69; } protocols { mpls { interface all; } ospf { area 0.0.0.0 { interface t1-0/2/0.0; interface t3-0/1/3.0; interface fxp0.0 { disable; } interface lo0.0 { passive; } } } ldp { interface all; } }
路由器 PE2
在路由器 PE2 上,在主实例中配置 BGP、OSPF、MPLS、LDP 和正常重启。在 t1-0/1/3 的逻辑接口上的各个实例中配置以下协议:单元 200 上的静态路由、单元 201 上的 OSPF、单元 202 上的 RIP、单元 203 上的 BGP 以及单元 612 上的帧中继对于第 2 层 VPN 实例。此外,在所有路由实例中配置特定于协议的平滑重启,第 2 层 VPN 实例除外。
[edit] interfaces { t3-0/0/0 { unit 0 { family inet { address 10.96.0.6/30; } family mpls; } } t1-0/1/3 { dce; encapsulation frame-relay-ccc; unit 200 { dlci 200; family inet { address 10.96.200.1/30; } family mpls; } unit 201 { dlci 201; family inet { address 10.96.201.1/30; } family mpls; } unit 202 { dlci 202; family inet { address 10.96.202.1/30; } family mpls; } unit 203 { dlci 203; family inet { address 10.96.203.1/30; } family mpls; } unit 612 { encapsulation frame-relay-ccc; dlci 612; } } lo0 { unit 0 { family inet { address 10.245.14.182/32; } family iso { address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4182.00; } } } } routing-options { graceful-restart; router-id 10.245.14.182; autonomous-system 69; } protocols { mpls { interface all; } bgp { group PEPE { type internal; neighbor 10.245.14.176 { local-address 10.245.14.182; family inet-vpn { unicast; } family l2vpn { unicast; } } } } ospf { area 0.0.0.0 { interface t3-0/0/0.0; interface fxp0.0 { disable; } interface lo0.0 { passive; } } } ldp { interface all; } policy-options { policy-statement STATIC-import { from community STATIC; then accept; } policy-statement STATIC-export { then { community add STATIC; accept; } } policy-statement OSPF-import { from community OSPF; then accept; } policy-statement OSPF-export { then { community add OSPF; accept; } } policy-statement RIP-import { from community RIP; then accept; } policy-statement RIP-export { then { community add RIP; accept; } } policy-statement BGP-INET-import { from community BGP-INET; then accept; } policy-statement BGP-INET-export { then { community add BGP-INET; accept; } } policy-statement L2VPN-import { from community L2VPN; then accept; } policy-statement L2VPN-export { then { community add L2VPN; accept; } } community BGP-INET members target:69:103; community L2VPN members target:69:512; community OSPF members target:69:101; community RIP members target:69:102; community STATIC members target:69:100; } routing-instances { BGP-INET { instance-type vrf; interface t1-0/1/3.203; route-distinguisher 10.245.14.182:203; vrf-import BGP-INET-import; vrf-export BGP-INET-export; routing-options { graceful-restart; autonomous-system 65203; } protocols { bgp { group BGP-INET { type external; export BGP-INET-import; neighbor 10.96.203.2 { local-address 10.96.203.1; family inet { unicast; } peer-as 65200; } } } } } L2VPN { instance-type l2vpn; interface t1-0/1/3.612; route-distinguisher 10.245.14.182:612; vrf-import L2VPN-import; vrf-export L2VPN-export; protocols {# There is no graceful-restart statement for Layer 2 VPN instances. l2vpn { encapsulation-type frame-relay; site CE2-ISIS { site-identifier 612; interface t1-0/1/3.612 { remote-site-id 512; } } } } } OSPF { instance-type vrf; interface t1-0/1/3.201; route-distinguisher 10.245.14.182:201; vrf-import OSPF-import; vrf-export OSPF-export; routing-options { graceful-restart; } protocols { ospf { export OSPF-import; area 0.0.0.0 { interface all; } } } } RIP { instance-type vrf; interface t1-0/1/3.202; route-distinguisher 10.245.14.182:202; vrf-import RIP-import; vrf-export RIP-export; routing-options { graceful-restart; } protocols { rip { group RIP { export RIP-import; neighbor t1-0/1/3.202; } } } } STATIC { instance-type vrf; interface t1-0/1/3.200; route-distinguisher 10.245.14.182:200; vrf-import STATIC-import; vrf-export STATIC-export; routing-options { graceful-restart; static { route 10.96.210.1/32 next-hop t1-0/1/3.200; } } } } }
路由器 CE2
在路由器 CE2 上,通过镜像已在路由器 PE2 和 CE1 上设置的协议来完成第 2 层和第 3 层 VPN 配置。具体而言,在 t1-0/0/3 的逻辑接口上配置以下内容:单元 201 上的 OSPF、单元 202 上的 RIP、单元 203 上的 BGP 和单元 612 上的 IS-IS。最后,在主实例上配置平滑重启、BGP、IS-IS、OSPF 和 RIP,以便能够连接到路由器 PE2 上的路由实例。
[edit] interfaces { t1-0/0/3 { encapsulation frame-relay; unit 200 { dlci 200; family inet { address 10.96.200.2/30; } } unit 201 { dlci 201; family inet { address 10.96.201.2/30; } } unit 202 { dlci 202; family inet { address 10.96.202.2/30; } } unit 203 { dlci 203; family inet { address 10.96.203.2/30; } } unit 512 { dlci 512; family inet { address 10.96.252.2/30; } } } lo0 { unit 0 { family inet { address 10.245.14.180/32 { primary; } address 10.96.210.1/32; address 10.96.111.1/32; address 10.96.212.1/32; address 10.96.213.1/32; address 10.96.216.1/32; } family iso { address 47.0005.80ff.f800.0000.0108.0001.0102.4501.4180.00; } } } } routing-options { graceful-restart; autonomous-system 65200; } protocols { bgp { group CE-PE-INET { type external; export BGP_INET_LB_DIRECT; neighbor 10.96.203.1 { local-address 10.96.203.2; family inet { unicast; } peer-as 65203; } } } isis { export ISIS_L2VPN_LB_DIRECT; interface t1-0/0/3.612; } ospf { export OSPF_LB_DIRECT; area 0.0.0.0 { interface t1-0/0/3.201; } } rip { group RIP { export RIP_LB_DIRECT; neighbor t1-0/0/3.202; } } } policy-options { policy-statement OSPF_LB_DIRECT { term direct { from { protocol direct; route-filter 10.96.201.0/30 exact; route-filter 10.96.211.1/32 exact; } then accept; } term final { then reject; } } policy-statement RIP_LB_DIRECT { term direct { from { protocol direct; route-filter 10.96.202.0/30 exact; route-filter 10.96.212.1/32 exact; } then accept; } term final { then reject; } } policy-statement BGP_INET_LB_DIRECT { term direct { from { protocol direct; route-filter 10.96.203.0/30 exact; route-filter 10.96.213.1/32 exact; } then accept; } term final { then reject; } } policy-statement ISIS_L2VPN_LB_DIRECT { term direct { from { protocol direct; route-filter 10.96.216.1/32 exact; } then accept; } term final { then reject; } } }
重新启动前的路由器 PE1 状态
以下示例在重新启动之前显示路由器 PE1 上的邻接方关系:
user@PE1> show bgp neighbor Peer: 10.96.103.2+3785 AS 65100 Local: 10.96.103.1+179 AS 65103 Type: External State: Established Flags: <> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ BGP-INET-import ] Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily PeerAS Refresh> Address families configured: inet-unicast Local Address: 10.96.103.1 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 10.96.110.1 Local ID: 10.96.103.1 Active Holdtime: 90 Keepalive Interval: 30 Local Interface: t3-0/0/0.103 NLRI for restart configured on peer: inet-unicast NLRI advertised by peer: inet-unicast NLRI for this session: inet-unicast Peer supports Refresh capability (2) Restart time configured on the peer: 120 Stale routes from peer are kept for: 300 Restart time requested by this peer: 120 NLRI that peer supports restart for: inet-unicast NLRI peer can save forwarding state: inet-unicast NLRI that peer saved forwarding for: inet-unicast NLRI that restart is negotiated for: inet-unicast NLRI of all end-of-rib markers sent: inet-unicast Table BGP-INET.inet.0 Bit: 30001 RIB State: BGP restart is complete RIB State: VPN restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 0 Suppressed due to damping: 0 Last traffic (seconds): Received 8 Sent 3 Checked 3 Input messages: Total 15 Updates 0 Refreshes 0 Octets 321 Output messages: Total 18 Updates 2 Refreshes 0 Octets 450 Output Queue[2]: 0 Peer: 10.245.14.182+4701 AS 69 Local: 10.245.14.176+179 AS 69 Type: Internal State: Established Flags: <> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily Rib-group Refresh> Address families configured: inet-vpn-unicast l2vpn Local Address: 10.245.14.176 Holdtime: 90 Preference: 170 Number of flaps: 1 Peer ID: 10.245.14.182 Local ID: 10.245.14.176 Active Holdtime: 90 Keepalive Interval: 30 NLRI for restart configured on peer: inet-vpn-unicast l2vpn NLRI advertised by peer: inet-vpn-unicast l2vpn NLRI for this session: inet-vpn-unicast l2vpn Peer supports Refresh capability (2) Restart time configured on the peer: 120 Stale routes from peer are kept for: 300 Restart time requested by this peer: 120 NLRI that peer supports restart for: inet-vpn-unicast l2vpn NLRI peer can save forwarding state: inet-vpn-unicast l2vpn NLRI that peer saved forwarding for: inet-vpn-unicast l2vpn NLRI that restart is negotiated for: inet-vpn-unicast l2vpn NLRI of all end-of-rib markers sent: inet-vpn-unicast l2vpn Table bgp.l3vpn.0 Bit: 10000 RIB State: BGP restart is complete RIB State: VPN restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 0 Suppressed due to damping: 0 Table bgp.l2vpn.0 Bit: 20000 RIB State: BGP restart is complete RIB State: VPN restart is complete Send state: in sync Active prefixes: 1 Received prefixes: 1 Suppressed due to damping: 0 Table BGP-INET.inet.0 Bit: 30000 RIB State: BGP restart is complete RIB State: VPN restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 0 Suppressed due to damping: 0 Table OSPF.inet.0 Bit: 60000 RIB State: BGP restart is complete RIB State: VPN restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 0 Suppressed due to damping: 0 Table RIP.inet.0 Bit: 70000 RIB State: BGP restart is complete RIB State: VPN restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 0 Suppressed due to damping: 0 Table STATIC.inet.0 Bit: 80000 RIB State: BGP restart is complete RIB State: VPN restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 0 Suppressed due to damping: 0 Table L2VPN.l2vpn.0 Bit: 90000 RIB State: BGP restart is complete RIB State: VPN restart is complete Send state: in sync Active prefixes: 1 Received prefixes: 1 Suppressed due to damping: 0 Last traffic (seconds): Received 28 Sent 28 Checked 28 Input messages: Total 2 Updates 0 Refreshes 0 Octets 86 Output messages: Total 13 Updates 10 Refreshes 0 Octets 1073 Output Queue[0]: 0 Output Queue[1]: 0 Output Queue[2]: 0 Output Queue[3]: 0 Output Queue[4]: 0 Output Queue[5]: 0 Output Queue[6]: 0 Output Queue[7]: 0 Output Queue[8]: 0 user@PE1> show route instance detail master: Router ID: 10.245.14.176 Type: forwarding State: Active Restart State: Complete Path selection timeout: 300 Tables: inet.0 : 17 routes (15 active, 0 holddown, 1 hidden) Restart Complete inet.3 : 2 routes (2 active, 0 holddown, 0 hidden) Restart Complete iso.0 : 1 routes (1 active, 0 holddown, 0 hidden) Restart Complete mpls.0 : 19 routes (19 active, 0 holddown, 0 hidden) Restart Complete bgp.l3vpn.0 : 10 routes (10 active, 0 holddown, 0 hidden) Restart Complete inet6.0 : 2 routes (2 active, 0 holddown, 0 hidden) Restart Complete bgp.l2vpn.0 : 1 routes (1 active, 0 holddown, 0 hidden) Restart Complete BGP-INET: Router ID: 10.96.103.1 Type: vrf State: Active Restart State: Complete Path selection timeout: 300 Interfaces: t3-0/0/0.103 Route-distinguisher: 10.245.14.176:103 Vrf-import: [ BGP-INET-import ] Vrf-export: [ BGP-INET-export ] Tables: BGP-INET.inet.0 : 4 routes (4 active, 0 holddown, 0 hidden) Restart Complete L2VPN: Router ID: 0.0.0.0 Type: l2vpn State: Active Restart State: Complete Path selection timeout: 300 Interfaces: t3-0/0/0.512 Route-distinguisher: 10.245.14.176:512 Vrf-import: [ L2VPN-import ] Vrf-export: [ L2VPN-export ] Tables: L2VPN.l2vpn.0 : 2 routes (2 active, 0 holddown, 0 hidden) Restart Complete OSPF: Router ID: 10.96.101.1 Type: vrf State: Active Restart State: Complete Path selection timeout: 300 Interfaces: t3-0/0/0.101 Route-distinguisher: 10.245.14.176:101 Vrf-import: [ OSPF-import ] Vrf-export: [ OSPF-export ] Tables: OSPF.inet.0 : 8 routes (7 active, 0 holddown, 0 hidden) Restart Complete RIP: Router ID: 10.96.102.1 Type: vrf State: Active Restart State: Complete Path selection timeout: 300 Interfaces: t3-0/0/0.102 Route-distinguisher: 10.245.14.176:102 Vrf-import: [ RIP-import ] Vrf-export: [ RIP-export ] Tables: RIP.inet.0 : 6 routes (6 active, 0 holddown, 0 hidden) Restart Complete STATIC: Router ID: 10.96.100.1 Type: vrf State: Active Restart State: Complete Path selection timeout: 300 Interfaces: t3-0/0/0.100 Route-distinguisher: 10.245.14.176:100 Vrf-import: [ STATIC-import ] Vrf-export: [ STATIC-export ] Tables: STATIC.inet.0 : 4 routes (4 active, 0 holddown, 0 hidden) Restart Complete __juniper_private1__: Router ID: 0.0.0.0 Type: forwarding State: Active user@PE1> show route protocol l2vpn inet.0: 16 destinations, 17 routes (15 active, 0 holddown, 1 hidden) Restart Complete inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) Restart Complete BGP-INET.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden) Restart Complete OSPF.inet.0: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden) Restart Complete RIP.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) Restart Complete STATIC.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden) Restart Complete iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) Restart Complete mpls.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden) Restart Complete + = Active Route, - = Last Active, * = Both 800003 *[L2VPN/7] 00:06:00 > via t3-0/0/0.512, Pop Offset: 4 t3-0/0/0.512 *[L2VPN/7] 00:06:00 > via t1-0/1/0.0, Push 800003, Push 100004(top) Offset: -4 bgp.l3vpn.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) Restart Complete inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) Restart Complete L2VPN.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) Restart Complete + = Active Route, - = Last Active, * = Both 10.245.14.176:512:512:611/96 *[L2VPN/7] 00:06:01 Discard bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) Restart Complete
重新启动期间的路由器 PE1 状态
在验证正常重启是否有效之前,必须模拟路由器重启。要使路由进程刷新并模拟重新启动,请使用 重新启动路由 操作模式命令:
user@PE1> restart routing Routing protocol daemon started, pid 3558
在路由器重新启动期间捕获以下示例输出:
user@PE1> show bgp neighbor Peer: 10.96.103.2 AS 65100 Local: 10.96.103.1 AS 65103 Type: External State: Active Flags: <ImportEval> Last State: Idle Last Event: Start Last Error: None Export: [ BGP-INET-import ] Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily PeerAS Refresh> Address families configured: inet-unicast Local Address: 10.96.103.1 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer: 10.245.14.182+179 AS 69 Local: 10.245.14.176+2131 AS 69 Type: Internal State: Established Flags: <ImportEval> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily Rib-group Refresh> Address families configured: inet-vpn-unicast l2vpn Local Address: 10.245.14.176 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 10.245.14.182 Local ID: 10.245.14.176 Active Holdtime: 90 Keepalive Interval: 30 NLRI for restart configured on peer: inet-vpn-unicast l2vpn NLRI advertised by peer: inet-vpn-unicast l2vpn NLRI for this session: inet-vpn-unicast l2vpn Peer supports Refresh capability (2) Restart time configured on the peer: 120 Stale routes from peer are kept for: 300 Restart time requested by this peer: 120 NLRI that peer supports restart for: inet-vpn-unicast l2vpn NLRI peer can save forwarding state: inet-vpn-unicast l2vpn NLRI that peer saved forwarding for: inet-vpn-unicast l2vpn NLRI that restart is negotiated for: inet-vpn-unicast l2vpn NLRI of received end-of-rib markers: inet-vpn-unicast l2vpn Table bgp.l3vpn.0 Bit: 10000 RIB State: BGP restart in progress RIB State: VPN restart in progress Send state: in sync Active prefixes: 10 Received prefixes: 10 Suppressed due to damping: 0 Table bgp.l2vpn.0 Bit: 20000 RIB State: BGP restart in progress RIB State: VPN restart in progress Send state: in sync Active prefixes: 1 Received prefixes: 1 Suppressed due to damping: 0 Table BGP-INET.inet.0 Bit: 30000 RIB State: BGP restart in progress RIB State: VPN restart in progress Send state: in sync Active prefixes: 2 Received prefixes: 2 Suppressed due to damping: 0 Table OSPF.inet.0 Bit: 60000 RIB State: BGP restart is complete RIB State: VPN restart in progress Send state: in sync Active prefixes: 2 Received prefixes: 2 Suppressed due to damping: 0 Table RIP.inet.0 Bit: 70000 RIB State: BGP restart is complete RIB State: VPN restart in progress Send state: in sync Active prefixes: 2 Received prefixes: 2 Suppressed due to damping: 0 Table STATIC.inet.0 Bit: 80000 RIB State: BGP restart is complete RIB State: VPN restart in progress Send state: in sync Active prefixes: 1 Received prefixes: 1 Suppressed due to damping: 0 Table L2VPN.l2vpn.0 Bit: 90000 RIB State: BGP restart is complete RIB State: VPN restart in progress Send state: in sync Active prefixes: 1 Received prefixes: 1 Suppressed due to damping: 0 Last traffic (seconds): Received 0 Sent 0 Checked 0 Input messages: Total 14 Updates 13 Refreshes 0 Octets 1053 Output messages: Total 3 Updates 0 Refreshes 0 Octets 105 Output Queue[0]: 0 Output Queue[1]: 0 Output Queue[2]: 0 Output Queue[3]: 0 Output Queue[4]: 0 Output Queue[5]: 0 Output Queue[6]: 0 Output Queue[7]: 0 Output Queue[8]: 0 user@PE1> show route instance detail master: Router ID: 10.245.14.176 Type: forwarding State: Active Restart State: Pending Path selection timeout: 300 Tables: inet.0 : 17 routes (15 active, 1 holddown, 1 hidden) Restart Pending: OSPF LDP inet.3 : 2 routes (2 active, 0 holddown, 0 hidden) Restart Pending: OSPF LDP iso.0 : 1 routes (1 active, 0 holddown, 0 hidden) Restart Complete mpls.0 : 23 routes (23 active, 0 holddown, 0 hidden) Restart Pending: LDP VPN bgp.l3vpn.0 : 10 routes (10 active, 0 holddown, 0 hidden) Restart Pending: BGP VPN inet6.0 : 2 routes (2 active, 0 holddown, 0 hidden) Restart Complete bgp.l2vpn.0 : 1 routes (1 active, 0 holddown, 0 hidden) Restart Pending: BGP VPN BGP-INET: Router ID: 10.96.103.1 Type: vrf State: Active Restart State: Pending Path selection timeout: 300 Interfaces: t3-0/0/0.103 Route-distinguisher: 10.245.14.176:103 Vrf-import: [ BGP-INET-import ] Vrf-export: [ BGP-INET-export ] Tables: BGP-INET.inet.0 : 6 routes (5 active, 0 holddown, 0 hidden) Restart Pending: VPN L2VPN: Router ID: 0.0.0.0 Type: l2vpn State: Active Restart State: Pending Path selection timeout: 300 Interfaces: t3-0/0/0.512 Route-distinguisher: 10.245.14.176:512 Vrf-import: [ L2VPN-import ] Vrf-export: [ L2VPN-export ] Tables: L2VPN.l2vpn.0 : 2 routes (2 active, 0 holddown, 0 hidden) Restart Pending: VPN L2VPN OSPF: Router ID: 10.96.101.1 Type: vrf State: Active Restart State: Pending Path selection timeout: 300 Interfaces: t3-0/0/0.101 Route-distinguisher: 10.245.14.176:101 Vrf-import: [ OSPF-import ] Vrf-export: [ OSPF-export ] Tables: OSPF.inet.0 : 8 routes (7 active, 1 holddown, 0 hidden) Restart Pending: OSPF VPN RIP: Router ID: 10.96.102.1 Type: vrf State: Active Restart State: Pending Path selection timeout: 300 Interfaces: t3-0/0/0.102 Route-distinguisher: 10.245.14.176:102 Vrf-import: [ RIP-import ] Vrf-export: [ RIP-export ] Tables: RIP.inet.0 : 8 routes (6 active, 2 holddown, 0 hidden) Restart Pending: RIP VPN STATIC: Router ID: 10.96.100.1 Type: vrf State: Active Restart State: Pending Path selection timeout: 300 Interfaces: t3-0/0/0.100 Route-distinguisher: 10.245.14.176:100 Vrf-import: [ STATIC-import ] Vrf-export: [ STATIC-export ] Tables: STATIC.inet.0 : 4 routes (4 active, 0 holddown, 0 hidden) Restart Pending: VPN __juniper_private1__: Router ID: 0.0.0.0 Type: forwarding State: Active
user@PE1> show route instance summary Instance Type Primary rib Active/holddown/hidden master forwarding inet.0 15/0/1 iso.0 1/0/0 mpls.0 35/0/0 l3vpn.0 0/0/0 inet6.0 2/0/0 l2vpn.0 0/0/0 l2circuit.0 0/0/0 BGP-INET vrf BGP-INET.inet.0 5/0/0 BGP-INET.iso.0 0/0/0 BGP-INET.inet6.0 0/0/0 L2VPN l2vpn L2VPN.inet.0 0/0/0 L2VPN.iso.0 0/0/0 L2VPN.inet6.0 0/0/0 L2VPN.l2vpn.0 2/0/0 OSPF vrf OSPF.inet.0 7/0/0 OSPF.iso.0 0/0/0 OSPF.inet6.0 0/0/0 RIP vrf RIP.inet.0 6/0/0 RIP.iso.0 0/0/0 RIP.inet6.0 0/0/0 STATIC vrf STATIC.inet.0 4/0/0 STATIC.iso.0 0/0/0 STATIC.inet6.0 0/0/0 __juniper_private1__ forwarding __juniper_priva.inet.0 0/0/0 __juniper_privat.iso.0 0/0/0 __juniper_priv.inet6.0 0/0/0 user@PE1> show route protocol l2vpn inet.0: 16 destinations, 17 routes (15 active, 1 holddown, 1 hidden) Restart Pending: OSPF LDP inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) Restart Pending: OSPF LDP BGP-INET.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden) Restart Pending: VPN OSPF.inet.0: 7 destinations, 8 routes (7 active, 1 holddown, 0 hidden) Restart Pending: OSPF VPN RIP.inet.0: 6 destinations, 8 routes (6 active, 2 holddown, 0 hidden) Restart Pending: RIP VPN STATIC.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden) Restart Pending: VPN iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) Restart Complete mpls.0: 24 destinations, 24 routes (24 active, 0 holddown, 0 hidden) Restart Pending: LDP VPN + = Active Route, - = Last Active, * = Both 800001 *[L2VPN/7] 00:00:13 > via t3-0/0/0.512, Pop Offset: 4 t3-0/0/0.512 *[L2VPN/7] 00:00:13 > via t1-0/1/0.0, Push 800003, Push 100004(top) Offset: -4 bgp.l3vpn.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) Restart Pending: BGP VPN inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) Restart Complete L2VPN.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) Restart Pending: VPN L2VPN + = Active Route, - = Last Active, * = Both 10.245.14.176:512:512:611/96 *[L2VPN/7] 00:00:13 Discard bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) Restart Pending: BGP VPN
另见
配置 VPN 平滑重启
平滑重启允许其 VPN 控制平面正在重启的路由器继续转发流量,同时从相邻路由器恢复其状态。如果不正常重启,控制平面重启将中断路由器提供的任何 VPN 服务。第 2 层 VPN、第 3 层 VPN、虚拟路由器路由实例和 VPLS 支持平滑重启。
要实现第 2 层 VPN 或第 3 层 VPN 的平稳重启,请执行以下部分中所述的配置任务:
全局配置平滑重启
要启用平滑重启,请在[edit routing-options]
层次结构级别包含graceful-restart
语句。要配置平滑重启期间的全局持续时间,请在[edit routing-options graceful-restart]
层次结构级别包含语restart-duration
句。
[edit] routing-options { graceful-restart { disable; restart-duration seconds; } }
要全局禁用平滑重启,请在[edit routing-options graceful-restart]
层次结构级别包含该disable
语句。
为路由实例配置平滑重启
仅对于第 3 层 VPN,您还必须通过在[edit routing-instances instance-name routing-options]
层次结构级别包含graceful-restart
语句,为路由实例中的所有路由和与 MPLS 相关的协议配置平稳重启。由于您可以配置多实例 BGP 和多实例 LDP,因此支持载波至载波场景的平滑重启。要配置路由实例的平滑重启周期的持续时间,请将[edit routing-instances instance-name routing-options]
语句包含在 restart-duration
中。
[edit] routing-instances { instance-name { routing-options { graceful-restart { disable; restart-duration seconds; } } } }
您可以使用 disable
层次 [edit routing-instances instance-name protocols protocol-name graceful-restart]
结构级别的语句禁用单个协议的正常重启。
配置逻辑系统 平滑重启
逻辑系统的平稳重启功能与主路由器的平稳重启大致相同。唯一的区别是语句的位置 graceful-restart
。
以下主题介绍在逻辑系统中实现平稳重新启动所需的配置:
全局启用平滑重启
要在逻辑系统中启用平稳重新启动,请在[edit logical-systems logical-system-name routing-options]
层次结构级别包含语graceful-restart
句。要配置平滑重启期的全局持续时间,请在[edit logical-systems logical-system-name routing-options graceful-restart]
层次结构级别包含语restart-duration
句。
[edit] logical-systems { logical-system-name { routing-options { graceful-restart { disable; restart-duration seconds; } } } }
要全局禁用平滑重启,请在[edit logical-systems logical-system-name routing-options graceful-restart]
层次结构级别包含该disable
语句。
为路由实例配置平滑重启
此外,还必须仅对于第 3 层 VPN,才能为逻辑系统内的路由实例配置全局正常重启。要进行配置,请在[edit logical-systems logical-system-name routing-instances instance-name routing-options]
层次结构级别包含graceful-restart
语句。由于您可以配置多实例 BGP 和多实例 LDP,因此支持载波至载波场景的平滑重启。要配置路由实例的平滑重启周期的持续时间,请将[edit logical-systems logical-system-name routing-instances instance-name routing-options]
语句包含在 restart-duration
中。
[edit] logical-systems { logical-system-name { routing-instances { instance-name { routing-options { graceful-restart { disable; restart-duration seconds; } } } } } }
在层次结构级别上 disable
使用语句 [edit logical-systems logical-system-name routing-instances instance-name protocols protocol-name graceful-restart]
禁用单个协议的平滑重启。
为 QFabric 系统配置平滑重启
在 QFabric CLI 中配置平稳重启时,QFabric 系统会将配置应用到网络节点组,以便使用 QFabric 系统外部的设备参与平稳重启操作。此类配置可保留路由表状态,并帮助相邻路由设备在系统重新启动后更快地恢复路由操作。如果 QFabric 系统重新启动(如软件升级),网络节点组也能够快速恢复路由操作。因此,我们建议在 QFabric CLI 中为路由协议启用平滑重启。
QFabric 系统还在交换矩阵内部使用平滑重启,以促进交换矩阵间的弹性和恢复。默认情况下,此内部功能处于启用状态,无需配置。
启用平滑重启
默认情况下,平滑重启处于禁用状态。要启用平滑重启,请在 [edit routing-instance instance-name routing-options] 或 [edit routing-options] 层级包含 graceful-restart 语句。
例如:
routing-options { graceful-restart; }
要配置平滑重启周期的持续时间,请在 [edit routing-options graceful-restart] 层次结构级别中包含重启持续时间。
启动路由平台时,默认情况下会启用助手模式(协助相邻路由器尝试平稳重启的功能),即使未启用平稳重启也是如此。您可以根据协议禁用帮助程序模式。
[edit] routing-options { graceful-restart { disable; restart-duration seconds; } }
要全局禁用平滑重启,请在 [edit routing-options graceful-restart] 层级包含 disable 语句。
在 [edit routing-options graceful-restart] 层级为所有路由协议启用平稳重启后,您可以按协议禁用平稳重启。
如果在建立 BGP 或 LDP 会话后配置平稳重启,则 BGP 或 LDP 会话将重新启动,并且对等方协商平稳重启功能。此外,BGP 对等体路由统计信息将重置为零。
为 BGP 配置平滑重启选项
要配置 BGP 平滑重启期间的持续时间,请在 [编辑协议 bgp graceful-restart] 层次结构级别包括 restart-time 语句。要设置路由器在声明关闭之前等待接收来自重新启动的邻居的消息的时间长度,请在 [edit protocols bgp graceful-restart] 层次结构级别包含 stale-routes-time 语句。
[edit] protocols { bgp { graceful-restart { disable; restart-time seconds; stale-routes-time seconds; } } } routing-options { graceful-restart; }
要为所有 BGP 会话禁用 BGP 平稳重启功能,请在 [编辑协议 BGP 平稳重启] 层次结构级别包含 disable 语句。
要设置 BGP 平稳重启属性或为组禁用这些属性,请在 [编辑协议 bgp 组 group-name 优雅重启] 层次结构级别包含所需的语句。
要为组中的特定邻接方设置 BGP 平稳重启属性或禁用这些属性,请在 [编辑协议 bgp 组 group-name 邻接方 ip-address graceful-restart] 层级包含所需的语句。
为 BGP 配置平滑重启会将 BGP 对等体路由统计信息重置为零。此外,现有 BGP 会话会重新启动,并且对等方协商平稳重启功能。
为 OSPF 和 OSPFv3 配置平滑重启选项
要配置 OSPF/OSPFv3 平滑重启周期的持续时间,请在 [edit protocols (ospf | ospf3) graceful-restart] 层次结构级别包含 restart-duration 语句。要指定路由器通知帮助路由器其已完成平稳重启的时间长度,请在 [编辑协议 (OSPF | OSPF3) 平稳重启] 层次结构级别中包含 notify-duration。严格的 OSPF 链路状态通告 (LSA) 检查会导致帮助路由器终止正常重启。要禁用严格 LSA 检查,请在 [edit protocols (ospf | ospf3) graceful-restart] 层次结构级别包含 no-strict-lsa-checking 语句。
[edit] protocols { ospf | ospfv3{ graceful-restart { disable; helper-disable no-strict-lsa-checking; notify-duration seconds; restart-duration seconds; } } } routing-options { graceful-restart; }
要禁用 OSPF/OSPFv3 平稳重启,请在 [编辑协议 (OSPF | ospf3) graceful-restart] 层级包含 disable 语句。
从 11.3 版开始,Junos OS 支持标准模式(基于 RFC 3623,平滑 OSPF 重启)和基于重启信号的(如 RFC 4811、RFC 4812 和 RFC 4813 中指定)辅助模式,以实现 OSPF 版本 2 平滑重启配置。默认情况下,标准模式和基于重启信令的帮助程序模式均处于启用状态。要禁用 OSPF 版本 2 平滑重启配置的帮助程序模式,请在层次结构级别包括 helper-disable <both | restart-signaling | standard> 语句。请注意,上一个提交的语句始终优先于前一个语句。
[edit protocols ospf] graceful-restart { helper-disable <both | restart-signaling | standard> }
要重新启用帮助程序模式,请使用删除协议 ospf graceful-restarthelper-disable <restart-signaling | standard | both> 命令从配置中删除 helper-disable 语句。在这种情况下,最后执行的命令也优先于前一个命令。
OSPFv3 配置不支持基于重新启动信号的帮助程序模式。要禁用 OSPFv3 配置的帮助程序模式,请在 [edit protocols ospfv3 graceful-restart] 层次结构级别包含 helper-disable 语句。
您还可以使用 traceoptions 语句在 [edit protocols (ospf | ospf3)] 层次结构级别跟踪平滑重启事件。有关更多信息,请参阅 跟踪平滑重启事件。
如果为 OSPF 配置 BFD 和平稳重启,则平稳重启可能无法按预期工作。
跟踪平滑重启事件
要跟踪平滑重启事件的进度,可以为 IS-IS 和 OSPF/OSPFv3 配置平稳重启跟踪选项标志。要配置平滑重启追踪选项,请在 [edit protocols protocol traceoptions 标志] 层次结构级别包含 graceful-restart 语句:
[edit protocols] isis { traceoptions { flag graceful-restart; } } (ospf | ospf3) { traceoptions { flag graceful-restart; } }
示例:管理 OSPF 平稳重启的帮助程序模式
配置
分步过程
默认情况下,标准模式和基于重启信令的帮助程序模式均处于启用状态,无论路由设备上的正常重启配置状态如何。Junos OS 允许您根据需要禁用或启用帮助程序模式。
要配置正常重启的帮助程序模式选项,请执行以下操作:
要启用平滑重启,请在
[edit routing-options]
层次结构级别添加graceful-restart
语句。[edit routing-options] user@host# set graceful-restart
默认情况下,帮助程序模式(标准模式和基于重启信号的帮助程序模式)处于启用状态。
要禁用一种或两种帮助程序模式,请在
[edit protocols ospf graceful-restart]
层次结构级别添加helper-disable <both | restart-signaling | standard>
语句。要同时禁用标准模式和基于重启信令的帮助程序模式,请执行以下操作:
[edit protocols ospf graceful-restart] user@host# set helper-disable both
要仅禁用基于重新启动信号的帮助程序模式,请执行以下操作:
[edit protocols ospf graceful-restart] user@host# set helper-disable restart-signaling
要仅禁用标准帮助程序模式,请执行以下操作:
[edit protocols ospf graceful-restart] user@host# set helper-disable standard
注意:您必须先提交配置,然后更改才会生效。
上一个提交的语句始终优先于前一个语句。
要在禁用帮助程序模式时启用一种或两种帮助程序模式,请从
[edit protocols ospf graceful-restart]
层次结构级别中删除该helper-disable <both | restart-signaling | standard>
语句。要同时启用标准模式和基于重新启动信令的帮助程序模式,请执行以下操作:
[edit protocols ospf graceful-restart] user@host# delete helper-disable
要启用基于重新启动信令的帮助程序模式,请执行以下操作:
[edit protocols ospf graceful-restart] user@host# delete helper-disable restart-signaling
要启用标准帮助程序模式,请执行以下操作:
[edit protocols ospf graceful-restart] user@host# delete helper-disable standard
注意:您必须先提交配置,然后更改才会生效。
上一个提交的语句始终优先于前一个语句。
要求
运行 Junos OS 11.4 或更高版本以及 EX 系列交换机的 M Series 或 T Series 路由器。
概述
Junos OS 11.4 版扩展了 OSPF 平滑重启支持,以包括基于重启信令的帮助程序模式。默认情况下,标准(基于 RFC 3623)和基于重启信令的帮助程序模式均处于启用状态,而与路由设备上的平稳重启配置状态无关。
但是,Junos OS 允许您通过 helper-disable <standard | restart-signaling | both>
语句在帮助程序模式之间进行选择。
验证
确认配置工作正常。
验证 OSPF 平稳重启和帮助程序模式配置
目的
验证路由器上的 OSPF 平稳重启和帮助程序模式配置。
行动
在配置模式下输入
run show ospf overview
命令。user@host# run show ospf overview ~ ~ ~ Restart: Enabled Restart duration: 180 sec Restart grace period: 210 sec Graceful restart helper mode: Enabled Restart-signaling helper mode: Enabled ~ ~ ~
意义
输出显示平稳重启,并且两种帮助程序模式均已启用。
跟踪重新启动 OSPF 的基于信令的帮助程序模式事件 平稳重新启动
Junos OS 提供了一个跟踪选项,用于记录基于重启信令的帮助程序模式事件,以便 OSPF 正常重新启动。要为基于重新启动信号的帮助程序模式事件启用跟踪,请在[edit protocols ospf]
层次结构级别包含traceoptions flag restart-signaling
语句。
要为基于重新启动信号的事件启用跟踪,请执行以下操作:
日志将保存到 ospf-log /var/log 文件夹中的文件中。
查看日志文件
要从日志文件查看基于重新启动信号的事件,请键入:
user@host> file show /var/log/ospf-log | match “restart signaling” Jun 25 14:44:08.890216 OSPF Restart Signaling: Start helper mode for nbr ip 14.19.3.2 id 10.10.10.1 Jun 25 14:44:11.358636 OSPF restart signaling: Received DBD with R bit set from nbr ip=14.19.3.2 id=10.10.10.1. Start oob-resync. Jun 25 14:44:11.380198 OSPF restart signaling: Received DBD with LR bit on from nbr ip=14.19.3.2 id=10.10.10.1. Save its oob-resync capability 1 Jun 25 14:44:11.467200 OSPF restart signaling: nbr fsm for nbr ip=14.19.3.2 id=10.10.10.1 moving to state Full. Reset oob-resync parameters.
另见
验证平滑重启操作
本主题包含以下部分:
平滑重启操作模式命令
要验证正常重启的正确操作,请使用以下命令:
show bgp neighbor
(用于 BGP 平稳重启)show log
(用于 IS-IS 和 OSPF/OSPFv3 平滑重启)show (ospf | ospfv3) overview
(用于 OSPF/OSPFv3 平稳重新启动)show rsvp neighbor detail
(用于 RSVP 平稳重启 — 帮助程序路由器)show rsvp version
(用于 RSVP 平稳重启 — 重新启动路由器)show ldp session detail
(用于 LDP 平稳重启)show connections
(用于 CCC 和 TCC 平稳重启)show route instance detail
(对于第 3 层 VPN,请平稳重启,以及对于在路由实例中使用平稳重启的任何协议)show route protocol l2vpn
(用于 2 层 VPN 平稳重启)
有关这些命令的更多信息及其输出字段的描述,请参阅 CLI 资源管理器。
验证 BGP 平稳重新启动
要查看 BGP 会话的平稳重新启动信息,请使用以下 show bgp neighbor
命令:
user@PE1> show bgp neighbor 192.0.2.10 Peer: 192.0.2.10+179 AS 64496 Local: 192.0.2.5+1106 AS 64496 Type: Internal State: Established Flags: <> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ static ] Options:<Preference LocalAddress HoldTime GracefulRestart Damping PeerAS Refresh> Local Address: 192.0.2.5 Holdtime: 90 Preference: 170 IPSec SA Name: hope Number of flaps: 0 Peer ID: 192.0.2.10 Local ID: 192.0.2.5 Active Holdtime: 90 Keepalive Interval: 30 NLRI for restart configured on peer: inet-unicast NLRI advertised by peer: inet-unicast NLRI for this session: inet-unicast Peer supports Refresh capability (2) Restart time configured on the peer: 180 Stale routes from peer are kept for: 180 Restart time requested by this peer: 300 NLRI that peer supports restart for: inet-unicast NLRI that peer saved forwarding for: inet-unicast NLRI that restart is negotiated for: inet-unicast NLRI of received end-of-rib markers: inet-unicast NLRI of all end-of-rib markers sent: inet-unicast Table inet.0 Bit: 10000 RIB State: restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 0 Suppressed due to damping: 0 Last traffic (seconds): Received 19 Sent 19 Checked 19 Input messages: Total 2 Updates 1 Refreshes 0 Octets 42 Output messages: Total 3 Updates 0 Refreshes 0 Octets 116 Output Queue[0]: 0
验证 IS-IS 和 OSPF 平滑重启
要查看 IS-IS 和 OSPF 的平稳重启信息,请配置 traceoptions(请参阅 跟踪平稳重启事件)。
以下是 OSPF 重新启动路由器的 traceoptions 日志的输出:
Oct 8 05:20:12 Restart mode - sending grace lsas Oct 8 05:20:12 Restart mode - estimated restart duration timer triggered Oct 8 05:20:13 Restart mode - Sending more grace lsas
以下是来自 OSPF 帮助程序路由器的 traceoptions 日志的输出:
Oct 8 05:20:14 Helper mode for neighbor 192.0.2.5 Oct 8 05:20:14 Received multiple grace lsa from 192.0.2.5
验证 CCC 和 TCC 平滑重启
要查看 CCC 和 TCC 连接的平稳重新启动信息,请使用命令 show connections
。以下示例假定 CE1 和 CE2 之间有四个远程接口 CCC 连接:
user@PE1> show connections CCC and TCC connections [Link Monitoring On] Legend for status (St) Legend for connection types UN -- uninitialized if-sw: interface switching NP -- not present rmt-if: remote interface switching WE -- wrong encapsulation lsp-sw: LSP switching DS -- disabled Dn -- down Legend for circuit types -> -- only outbound conn is up intf -- interface <- -- only inbound conn is up tlsp -- transmit LSP Up -- operational rlsp -- receive LSP RmtDn -- remote CCC down Restart -- restarting CCC Graceful restart : Restarting Connection/Circuit Type St Time last up # Up trans CE1-CE2-0 rmt-if Restart ----- 0 fe-1/1/0.0 intf Up PE1-PE2-0 tlsp Up PE2-PE1-0 rlsp Up CE1-CE2-1 rmt-if Restart ----- 0 fe-1/1/0.1 intf Up PE1-PE2-1 tlsp Up PE2-PE1-1 rlsp Up CE1-CE2-2 rmt-if Restart ----- 0 fe-1/1/0.2 intf Up PE1-PE2-2 tlsp Up PE2-PE1-2 rlsp Up CE1-CE2-3 rmt-if Restart ----- 0 fe-1/1/0.3 intf Up PE1-PE2-3 tlsp Up PE2-PE1-3 rlsp Up
变更历史表
是否支持某项功能取决于您使用的平台和版本。使用 功能浏览器 查看您使用的平台是否支持某项功能。