Synchronous Optical NETwork (SONET)

Understanding the C2 Flag Byte on Packet Over SONET (POS) Interfaces

Document ID: 16146

Updated: Dec 01, 2005



This document explains how Synchronous Optical Network (SONET)/Synchronous Digital Hierarchy (SDH) frames use the C2 byte in the Path OverHead (POH) to indicate the contents of the payload inside the frame. This document also explains how Packet over SONET (POS) interfaces use the C2 byte to indicate specifically, whether or not the payload is scrambled.



There are no specific requirements for this document.

Components Used

This document is not restricted to specific software and hardware versions.

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.

SONET Frame Fundamentals

Before a discussion on the C2 byte, you first need to understand some SONET fundamentals.

SONET is a Layer 1 (L1) protocol that uses a layered architecture. Figure 1 shows the three layers of SONET, namely, section, line, and path.

The Section OverHead (SOH) and Line OverHead (LOH) form the Transport OverHead (TOH), while the POH and actual payload (referred to as Payload Capacity in Figure 1) form the Synchronous Payload Envelope (SPE).

Figure 1 – The Three Layers of SONET


Each layer adds some number of overhead bytes to the SONET frame. This table illustrates the overhead bytes of the SONET frame:

Path 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 D5 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

Note: The table displays the C2 byte in bold for emphasis.

What is the C2 Byte?

The SONET standard defines the C2 byte as the path signal label. The purpose of this byte is to communicate the payload type that the SONET Framing OverHead (FOH) encapsulates. The C2 byte functions similar to Ethertype and Logical Link Control (LLC)/Subnetwork Access Protocol (SNAP) header fields on an Ethernet network. The C2 byte allows a single interface to transport multiple payload types simultaneously.

This table lists common values for the C2 byte:

Hex Value SONET Payload Contents
00 Unequipped.
01 Equipped - non-specific payload.
02 Virtual Tributaries (VTs) inside (default).
03 VTs in locked mode (no longer supported).
04 Asynchronous DS3 mapping.
12 Asynchronous DS-4NA mapping.
13 Asynchronous Transfer Mode (ATM) cell mapping.
14 Distributed Queue Dual Bus (DQDB) cell mapping.
15 Asynchronous Fiber Distributed Data Interface (FDDI) mapping.
16 IP inside Point-to-Point Protocol (PPP) with scrambling.
CF IP inside PPP without scrambling.
E1- FC Payload Defect Indicator (PDI).
FE Test signal mapping (see ITU Rec. G.707).
FF Alarm Indication Signal (AIS).

C2 Byte and Scrambling

With reference to the table, POS interfaces use a value of 0x16 or 0xCF in the C2 byte depending on whether ATM-style scrambling is enabled. RFC 2615, which defines PPP over SONET/SDH, mandates the use of these values based on the scrambling setting. This is how the RFC defines the C2 byte values:

"The value of 22 (16 hex) is used to indicate PPP with X^43+ 1 scrambling [4]. For compatibility with RFC 1619 (STS-3c-SPE/VC-4 only), if scrambling has been configured to be off, then the value 207 (CF hex) is used for the Path Signal Label to indicate PPP without scrambling."

In other words:

  • If scrambling is enabled, POS interfaces use a C2 value of 0x16.

  • If scrambling is disabled, POS interfaces use a C2 value of 0xCF.

Most POS interfaces that use a default C2 value of 0x16 (22 decimal) insert the pos flag c2 22 command in the configuration, although this line does not appear in the running configuration because 0x16 is the default value. Use the pos flag c2 command to change the default value.

7507-3a(config-if)#pos flag c2 ?
   <0-255>  byte value

Use the show running-config command to confirm your change. The show controller pos command outputs the receive value. Therefore, a change in the value on the local end does not change the value in the show controller command output.

7507-3a#show controller pos 0/0/0
COAPS = 13       PSBF = 3
 State: PSBF_state = False
 Rx(K1/K2): 00/00  Tx(K1/K2): 00/00
 S1S0 = 00, C2 = CF

Understand Scrambling and Two Levels

Scrambling randomizes the pattern of 1s and 0s carried in the SONET frame in order to prevent continuous strings of all 1s or all 0s. This process also meets the needs of physical layer protocols that rely on sufficient transitions between 1s and 0s to maintain clocking.

POS interfaces support two levels of scrambling, which are explained here:

  • The International Telecommunications Union (ITU-T) GR-253 standard defines a 1 + x6 + x7 algorithm that scrambles all but the first row of the SOH. You cannot disable this scrambler, which is adequate when the SONET frames carry phone calls in the payload.

  • The ITU-T I.432 standard defines what POS interfaces refer to as ATM-style scrambling. This scrambler uses a polynomial of 1 + x43, and is a self-synchronous scrambler. This means that the sender does not need to send any state to the receiver.

As a relatively simple string of 0s can lead to a line flap and interrupt service, Cisco recommends that you enable ATM-style scrambling in all configurations, including dark fiber. On some line cards on the Gigabit Switch Router (GSR), for example, the OC-192 POS, the scrambling command has been removed from the command-line interface, and you must enable this command. Scrambling remains OFF by default on lower-speed POS line cards for backward compatibility.

Scrambling is performed in hardware, and poses no performance penalty on the router. Scrambling occurs directly in the framer Application-Specific Integrated Circuit (ASIC) on newer line cards like the GSR's 8/16xOC3 and 4xOC12, or in an adjacent ASIC on older line cards like the GSR's 4xOC3 or 1xOC12 POS.

Figure 2 shows the proper order of operation, and indicates when scrambling is performed during transmission.

Figure 2 – The Proper Order of Operation


Understand the pos scramble-atm and pos flag c2 0x16 Commands

When you configure the pos scramble-atm command, the POS interface is configured to use ATM-style scrambling, and the pos flag c2 22 command is placed in the configuration. Execution of the pos flag c2 22 command without the pos atm-scramble command simply configures the C2 byte in the SONET header to alert the receiving interface that the payload is scrambled. In other words, only the pos scramble-atm command actually activates scrambling.

Third-Party POS Interfaces

If a Cisco POS interface fails to come up/up when connected to a third-party device, confirm the scrambling and Cyclic Redundancy Check (CRC) settings as well as the advertised value in the C2 byte. On routers from Juniper Networks, configuration of the rfc-2615 mode sets these three parameters:

  • Scrambling enabled

  • C2 value of 0x16

  • CRC-32

Previously, when scrambling was enabled, these third-party devices continued to use a C2 value of 0xCF value, which did not properly reflect the scrambled payload.

Related Information

Updated: Dec 01, 2005
Document ID: 16146