This document discusses the Automatic Protection Switching (APS) feature and provides an example of how to configure APS for Packet Over SONET (POS) redundancy.
This document enables you to understand how APS works, and helps you to configure and maintain APS on Cisco routers. The network topology in figure 1 is the basis of this document:
Figure 1 – Network Topology
Cisco recommends that you have knowledge of these topics:
Synchronous Optical Network (SONET) and POS technologies.
Cisco router configuration basics.
The information in this document is based on these software and hardware versions:
Cisco IOS® Software Release 12.0(10)S.
Cisco 12000 series hardware platforms.
Support for the APS feature is available on the Cisco 7500 and 12000 series hardware platforms, and on Cisco IOS Software Release 12.2(5) and later.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Refer to Cisco Technical Tips Conventions for more information on document conventions.
The APS feature provides redundancy and allows for a switchover of POS circuits in the event of circuit failure. The implementation of APS allows you to configure a pair of SONET lines for line redundancy. When the Working (W) interface fails, the Protect (P) interface quickly assumes the traffic load. In the event of a fiber cut, the active line switches automatically to the standby line within 60 milliseconds (10 millisecond initiation and 50 millisecond switchover). SONET APS performs switchovers at Layer 1 (L1). Therefore, the switchover is significantly faster than at Layer 2 (L2) or Layer 3 (L3).
The protection mechanism that this feature uses has 1+1 architecture, as described in the Bellcore publication TR-TSY-000253, SONET Transport Systems, Common Generic Criteria, Section 5.3. SONET APS complies with GR-253 and ITU-T G.783. Therefore, SONET APS allows Cisco routers to integrate seamlessly with SONET Add/Drop Multiplexers (ADMs). This feature allows configuration of either bidirectional or unidirectional switching, but bidirectional non-revertive switching is the default.
In the APS 1+1 architecture, each redundant line pair consists of a W interface and a P interface. The W and P interfaces are connected to a SONET ADM, which sends the same signal payload to the W and P interfaces. The W and P circuits can terminate in two ports of the same adapter, line card, or in two different routers. When a Signal Fail (SF) condition or a Signal Degrade (SD) condition occurs, the hardware switches from the W line to the P line. There is a revertive option. Upon detection of a SF condition, the hardware switches back to the W line automatically after the repair of the W line, and the elapse of a configured period. The in-band Protect Group Protocol (PGP) achieves coordination between the W line and the P line. In the non-revertive option, if an SF condition occurs, the hardware switches to the P line and does not automatically revert to the W line.
On the P circuit, the K1/K2 bytes from the Line OverHead (LOH) of the SONET frame indicate the current status of the APS connection, and convey any requests for action. The two ends of the connection use this signaling channel to maintain synchronization. The W and P circuits themselves, within the router or routers in which they terminate, are synchronized over an independent communication channel (using APS PGP), isolated from the W and P circuits. This independent channel can be a different SONET connection, Ethernet, or a lower-bandwidth connection. In a router configured for APS, the configuration for the P interface includes the IP address of the router (normally and recommended to be the loopback address) that has the W interface.
The APS PGP, which runs on top of the User Datagram Protocol (UDP), provides communication between the process that controls the W interface and the process that controls the P interface. The process that controls the P circuit uses this protocol to direct the process that contains the W circuit, on whether to activate or deactivate the W circuit, in the case of degradation, loss of channel signal, or manual intervention. If the two processes lose communication with each other, the W router assumes full control of the W circuit as if no P circuit existed.
Here are the APS triggers categorized hierarchically (from lowest priority to highest priority):
Manual switch request.
SD condition (Bit Error Rate (BER) exceeding the SD threshold).
SF condition (Loss of Frame (LOF), Loss of Signal (LOS), Alarm Indication Signal-Line(AIS-L), and a Line BER that exceeds 10-3/or user-provisionable).
Forced switch request.
Here are the IOS options to configure APS:
GSR(config-if)# aps ? authentication Authentication string force Force channel group Group association lockout Lockout protection channel manual Manually switch channel protect Protect specified circuit reflector Configure for reflector mode APS revert Specify revert operation and interval signaling Specify SONET/SDH K1K2 signaling timers APS timers unidirectional Configure for unidirectional mode working Working channel number
In addition to the new IOS commands for the APS feature, the POS interface configuration commands POS threshold and POS report have been added to support user configuration of the BER thresholds and reporting of SONET alarms. Here is a sample output:
GSR(config-if)# POS threshold ? b1-tca B1 BER threshold crossing alarm b2-tca B2 BER threshold crossing alarm b3-tca B3 BER threshold crossing alarm sd-ber set Signal Degrade BER threshold sf-ber set Signal Fail BER threshold GSR(config-if)# POS report ? all all Alarms/Signals b1-tca B1 BER threshold crossing alarm b2-tca B2 BER threshold crossing alarm b3-tca B3 BER threshold crossing alarm lais Line Alarm Indication Signal lrdi Line Remote Defect Indication pais Path Alarm Indication Signal plop Path Loss of Pointer prdi Path Remote Defect Indication rdool Receive Data Out Of Lock sd-ber LBIP BER in excess of SD threshold sf-ber LBIP BER in excess of SF threshold slof Section Loss of Frame slos Section Loss of Signal
In bidirectional mode, the Receive (Rx) and Transmit (Tx) channels are switched as a pair. In unidirectional mode, the Tx and Rx channels are switched independently. For example, in bidirectional mode, if the Rx channel on the W interface has a loss of channel signal, both the Rx and Tx channels are switched.
The W router recognizes failure and notifies the P router (through local interconnect PGP). The P router instructs the W router to deselect the W interface (through local interconnect PGP). The P router requests the ADM to switch Tx and Rx to P (through K1/K2 bytes on the P interface that go to the ADM). The P router selects the P interface and the ADM complies with the switch request and signals compliance (through K1/K2 bytes on ADM to the P interface fiber).
When there is a LOS/LOF alarm (failure) on the W Rx, the W router recognizes the failure and notifies the P router (through local interconnect PGP). The P router instructs the W router to deselect the W interface (through local interconnect PGP). The W router asserts a Line Alarm Indication Signal (LAIS) for as long as the W interface is deselected to force the ADM to switch the Rx to the P interface. The P router requests the ADM to switch to the P interface (through K1/K2 bytes on the P interface to ADM fiber). The P router selects the P interface and the ADM complies with the switch request.
In unidirectional mode, the router coerces the ADM to switch. In order to do so, the router asserts LAIS (persistently, if on W; momentarily, if on P). Therefore, the unidirectional that you see is quite real, in that the unidirectional mode complies with GR-253. However, what the unidirectional also does is, to force a second unidirectional switch, which makes the switch appear to be bidirectional. This is the result of constraints that are deeply embedded in routing mechanisms (IP), which at every level assume traffic must have Rx and Tx on the same interface. In summary, the router complies with the unidirectional protocols in GR-253, but forces the switching into a model that supports IP. Hence, the router does not support Tx and Rx on different fiber pairs.
Note: A major deviation of the Cisco 12000 Series from GR-253 is that the Cisco 12000 Series does not bridge transmits to W and P, but keeps one interface active at a time.
The ADM sees the fiber failure and sends SF SWITCH REQUEST to the P router (through K1/ K2 bytes on P interface fiber), and requests a switch to the P interface. The P router instructs the W router to deselect (deactivate) the W interface (through local interconnect). The P router selects (activates) the P interface. The P router informs the ADM of the compliance with the switch request (through K1/ K2 bytes on the P interface ADM fiber).
The W router recognizes failure and notifies the P router (through local interconnect). The P router instructs the W router to deselect the W interface (through local interconnect). The P router requests ADM to switch Tx and Rx to P (through K1/K2 bytes on the P interface to the ADM fiber). The P router selects the P interface and ADM complies with the switch requests and signals compliance (through K1/K2 bytes on ADM to the P interface fiber).
The W router recognizes failure and notifies the P router (through local interconnect). The P router instructs the W router to deselect the W interface (through local interconnect). The W router asserts a LAIS for 100 ms to force the ADM to switch the Rx to the P interface. The P router requests ADM to switch to the P interface (through K1/K2 bytes on the P interface to ADM fiber). The P router selects the P interface and the ADM complies with the switch request.
Both sequences begin. Whether the P router first initiates the switch to P, or the ADM initiates the switch does not matter, because the result is the same.
POS-equipped Cisco routers act as Terminal Equipment (TE) for SONET/Synchronous Digital Hierarchy (SDH) section, line, and path segments of a link, and can detect and report these SONET/SDH errors and alarms:
Section: LOS, LOF, and Threshold Crossing Alarms (TCA) (B1)
Line: AIS (line and path), Remote Defect Indication (RDI) (line and path), Remote Error Indication (REI), TCA (B2)
Path: AIS, RDI, REI, (B3), New Pointer Events (NEWPTR), POSitive Stuffing Event (PSE), Negative Stuffing Event (NSE)
Other reported information includes:
SF-ber
SD-ber
C2 - signal label (payload construction)
J1 - path trace byte
B1, B2, and B3 are categorized as performance-monitoring parameters, while others such as LOS, LOF, and LAIS fall under alarms. Performance monitoring pertains to advance alerts, while alarms indicate failures. K1/K2 byte status is also reported for SONET APS or SDH Multiservice Switching Path (MSP).
When you discuss APS, you first need to understand how SONET uses K1/K2 bytes in the LOH.
Each Synchronous Transport Signal-1 (STS-1) consists of 810 bytes, which includes 27 bytes for the Transport Overhead (TOH) and 783 bytes for the Synchronous Payload Envelope (SPE). Table 1 illustrates the format of an STS-1 frame and the 9 rows by 90 columns.
Table 1 – Format of an STS-1 FramePath Overhead | ||||
---|---|---|---|---|
Section Overhead | A1 Framing | A2 Framing | A3 Framing | J1 Trace |
B1 BIP-8 | E1 Orderwire | E1 User | B3 BIP-8 | |
D1 Data Com | D2 Data Com | D3 Data Com | C2 Signal Label | |
Line Overhead | H1 Pointer | H2 Pointer | H3 Pointer Action | G1 Path Status |
B2 BIP-8 | K1 | K2 | F2 User Channel | |
D4 Data Com | D5 Data Com | D6 Data Com | H4 Indicator | |
D7 Data Com | D8 Data Com | D9 Data Com | Z3 Growth | |
D10 Data Com | D11 Data Com | D12 Data Com | Z4 Growth | |
S1/Z1 Sync Status/Growth | M0 or M1/Z2 REI-L Growth | E2 Orderwire | Z5 Tandem Connection |
The K1/K2 bytes form a 16-bit field. Table 2 lists the usage of each bit.
Table 2 – K1 Bit DescriptionsBits (hex) | Description |
---|---|
K1 Bits 12345678 | |
Bits 5 through 8 | |
nnnn | Channel number associated with the command code. |
Bits 1 through 4 | |
1111 (0xF) | Lockout of protection request. |
1110 (0xE) | Forced switch request. |
1101 (0xD) | SF - high priority request. |
1100 (0xC) | SF - low priority request. |
1011 (0xB) | SD - high priority request. |
1010 (0xA) | SD - low priority request. |
1001 (0x9) | Not used. |
1000 (0x8) | Manual switch request. |
0111 (0x7) | Not used. |
0110 (0x6) | Wait to restore request. |
0101 (0x5) | Not used. |
0100 (0x4) | Exercise request. |
0011 (0x3) | Not used. |
0010 (0x2) | Reverse request. |
0001 (0x1) | Do not revert request. |
0000 (0x0) | No request. |
Note: Bit 1 is the low-order bit.
Table 3 – K2 Bits DescriptionsBits | Description |
---|---|
K2 Bits 12345678 | |
Bits 1 through 4 | |
nnnn | Channel number associated with the command code. |
Bit 5 | |
1 | One to n (1:n) architecture. |
0 | One plus one (1+1) architecture. |
Bits 6 through 8 | |
111 | Line AIS. |
110 | Line RDI. |
101 | Bidirectional operation mode. |
100 | Unidirectional operation mode. |
Other | Reserved. |
Note: In K2 (12345678):
K2[1-4] – Currently bridged channel number.
K2[5] – Architecture (always 0 for 1+1).
K2[6-8] – Provisioned operating mode (4 = unidir; 5 = bidir).
K2[6-8] – Also carries the alarm code 6=LRDI and 7=LAIS.
Note: In SDH, K2[6-8] carries only the alarm codes. The operating mode is not sent.
Note: For example, what are the values for K1 and corresponding K2 on the W if the router receives an SF? On the P side?
Note: Answer: Only the P transmits and reads K1/K2, never the W. In bidirectional mode, if the W receives an SF, and no higher request preempts it, the code from P to the ADM is:
K1= 0xC1 (switch request, SF on 1=working, low priority) K2 = 0x05 (protect bridged [working bridge is incomplete];bidirectional)
Note: After the ADM answers:
K1 = 0x21 (Reverse request, channel 1) K2 = 0x15 (Working bridged; bidirectional)
Note: The protect router's txk1k2 will be:
K1=0xC1 (switch request, SF on 1=working, low priority) K2 = 0x15 (working bridged; bidirectional)
Note: At this point, the switch is complete.
Figure 2 shows a basic APS 1+1 configuration from a GSR to an ADM (ONS 15454) in bidirectional mode, non-revertive (default on Cisco 12000 Series). APS is linear switched, and is done on the line level (between the Cisco 12000 Series and ADM versus path or end-to-end).
Note: This example does not have an independent channel for PGP because both the W and P interfaces are on the same router.
Figure 2 – A Basic APS 1+1 Configuration
gsrA# show running-config ! interface Loopback0 ip address 100.1.1.1 255.255.255.0 no ip directed-broadcast ! interface POS1/0 ip address 10.1.1.1 255.255.255.0 no ip directed-broadcast crc 16 aps group 10 aps working 1 ! interface POS1/1 ip address 10.1.1.3 255.255.255.0 no ip directed-broadcast no keepalive crc 16 aps group 10 aps revert 1 aps protect 1 100.1.1.1 ! router ospf 100 network 10.1.1.0 0.0.0.255 area 0 network 100.1.1.0 0.0.0.255 area 0 gsrB#show running-config ! interface Loopback0 ip address 200.1.1.1 255.255.255.0 ! interface POS3/0 ip address 10.1.1.2 255.255.255.0 no ip directed-broadcast crc 16 aps group 10 aps working 1 ! interface POS3/1 ip address 10.1.1.4 255.255.255.0 no ip directed-broadcast no keepalive crc 16 aps group 10 aps revert 1 aps protect 1 200.1.1.1 ! router ospf 100 network 10.1.1.0 0.0.0.255 area 0 network 200.1.1.0 0.0.0.255 area 0 !
In order to provide information about system processes, the IOS software includes an extensive list of EXEC commands that begin with the word show. When you execute these show commands, detailed tables of system information appear. Here is a list of some of the common show commands for the APS feature, along with sample outputs:
show aps
show controllers POS
show interface POS
! gsrA# show aps POS1/1 APS Group 10: protect channel 0 (inactive) bidirectional, revertive (1 min) SONET framing; SONET APS signaling by default Received K1K2: 0x20 0x05 Reverse Request (protect) Transmitted K1K2: 0xE0 0x05 Forced Switch (protect) Working channel 1 at 100.1.1.1 (Enabled) Pending local request(s): 0x0E (No Request, channel(s) 0 1) Remote APS configuration: working POS1/0 APS Group 10: working channel 1 (active) !--- Verify whether the working channel is active. SONET framing; SONET APS signaling by default Protect at 100.1.1.1 Remote APS configuration: working gsrA# show controllers POS 1/0 POS1/0 SECTION LOF = 0 LOS = 0 BIP(B1) = 0 LINE AIS = 0 RDI = 0 FEBE = 0 BIP(B2) = 0 PATH AIS = 0 RDI = 0 FEBE = 0 BIP(B3) = 0 LOP = 0 NEWPTR = 0 PSE = 0 NSE = 0 Active Defects: None Active Alarms: None Alarm reporting enabled for: SF SLOS SLOF B1-TCA B2-TCA PLOP B3-TCA Framing: SONET APS working (active) !--- Ensure that the working channel is active. COAPS = 0 PSBF = 0 State: PSBF_state = False ais_shut = FALSE Rx(K1/K2): 00/00 S1S0 = 00, C2 = CF Remote aps status working; Reflected local aps status working CLOCK RECOVERY RDOOL = 0 State: RDOOL_state = False PATH TRACE BUFFER : STABLE Remote hostname : 12012 Remote interface: POS3/0 Remote IP addr : 10.1.1.2 Remote Rx(K1/K2): 00/00 Tx(K1/K2): 00/00 BER thresholds: SF = 10e-3 SD = 10e-6 TCA thresholds: B1 = 10e-6 B2 = 10e-6 B3 = 10e-6 ! gsrA# show controllers POS 1/1 POS1/1 SECTION LOF = 0 LOS = 0 BIP(B1) = 0 LINE AIS = 0 RDI = 0 FEBE = 0 BIP(B2) = 0 PATH AIS = 0 RDI = 0 FEBE = 0 BIP(B3) = 0 LOP = 0 NEWPTR = 0 PSE = 0 NSE = 0 Active Defects: None Active Alarms: None Alarm reporting enabled for: SF SLOS SLOF B1-TCA B2-TCA PLOP B3-TCA Framing: SONET APS protect (inactive) COAPS = 0 PSBF = 0 State: PSBF_state = False ais_shut = FALSE Rx(K1/K2): 20/05 Tx(K1/K2): E0/05 Signalling protocol: SONET APS by default S1S0 = 00, C2 = CF Remote aps status working; Reflected local aps status working CLOCK RECOVERY RDOOL = 0 State: RDOOL_state = False PATH TRACE BUFFER : STABLE Remote hostname : 12012 Remote interface: POS3/0 Remote IP addr : 10.1.1.2 Remote Rx(K1/K2): 00/00 Tx(K1/K2): 00/00 BER thresholds: SF = 10e-3 SD = 10e-6 TCA thresholds: B1 = 10e-6 B2 = 10e-6 B3 = 10e-6 ! gsrA# show interface p1/0 POS1/0 is up, line protocol is up (APS working - active) !--- Verify whether the working channel is active. gsrA# show interface p1/1 POS1/1 is up, line protocol is down (APS protect - inactive) ! gsrB# show aps POS3/1 APS Group 10: protect channel 0 (inactive) bidirectional, revertive (1 min) SONET framing; SONET APS signaling by default Received K1K2: 0x00 0x05 No Request (Null) Transmitted K1K2: 0x00 0x05 No Request (Null) Working channel 1 at 200.1.1.1 (Enabled) Remote APS configuration: working POS3/0 APS Group 10: working channel 1 (active) !--- Verify whether the working channel is active. SONET framing; SONET APS signaling by default Protect at 200.1.1.1 Remote APS configuration: working ! gsrB# show controllers p 3/0 POS3/0 SECTION LOF = 11 LOS = 11 BIP(B1) = 46701837 LINE AIS = 10 RDI = 11 FEBE = 1873 BIP(B2) = 8662 PATH AIS = 14 RDI = 27 FEBE = 460909 BIP(B3) = 516875 LOP = 0 NEWPTR = 11637 PSE = 2 NSE = 16818 Active Defects: None Active Alarms: None Alarm reporting enabled for: SF SLOS SLOF B1-TCA B2-TCA PLOP B3-TCA Framing: SONET APS working (active) !--- Verify whether the working channel is active. COAPS = 103 PSBF = 0 State: PSBF_state = False ais_shut = FALSE Rx(K1/K2): 00/00 S1S0 = 00, C2 = CF Remote aps status working; Reflected local aps status working CLOCK RECOVERY RDOOL = 11 State: RDOOL_state = False PATH TRACE BUFFER : STABLE Remote hostname : hswan-gsr12008-2b Remote interface: POS1/0 Remote IP addr : 10.1.1.1 Remote Rx(K1/K2): 00/00 Tx(K1/K2): 00/00 BER thresholds: SF = 10e-3 SD = 10e-6 TCA thresholds: B1 = 10e-6 B2 = 10e-6 B3 = 10e-6 ! gsrB# show controllers p 3/1 POS3/1 SECTION LOF = 10 LOS = 10 BIP(B1) = 250005115 LINE AIS = 11 RDI = 8 FEBE = 517 BIP(B2) = 5016 PATH AIS = 14 RDI = 25 FEBE = 3663 BIP(B3) = 7164 LOP = 0 NEWPTR = 184 PSE = 1 NSE = 247 Active Defects: None Active Alarms: None Alarm reporting enabled for: SF SLOS SLOF B1-TCA B2-TCA PLOP B3-TCA Framing: SONET APS protect (inactive) COAPS = 538 PSBF = 0 State: PSBF_state = False ais_shut = FALSE Rx(K1/K2): 00/05 Tx(K1/K2): 00/05 Signalling protocol: SONET APS by default S1S0 = 00, C2 = CF Remote aps status working; Reflected local aps status working CLOCK RECOVERY RDOOL = 10 State: RDOOL_state = False PATH TRACE BUFFER : STABLE Remote hostname : hswan-gsr12008-2b Remote interface: POS1/0 Remote IP addr : 10.1.1.1 Remote Rx(K1/K2): 00/00 Tx(K1/K2): 00/00 BER thresholds: SF = 10e-3 SD = 10e-6 TCA thresholds: B1 = 10e-6 B2 = 10e-6 B3 = 10e-6 ! gsrB#show interface p3/0 POS3/0 is up, line protocol is up (APS working - active) !--- Verify whether the working channel is active. gsrB#show interface p3/1 POS3/1 is up, line protocol is down (APS protect - inactive) !
In order to troubleshoot problems with APS, collect the output from these show and debug commands:
show ver
show run
show ip int b
show contr POS
debug aps
show aps
Perform the necessary actions to recreate the problem. Issue these commands to collect the final output and turn off the debug:
show aps
no debug aps
Note: Under normal conditions, the debug aps command produces no output. When an abnormal condition occurs, this command reports the condition.
Note: If the W and P fibers are in different routers (as they usually are), you must collect the command outputs on both routers.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
10-Jan-2006 |
Initial Release |