[Contents] [Prev] [Next] [Index] [Report an Error]


Rewriting Packet Header Information

As the packet leaves the routing platform, the final CoS action is the application of a rewrite rule. Rewrite rules set the value of the CoS bits within the packet's header. The bit setting is determined by the packet's forwarding class and loss priority setting. Each rule examines the forwarding class and loss priority of the packet about to be transmitted and sets the bits to a value defined in the rule. In effect, the rewrite rule performs the opposite function of the behavior aggregate (BA) classifier used when the packet enters the router.

You always apply rewrite rules to egress interfaces, and you generally apply them on the edge of your network. This allows the downstream router in a neighboring network to classify each packet into the appropriate service group.

To configure class-of-service (CoS) rewrite rules, you can include the following statements at the [edit class-of-service] hierarchy level of the configuration:

class-of-service {
    interfaces {
        interface-name {
            unit logical-unit-number {
                rewrite-rules {
                    dscp (rewrite-name | default);
                    dscp-ipv6 (rewrite-name | default);
                    exp (rewrite-name | default) protocol protocol-types;
                    exp-push-push-push default;
                    exp-swap-push-push default;
                    frame-relay-de (rewrite-name | default);
                    ieee-802.1 (rewrite-name | default);
                    inet-precedence (rewrite-name | default);
                }
            }
        }
    }
    rewrite-rules {
        (dscp | dscp-ipv6 | exp | frame-relay-de | ieee-802.1 | inet-precedence) 
             rewrite-name {
            import (rewrite-name | default);
            forwarding-class class-name {
                loss-priority level code-point (alias | bits);
            }
        }
    }
}

This chapter discusses the following topics:


[Contents] [Prev] [Next] [Index] [Report an Error]