如果PVC上发生通信问题(没有流量以任何方式传输),则终端设备上的永久虚电路(PVC)将保持UP状态。因此,指向该PVC的路由条目会在路由表中保留一段时间,因此数据包将丢失。此问题的解决方案是使用操作和维护(OAM)来检测此类故障,并允许PVC在路径中断时断开连接。
单击此处可查看有关使用OAM进行PVC管理的示例配置。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
本文档没有任何特定的前提条件。
自Cisco IOS® 11.1(22)CC版和Cisco IOS 12.0版及更高版本起,支持OAM和PVC管理。
本文档中的信息都是基于特定实验室环境中的设备创建的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您是在真实网络上操作,请确保您在使用任何命令前已经了解其潜在影响。
本文档基于以下设置:
1/116是分配给整个路径上虚电路(VC)的VPI/VCI。
ATM交换机运行Cisco IOS 12.0。ATM交换机已配置为在链路故障时发送警报指示信号/远程缺陷指示器(AIS/RDI),如本文档所述。
通过关闭Guilder上的(子)接口并观察Bernard上发生的情况,可以生成故障。我们在本文档中所有调试的配置中启用了service timestamps debug datetime msec。这允许我们以毫秒为单位查看每个事件的时间。
我们将仅考虑本文档中的F5 OAM(VC级别)信元,因为这些信元是思科终端设备(路由器)用于检测故障的唯一信元。为了检测终端设备上PVC路径中的故障,OAM使用以下特定信元:
环回信元
连续性检查(CC)单元
报警指示信号(AIS)信元
远程检测指示(RDI)信元
声明PVC UP有三个条件:
路由器收到配置数量的连续端到端F5 OAM环回信元应答。
路由器在3秒内未收到F5-AIS信元。
路由器在3秒内未收到F5-RDI信元。
下一节介绍这些单元格并输出显示其效果。
为OAM配置的终端设备(如路由器)会定期发送环回信元,这些信元必须在网络中环回。此循环点可以是PVC(端到端环回单元)末端的机器或路径上的设备(分段环回单元)。
环回信元中的标识符指示哪些设备应环回信元。当在PVC上收到此信元时终止VC的Cisco设备将会环绕VC,即使它未配置OAM。此外,每个单元将包含“方向”指示符(以标识它是命令还是响应单元)和序列号(在调试中称为Correlation tag或CTag)。 “命令”环回单元和“响应”环回单元将具有相同的序列号。
下图说明环回(LB)信元:
以下显示说明Bernard上环回信元的调试(debug atm oam):
Mar 30 14:22:39.050: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:2 CTag:17128 Tries:0 Mar 30 14:22:39.050: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:42E9 Mar 30 14:22:39.050: ATM OAM LOOP(ATM2/0/0) I: VCD#4 VC 1/116 LoopInd:0CTag:42E9 Mar 30 14:22:48.958: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:2 CTag:17129 Tries:0 Mar 30 14:22:48.958: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:42EA Mar 30 14:22:48.958: ATM OAM LOOP(ATM2/0/0) I: VCD#4 VC 1/116 LoopInd:0CTag:42EA
第一行表示用于标识何时在(子)接口上发出环回信元的计时器已过期。
然后,在相应接口(调试的第二行)上发出命令环回信元。 此行上显示的CTag值是第一行CTag的十六进制值加1。
然后,接收环回信元,LoopInd等于零。
注意:LoopInd=1表示命令单元,LoopInd=0表示响应(循环)单元。LoopInd=1不显示在调试中,但会显示在嗅探器跟踪中。
考虑一台设备(使用PVC),该设备配置为发送OAM信元并使用PVC管理。如果此设备丢失了一定数量的环回信元,则会将PVC置于Down状态。请参阅以下调试:
Mar 30 14:48:31.704: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:2 CTag:17284 Tries:0 Mar 30 14:48:31.704: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:4385 At this point, the sub-interface corresponding to PVC 1/116 on Guilder is shut down Mar 30 14:48:41.684: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:1 CTag:17285 Tries:0 Mar 30 14:48:41.684: atm_oam_setstate - VCD#4, VC 1/116: newstate = Down Retry <-no reply to the loopback cell just sent Mar 30 14:48:41.684: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:4386 Mar 30 14:48:42.680: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:1 CTag:17286 Tries:1 Mar 30 14:48:42.680: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:4387 Mar 30 14:48:43.680: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:1 CTag:17287 Tries:2 Mar 30 14:48:43.680: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:4388 Mar 30 14:48:44.680: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:1 CTag:17288 Tries:3 Mar 30 14:48:44.680: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:4389 Mar 30 14:48:45.676: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:1 CTag:17289 Tries:4 Mar 30 14:48:45.676: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:438A Mar 30 14:48:46.676: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:1 CTag:17290 Tries:5 <- the router makes 5 retries before declaring the PVC down Mar 30 14:48:46.676: atm_oam_setstate - VCD#4, VC 1/116: newstate = Not Verified <-5 retries and no answers -> PVC declared down Mar 30 14:48:46.676: %LINEPROTO-5-UPDOWN: Line protocol on Interface ATM2/0/0.116,changed state to down Mar 30 14:48:46.676: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:438B
您可以配置关闭PVC所需的丢失信元数量。以下show atm pvc vpi/vci命令解释了以前的调试。
Bernard# sh atm pvc 1/116 ATM2/0/0.116: VCD: 4, VPI: 1, VCI: 116 UBR, PeakRate: 155000 AAL5-LLC/SNAP, etype:0x0, Flags: 0xC20, VCmode: 0x0 OAM frequency: 10 second(s), OAM retry frequency: 1 second(s) OAM up retry count: 3, OAM down retry count: 5 OAM Loopback status: OAM Sent OAM VC state: Not Verified ILMI VC state: Not Managed VC is managed by OAM. InARP frequency: 15 minutes(s) InPkts: 4, OutPkts: 4, InBytes: 280, OutBytes: 300 InPRoc: 2, OutPRoc: 0, Broadcasts: 5 InFast: 0, OutFast: 0, InAS: 2, OutAS: 0 InPktDrops: 0, OutPktDrops: 364240961 CrcErrors: 0, SarTimeOuts: 0, OverSizedSDUs: 0 Out CLP=1 Pkts: 0 OAM cells received: 9 F5 InEndloop: 9, F5 InSegloop: 0, F5 InAIS: 0, F5 InRDI: 0 F4 InEndloop: 0, F4 InSegloop: 0, F4 InAIS: 0, F4 InRDI: 0 OAM cells sent: 18 F5 OutEndloop: 18, F5 OutSegloop: 0, F5 OutRDI: 0 F4 OutEndloop: 0, F4 OutSegloop: 0, F4 OutRDI: 0 OAM cell drops: 0 Status: DOWN, State: NOT_VERIFIED
如您所见,F5环回已发送,但未得到应答(18个F5 OutEndloop,但仅9个F5 InEndloop;因此,9个F5环回信元丢失。) 这导致PVC关闭(因为配置了PVC管理)。F5 OutEndloop表示发送的环回信元数,F5 InEndloop表示接收的F5环回信元数。
您还可以看到,存在F4 OAM信元计数器,但没有记录任何内容,因为此处仅考虑F5信元。从上面的show命令输出中,可以收集有关环回信元的其他相关信息:
OAM信元每10秒发送一次,无论PVC是打开还是关闭。
如果PVC已启用,但另一端未响应,则路由器会尝试发送OAM信元,直到收到应答或5个OAM信元未应答。然后PVC关闭(请参阅上面的调试)。
另一端,如果PVC关闭,并突然收到有效的环回信元,它将尝试每秒重新发送LB信元,直到收到3个有效环回信元。然后PVC将再次打开。请参阅以下调试。
Mar 31 12:40:10.154: %LINEPROTO-5-UPDOWN: Line protocol on Interface ATM2/0/0.116, changed state to down Mar 31 12:40:20.074: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:1 CTag:25267 Tries:6 Mar 31 12:40:20.074: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:62B4 Mar 31 12:40:20.074: ATM OAM LOOP(ATM2/0/0) I: VCD#4 VC 1/116 LoopInd:0 CTag:62B4 Mar 31 12:40:20.074: atm_oam_setstate - VCD#4, VC 1/116: newstate = Up Retry ! PVC was down and suddenly receives a valid response loopback cell Mar 31 12:40:21.070: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:2 CTag:25268 Tries:0 Mar 31 12:40:21.070: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:62B5 Mar 31 12:40:21.070: ATM OAM LOOP(ATM2/0/0) I: VCD#4 VC 1/116 LoopInd:0 CTag:62B5 ! first looped LB cell Mar 31 12:40:22.066: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:2 CTag:25269 Tries:0 Mar 31 12:40:22.066: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:62B6 Mar 31 12:40:22.066: ATM OAM LOOP(ATM2/0/0) I: VCD#4 VC 1/116 LoopInd:0 CTag:62B6 ! second looped LB cell in a row Mar 31 12:40:23.062: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:2 CTag:25270 Tries:0 Mar 31 12:40:23.062: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:62B7 Mar 31 12:40:23.062: ATM OAM LOOP(ATM2/0/0) I: VCD#4 VC 1/116 LoopInd:0 CTag:62B7 ! third looped LB cell in a row Mar 31 12:40:23.062: atm_oam_setstate - VCD#4, VC 1/116: newstate = Verified ! PVC is declared up again Mar 31 12:40:23.062: %LINEPROTO-5-UPDOWN: Line protocol on Interface ATM2/0 0.116, changed state to up
如您所见,子接口(因此是PVC)在一行中收到三个有效响应环回信元后再次打开。
注意:用户可以配置上述所有参数,并使用show atm pvc vpi/vci命令检查参数。
当检测到故障时,为OAM配置的设备会向下发送AIS帧,并向上发送RDI帧。
以下示例说明AIS和RDI单元。假设交换机上的Rx信号消失。在这种情况下,故障称为信号丢失(LOS)。 检测到它的交换机将AIS发送到与故障相比的下游,将RDI发送到与故障相比的上游。
收到此类信元时,配置用于PVC管理的终端设备会关闭受影响的PVC。 这些AIS和RDI信元使用与PVC上的用户信元相同的VPI/VCI发送。此外,设备每秒发送这些信元,直到故障消失。
可以通过多种方式检测故障:
较低的OAM级别(F1 AIS、信号丢失等)报告它。
接收AIS或RDI会触发它。
设备不再接收CC信元。
连续性检查(CC)单元是为OAM配置的设备定期发送并用于检查“链路”完整性的单元。思科路由器不发送这些信元,因此此处不讨论这些信元。有关OAM CC信元的详细信息,请参阅ITU-T I.610。
以下调试显示在收到AIS/RDI信元时,配置为PVC管理的路由器上发生的情况:
Mar 31 13:11:18.990: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:2 CTag:25470 Tries:0 Mar 31 13:11:18.990: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:637F Mar 31 13:11:18.990: ATM OAM LOOP(ATM2/0/0) I: VCD#4 VC 1/116 LoopInd:0 CTag:637F
此时,Bernard上的PVC关闭(Guilder上的主接口关闭):
Mar 31 13:11:28.894: ATM OAM(ATM2/0/0.116): Timer: VCD#4 VC 1/116 Status:2 CTag:25471 Tries:0 Mar 31 13:11:28.894: ATM OAM LOOP(ATM2/0/0.116) O: VCD#4 VC 1/116 CTag:6380 Mar 31 13:11:29.806: atm_oam_ais(ATM2/0/0): AIS signal, failure=0x6A, VC 1/116 Mar 31 13:11:29.806: atm_oam_setstate - VCD#4, VC 1/116: newstate = AIS/RDI Mar 31 13:11:29.806: %LINEPROTO-5-UPDOWN: Line protocol on Interface ATM2/0/0.116, changed state to down Mar 31 13:11:30.806: atm_oam_ais(ATM2/0/0): AIS signal, failure=0x6A, VC 1/116 Mar 31 13:11:31.806: atm_oam_ais(ATM2/0/0): AIS signal, failure=0x6A, VC 1/116 Mar 31 13:11:32.806: atm_oam_ais(ATM2/0/0): AIS signal, failure=0x6A, VC 1/116
您可以使用以下命令检查新的PVC状态:
Bernard# sh atm pvc 1/116 ATM2/0/0.116: VCD: 4, VPI: 1, VCI: 116 UBR, PeakRate: 155000 AAL5-LLC/SNAP, etype:0x0, Flags: 0xC20, VCmode: 0x0 OAM frequency: 10 second(s), OAM retry frequency: 1 second(s) OAM up retry count: 3, OAM down retry count: 5 OAM Loopback status: OAM Sent OAM VC state: AIS/RDI ILMI VC state: Not Managed VC is managed by OAM. InARP frequency: 15 minutes(s) InPkts: 4, OutPkts: 2, InBytes: 140, OutBytes: 60 InPRoc: 0, OutPRoc: 0, Broadcasts: 0 InFast: 0, OutFast: 0, InAS: 4, OutAS: 2 InPktDrops: 0, OutPktDrops: 0 CrcErrors: 0, SarTimeOuts: 0, OverSizedSDUs: 0 Out CLP=1 Pkts: 0 OAM cells received: 14 F5 InEndloop: 0, F5 InSegloop: 0, F5 InAIS: 14, F5 InRDI: 0 F4 InEndloop: 0, F4 InSegloop: 0, F4 InAIS: 0, F4 InRDI: 0 OAM cells sent: 15 F5 OutEndloop: 1, F5 OutSegloop: 0, F5 OutRDI: 14 F4 OutEndloop: 0, F4 OutSegloop: 0, F4 OutRDI: 0 OAM cell drops: 0 Status: DOWN, State: NOT_VERIFIED
如您所见,PVC关闭是因为它收到F5 AIS或RDI信号(在本例中为AIS)。 您还可以看到,路由器在收到F5 AIS信元时生成了F5 RDI信元。
以下示例说明路径上两台交换机上的活动:
在LS1010-1上:
1d03h: % OAM Pkt Rcv 1d03h: % Intf: 0/0/0 VPI: 1 VCI: 116 OAM: F5-END-LPBK ! OAM LB cell 1d03h: % OAM Pkt Sent 1d03h: % Intf: 0/0/1 VPI: 1 VCI: 116 OAM: F5-END-LPBK ! OAM LB cell
此时,PVC在吉尔德上下:
1d03h: % OAM Pkt Rcv 1d03h: % Intf: 0/0/1 VPI: 1 VCI: 116 OAM: F5-AIS ! AIS cell sent downstream by LS1010-2 upon detection of the failure 1d03h: % OAM Pkt Sent 1d03h: % Intf: 0/0/0 VPI: 1 VCI: 116 OAM: F5-AIS 1d03h: % OAM Pkt Rcv 1d03h: % Intf: 0/0/0 VPI: 1 VCI: 116 OAM: F5-RDI ! RDI sent by Bernard upstream compared to the failure 1d03h: % OAM Pkt Sent 1d03h: % Intf: 0/0/1 VPI: 1 VCI: 116 OAM: F5-RDI ! Bernard's RDI forwarded upstream 1d03h: % OAM Pkt Rcv 1d03h: % Intf: 0/0/1 VPI: 1 VCI: 116 OAM: F5-AIS 1d03h: % OAM Pkt Sent 1d03h: % Intf: 0/0/0 VPI: 1 VCI: 116 OAM: F5-AIS
等等,直到故障消除。
在LS1010-2上:
在检测到故障时(在本例中,Rx-signal消失在连接到Guilder的int atm 1/1/2上),AIS信元将下行发送到LS1010-1:
Mar 31 13:17:09.847: % OAM Pkt Sent Mar 31 13:17:09.847: % Intf: 0/0/0 VPI: 1 VCI: 116 OAM: F5-AIS Mar 31 13:17:10.847: % OAM Pkt Sent Mar 31 13:17:10.847: % Intf: 0/0/0 VPI: 1 VCI: 116 OAM: F5-AIS
如您到目前为止所有调试中所看到的,所有F5 OAM信元都在VPI 1 VCI 116上发送,VPI 1 VCI是用户信元使用的VPI/VCI。
debug atm oam(在路由器上)
show atm pvc vpi/vci,带12.0和12.0T
show atm vc <vcd>,带11.1CC
show int atm x[/y/[z]].w(我们建议您尽可能使用show atm pvc,而不是show int atm x),带12.0
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
15-Nov-2007 |
初始版本 |