Classification and mapping

Traffic classification includes functions that examine a packet to determine further actions according to defined rules. Classification involves identifying flows so that the router can modify the packet contents or Per-Hop Behavior (PHB), apply conditioning treatments to the packet, and determine how to forward the packet to the egress interface. Packet classification depends on the service type of the packet and the point in the traffic management process where the classification occurs.

The device classifies traffic as it enters the DiffServ network, and assigns appropriate PHB based on the classification. To differentiate between classes of service, the device marks the DiffServ (DS) parameter in the IP packet header, as defined in RFC2474 and RFC2475. The DSCP marking defines the forwarding treatment of the packet at each network hop. This marking (or classification) occurs at the edge of the DiffServ domain, and is based on the policy (or filter) associated with the particular microflow or aggregate flow.

You can configure the mapping of DSCP-to-forwarding behaviors and DSCP re-markings. Re-marking the DSCP resets the treatment of packets based on new network specifications or desired levels of service.

Layer 3 marking uses the DSCP parameter. Layer 2 (Ethernet) marking involves the 802.1p-bits parameter.

For Layer 2 packets, priority bits (or 802.1p bits) define the traffic priority of the Ethernet packet. You can configure an interface to map DSCP or 802.1p bits to internal QoS levels on ingress. You can configure an interface to map internal QoS levels to DSCP or 802.1p bits at egress. 802.1p bit mapping provides the Ethernet VLAN QoS requirements.

Within the network, a packet PHB associated with the DSCP determines how a device forwards the packet to the next hop—if at all. Consequently, nodes can allocate buffer and bandwidth resources to each competing traffic stream. The initial DSCP value is based on network policies for the type of service required. The objective of DSCP-to-Service Class mapping is to translate the QoS characteristics defined by the packet DSCP marker to a Service Class. The DSCP-to-Service Class mapping occurs at ingress. For each received packet, the mapping function assigns a Service Class.

The switch maintains four mapping tables. These tables translate the ingress 802.1p-bits or DSCP markings to an internal QoS level, and then retranslate the internal QoS level to an egress DSCP or 802.1p-bits marking as follows:

  • ingress 802.1p-bits to QoS level

  • ingress DSCP to QoS level

  • QoS level to egress 802.1p-bits

  • QoS level to egress DSCP

Service classes

Service classes define a standard architecture to provide end-to-end QoS on a broad range of Ethernet switching and voice products. They function as default QoS policies built into the product. They incorporate the various QoS technologies to provide a complete end-to-end QoS behavioral treatment. The switch includes a built-in QoS implementation for service classes.

The switch includes eight preconfigured queues (corresponding to the eight service classes) on each port of an interface module.

A service class domain classifies traffic as one of the following:

  • Network control traffic (Critical/Network)

  • Subscriber traffic (Premium, Metal, or Standard)

Queue 7 — Critical/Network Service Class (PHB of CS6/CS7)

The switch uses the Critical/Network Service Class for traffic within a single administrative network domain. If such traffic does not get through, the network cannot function.

Queue 6 — Premium Service Class (PHB of CS5/EF)

The switch uses the Premium Service Class for IP telephony services, and provides the low latency and low jitter required to support such services. IP telephony services include Voice over IP (VoIP), voice signaling, Fax over IP (FoIP), and voice-band data services over IP (for example, analog modem). The switch can also use the Premium Service Class for Circuit Emulation Services over IP (CESoIP).

Metal Service Classes

