IPQoS Administration Guide

Marker Module

IPQoS includes two marker modules, dscpmk and dlcosmk. This section contains information for using both markers. Normally, you should use dscpmk because dlcosmk is only available for IPQoS systems with VLAN devices.

For technical information about dscpmk, refer to the dscpmk(7ipp) man page. For technical information about dlcosmk, refer to the dlcosmk(7ipp) man page.

Using the dscpmk Marker for Forwarding Packets

The marker receives traffic flows after they are processed by the classifier or metering modules. The marker marks the traffic with a forwarding behavior, which is the action to be taken on the flows after they leave the IPQoS system. Forwarding behavior to be taken on a traffic class is defined in the per-hop behavior (PHB). The PHB assigns a priority to a traffic class, which indicates the precedence flows of that class have in relation to other traffic classes. PHBs only govern forwarding behaviors on the IPQoS system's contiguous network. For more information on PHBs, refer to Per-Hop Behaviors.

Packet forwarding is the process of sending traffic of a particular class to its next destination on a network. For a host, such as an IPQoS system, a packet is forwarded from the host to the local network stream. For a diffserv router, a packet is forwarded from the local network to the router's next hop.

The marker marks the DS field in the packet header with a well-known forwarding behavior that is defined in the IPQoS configuration file. Thereafter, the IPQoS system and subsequent diffserv-aware systems forward the traffic as indicated in the DS field until the mark changes. To assign a PHB, the IPQoS system marks the DS field of the packet header with a value that is called the differentiated services (DS) codepoint, or DSCP. The diffserv architecture defines two types of forwarding behaviors, EF and AF, which use differing DS codepoints. For overview information about DS codepoints, refer to DS Codepoint (DSCP).

The IPQoS system reads the DS codepoint for the traffic flow and evaluates the flow's precedence in relation to other outgoing traffic flows. The IPQoS system then prioritizes all concurrent traffic flows and releases each flow onto the network by its priority.

The diffserv router receives the outgoing traffic flows and reads the DS field in the packet headers. The DS codepoint enables the router to prioritize and schedule the concurrent traffic flows and forward each flow by the priority that is indicated by the PHB. Note that the PHB cannot apply beyond the boundary router of the network unless diffserv-aware systems on subsequent hops also recognize the same PHB.

Expedited Forwarding (EF) PHB

Expedited forwarding (EF) guarantees that any packets that are marked with the recommended EF codepoint 46 (101110) receive the best treatment available on release to the network. EF forwarding is often compared to a leased line. Packets with the 46 (101110) codepoint are guaranteed preferential treatment by all diffserv routers en route to the packets' destination. For technical information about EF, refer to RFC 2598, An Expedited Forwarding PHB.

Assured Forwarding (AF) PHB

Assured forwarding (AF) provides four different classes of forwarding behaviors that you can specify to the marker. The next table shows the classes, the three drop precedences that are provided with each class, and the recommended DCSPs that are associated with each precedence. Each DSCP is represented by its AF value, its value in hexadecimal, and its value in binary.

Table 6–2 Assured Forwarding Codepoints

 

Class 1 

Class 2 

Class 3 

Class 4 

Low-Drop Precedence

AF11 = 

10 (001010) 

AF21 = 

18 (010010) 

AF31 = 

26 (011010) 

AF41 = 

34 (100010) 

Medium-Drop Precedence

AF12 = 

12 (001100) 

AF22 = 

20 (010100) 

AF32 = 

28 (011100) 

AF42 =  

36 (100100) 

High-Drop Precedence

AF13 = 

14 (001110) 

AF23 = 

010110 

AF33 = 

30 (011110) 

AF43 = 

38 (100110) 

Any diffserv-aware system can use the AF codepoint as a guide for providing differentiated forwarding behaviors to different classes of traffic.

For example, suppose your QoS policy assigns DSCPs of AF31 and AF13 to two different traffic classes. When packets that are marked AF31 (011010) leave the IPQoS system, they receive lower forwarding probability than the packets with AF13 (001110).