The Platinum, Gold, Silver, and Bronze Service Classes are collectively referred to as the metal classes. The metal Service Classes provide a minimum bandwidth guarantee and are for variable bit rate or bursty types of traffic. Applications that use the metal Service Class support mechanisms that dynamically adjust their transmit rate and burst size based on congestion (packet loss) detected in the network. The following list describes the individual metal classes:

  • Queue 5 — Platinum Service Class (PHB of CS4/AF41)

    The switch uses the Platinum Service Class for applications that require low latency, for example, real-time services such as video conferencing and interactive gaming. Platinum Service Class traffic provides the low latency required for interhuman (interactive) communications. The Platinum Service Class provides a minimum bandwidth assurance for Assured Forwarding (AF) 41 and Class Selector (CS) 4-marked flows.

  • Queue 4 — Gold Service Class (PHB of CS3/AF31)

    The switch uses the Gold Service Class for applications that require near-real-time service and are not as delay-sensitive as applications that use the Platinum service. Such applications include streaming audio and video, video on demand, and surveillance video.

    The Gold Service Class assumes that traffic buffers at the source and destination and, therefore, the traffic is less sensitive to delay and jitter. By default, the Gold Service Class provides a minimum bandwidth assurance for AF31, AF32, AF33 and CS3-marked flows.

  • Queue 3— Silver Service Class (PHB of CS2/AF21)

    The switch uses the Silver Service Class for responsive (typically client- and server-based) applications. Such applications include Systems Network Architecture (SNA) terminals (for example, a PC or Automatic Teller Machine) to mainframe (host) transactions that use Data Link Switching (SNA over IP), Telnet sessions, web-based ordering and credit card processing, financial wire transfers, and Enterprise Resource Planning applications.

    Silver Service Class applications require a fast response and have asymmetrical bandwidth needs. The client sends a short message to the server and the server responds with a much larger data flow back to the client. For example, after a user clicks a hyperlink (that sends a few dozen bytes) on a webpage, a new webpage appears (that downloads kilobytes of data). The Silver Service Class provides a minimum bandwidth assurance for AF21 and CS2-marked flows.

    The Silver Service Class favors short-lived, low-bandwidth TCP-based flows.

  • Queue 2 — Bronze Service Class (PHB of CS1/AF11)

    The switch uses the Bronze Service Class for longer-lived TCP-based flows, such as file transfers, e-mail, or noncritical Operation, Administration, and Maintenance (OAM) traffic. The Bronze Service Class provides a minimum bandwidth assurance for AF11 and CS1-marked flows. As a best practice, use the Bronze Service Class for noncritical OAM traffic with the CS1 DSCP marking.

Queue 1 and 0 — Standard (PHB of CS0/DF) and Custom Service Classes

The switch uses the Standard and Custom Service Classes for best-effort services. Delays, loss, or jitter guarantees for these service classes are not specified. However, the Standard Service Class has more forwarding resources than the custom service classes.

Internal QoS level

The internal QoS level or effective QoS level is a key element in the switch QoS architecture. The internal QoS level specifies the kind of treatment a packet receives. The switch classifies every packet that enters and assigns it an internal QoS level.

Internal QoS levels map to the queues on a port. For example, for an access port the internal QoS level is derived from the port QoS level. For Layer 3 trusted (core) ports, the system honors incoming DSCP or type of service (TOS) bits. The system assigns the internal QoS level using the ingress DSCP to QoS level map.

Important

Important

Remarking packets with an ACL filter does not change the internal QoS level of the packets. You must add the permit internal-qos [value] statement to the ACL filter. For more information, see Internal QoS Level and Remarking.

Ingress mappings

The system uses ingress maps to translate incoming packet QoS markings to the internal QoS level. The system uses the internal QoS level to classify packets.

Ingress mappings include

  • 802.1p to (internal) QoS level

  • DSCP to (internal) QoS level

The following logical table shows how the system performs ingress mappings for data packets and for control packets not destined for the Control Processor (CP).

Table 1. Data packet ingress mapping

DSCP

Layer 2 trusted

Layer 3 trusted (DiffServ enabled and Access-diffserv disabled)

IP packet

Routed packet

Ingress tagged

Internal QoS

x

No

x

No

x

x

Use port QoS

x

Yes

x

No

x

No

Use port QoS

x

Yes

x

No

x

Yes

Use ingress p-bits mapping

0x1B

x

x

Yes

x

x

4

0x23

x

x

Yes

x

x

5

0x29

x

x

Yes

x

x

5

0x2F

x

x

Yes

x

x

6

x

No

No

x

x

x

Use port QoS

x

No

Yes

Yes

x

x

Use ingress DSCP mapping

x

Yes

No

Yes

x

No

Use port QoS

x

Yes

No

Yes

x

Yes

Use ingress p-bits mapping

x

Yes

Yes

Yes

No

No

Use ingress DSCP mapping

x

Yes

Yes

Yes

No

Yes

Use ingress p-bits mapping

x

Yes

Yes

Yes

Yes

Yes

Use ingress DSCP mapping

Important

Important

On a tagged port that is Layer-2 trusted, Layer-3 trusted and DiffServ enabled, all multicast packets honor the ingress DSCP value.

The QoS level for control packets destined for the CPU is assigned internally to ensure timely packet processing and scaling numbers. You cannot configure the QoS level for these control packets. The system assigns the highest QoS-level to time-critical protocols.

The following table shows ingress IEEE 802.1p to QoS level mappings.

Table 2. Default ingress 802.1p to QoS mappings

Ingress IEEE 802.1p

PHB

QoS Level

Network Service Class (NSC)

0

CS0/DF

1

Standard

1

Custom

0

Custom

2

CS1/AF11

2

Bronze

3

CS2/AF21

3

Silver

4

CS3/AF31

4

Gold

5

CS4/AF41

5

Platinum

6

CS5/EF

6

Premium/EF

7

CS6/CS7

7

Network/Critical

The following table shows DSCP to internal QoS level mappings.

Table 3. Default ingress DSCP to QoS mapping

Ingress

Internal QoS level

PHB level

DSCP

(decimal)

DSCP

(binary)

DSCP

(hexadecimal)

TOS

(hexadecimal)

00

000000

00

00

1

CS0/DF

00

000000

00

00

1

DF

01

000001

01

04

1

CS0

02

000010

02

08

1

CS0

03

000011

03

0C

1

CS0

04

000100

04

10

1

CS0

05

000101

05

14

1

CS0

06

000110

06

18

1

CS0

07

000111

07

1C

1

CS0

08

001000

08

20

2

CS1

09

001001

09

24

1

CS0

10

001010

0A

28

2

AF11

11

001011

0B

2C

1

CS0

12

001100

0C

30

2

CS1

13

001101

0D

34

1

CS0

14

001110

0E

38

2

CS1

15

001111

0F

3C

1

CS0

16

010000

10

40

3

CS2

17

010001

11

44

1

CS0

18

010010

12

48

3

AF21

19

010011

13

4C

1

CS0

20

010100

14

50

3

CS2

21

010101

15

54

1

CS0

22

010110

16

58

3

CS2

23

010111

17

5C

1

CS0

24

011000

18

60

4

CS3

25

011001

19

64

1

CS0

26

011010

1A

68

4

AF31

27

011011

1B

6C

4

CS3

28

011100

1C

70

4

CS3

29

011101

1D

74

1

CS0

30

011110

1E

78

4

CS3

31

011111

1F

7C

1

CS0

32

100000

20

80

5

CS4

33

100001

21

84

1

CS0

34

100010

22

88

5

AF41

35

100011

23

8C

5

CS4

36

100100

24

90

5

CS4

37

100101

25

94

1

CS0

38

100110

26

98

5

CS4

39

100111

27

9C

1

CS0

40

101000

28

A0

6

CS5

41

101001

29

A4

5

CS4

42

101010

2A

A8

1

CS0

43

101011

2B

AC

1

CS0

44

101100

2C

B0

1

CS0

45

101101

2D

B4

1

CS0

46

101110

2E

B8

6

EF

47

101111

2F

BC

6

CS5

48

110000

30

C0

7

CS6

49

110001

31

C4

1

CS0

50

110010

32

C8

1

CS0

51

110011

33

CC

1

CS0

52

110100

34

D0

1

CS0

53

110101

35

D4

1

CS0

54

110110

36

D8

1

CS0

55

110111

37

DC

1

CS0

56

111000

38

E0

7

CS7

57

111001

39

E4

1

CS0

58

111010

3A

E8

1

CS0

59

111011

3B

EC

1

CS0

60

111100

3C

F0

1

CS0

61

111101

3D

F4

1

CS0

62

111110

3E

F8

1

CS0

63

111111

3F

FC

1

CS0

Egress mappings

Egress mappings include:

  • QoS level to IEEE 802.1p mappings

  • QoS level to DSCP mappings

When a packet is forwarded by the switch, the software does the following:

  • Always performs 802.1p remarking before the packet egresses.

  • If the ingress port has enable-diffserv and access-diffserv enabled, then the IP packet is DSCP remarked before the packet egresses.

    If the ingress port is not configured this way, the packets are not DSCP remarked.

The following table shows egress QoS level to IEEE 802.1p mappings.

Table 4. Default egress QoS level to IEEE 802.1p mappings

QoS level

PHB

Default 1p remarking on egress

Network Service Class (NSC)

0

Custom

1

Custom

1

CS0/DF

0

Standard

2

CS1/AF11

2

Bronze

3

CS2/AF21

3

Silver

4

CS3/AF31

4

Gold

5

CS4/AF41

5

Platinum

6

CS5/EF

6

Premium/EF

7

CS6/CS7

7

Network/Critical

The following table shows QoS level to DSCP mappings.

Table 5. Default egress QoS level to DSCP mappings

Egress

QoS level

DSCP

(binary)

DSCP

(hexadecimal)

DSCP

0

000000

00

0

1

000000

00

0

2

001010

0A

10

3

010010

12

18

4

011010

1A

26

5

100010

22

34

6

101110

2E

46

7

101110

2E

46