When these packets reach a diffserv router, the router evaluates the packets' codepoints along with DS codepoints of other traffic in the queue. The router then forwards or drops packets, depending on the available bandwidth and the priorities that are assigned by the packets' DS codepoints. Note that packets that are marked with the EF PHB are guaranteed bandwidth over packets that are marked with the various AF PHBs.

Coordinate packet marking between any IPQoS systems on your network and the diffserv router to ensure that packets are forwarded as expected. For example, suppose IPQoS systems on your network marks packets with AF21 (010010), AF13 (001110), AF43 (100110), and EF (101110) codepoints. You then need to add the AF21, AF13, AF43, and EF DS codepoints to the appropriate file on the diffserv router.

For a technical explanation of the AF codepoint table, refer to RFC 2597. Router manufacturers Cisco Systems and Juniper Networks have detailed information about setting the AF PHB in their Web sites. You can use this information to define AF PHBs for IPQoS systems as well as routers. Additionally, router manufacturers' documentation contains instructions for setting DS codepoints on their equipment.

Supplying a DS Codepoint to the Marker

The DS codepoint is 6 bits in length. The DS field is 1 byte long. When you define a DS codepoint in the IPQoS configuration file, the marker marks the first 6 significant bits of the packet header with the DS codepoint. The remaining 2 least-significant bits are unused.

To define a DS codepoint, you use the following parameter within a marker action statement:


 dscp_map{0-63:DS_codepoint}

The dscp_map parameter is a 64-element array, which you populate with the DS codepoint (DSCP) value. dscp_map is used to map incoming DSCPs to outgoing DSCPs that are applied by the dscpmk marker.

You must specify the DSCP value to dscp_map in hexadecimal notation. For example, you must translate the EF codepoint of 101110 into the hexadecimal value 46, which results in dscp_map{0-63:46}. For AF codepoints, you must translate the various codepoints that are shown in Table 6–2 to hexadecimal for use with dscp_map.

Using the dlcosmk Marker With VLAN Devices

The dlcosmk marker module marks a forwarding behavior in the MAC header of a datagram. You can use dlcosmk only on an IPQoS system with a VLAN interface.

dlcosmk adds four bytes, which are known as the VLAN tag, to the MAC header. The VLAN tag includes a 3-bit user priority value, which is defined by the IEEE 801.D standard. Diffserv-aware switches that understand VLAN can read the user priority field in a datagram. The 801.D user priority values implement the class of service (CoS) marks, which are well known and understood by commercial switches.

You can use the user priority values in dlcosmk marker action by defining the class of service marks that are listed in the next table.

Table 6–3 801.D User Priority Values

Class of Service 

Definition 

Best effort 

Background 

Spare 

Excellent effort 

Controlled load 

Video less than 100ms latency 

Video less than 10ms latency 

Network control 

For more information on dlcosmk, refer to the dlcosmk(7ipp) man page.

IPQoS Configuration for Systems With VLAN Devices

This section introduces a simple network scenario that shows how to implement IPQoS on systems with VLAN devices. The scenario includes two IPQoS systems, machine1 and machine2, that are connected by a switch. The VLAN device on machine1 has the IP address 10.10.8.1. The VLAN device on machine2 has the IP address 10.10.8.3.

The following IPQoS configuration file for machine1 shows a simple solution for marking traffic through the switch to machine2.


Example 6–2 IPQoS Configuration File for a System With a VLAN Device

fmt_version 1.0
action {
        module ipgpc
	      name ipgpc.classify

        filter {
                name myfilter2
                daddr 10.10.8.3
                class myclass
        }

        class {
                name myclass
                next_action mark4
        }
}

action {
        name mark4
        module dlcosmk
        params {
                cos 4
                next_action continue
		global_stats true
        }
}

In this configuration, all traffic from machine1 that is destined for the VLAN device on machine2 is passed to the dlcosmk marker. The mark4 marker action instructs dlcosmk to add a VLAN mark to datagrams of class myclass with a CoS of 4. The 4 user priority value indicates that the switch between the two machines should give controlled load forwarding to myclass traffic flows from machine1.