Practical Applications: Mapping ToS Bits to Exp or FECs in Riverstone Routers

 < Day Day Up > 



Setting The Exp Bits[1]

The Exp bits are set by creating an ingress policy on the ingress LSR. This ingress policy sets the Exp bits in relation to values associated with the frames and packets traversing the LSP. For example, if a VLAN trunk port is tunneled through the LSP, the EXP bits can be set by directly copying the values contained within the three 802.1p priority bits of the 802.1Q headers. Once packets/frames have reached the egress LSR, an egress policy can be created on the egress LSR that maps the Exp bits back into the bit values of the packets or frames.

Figure 8.35 shows an example of bits being copied on ingress into the Exp bits, and then copied back to the packet on egress.

click to expand
Figure 8.35: Copy Bits Directly to and from Packets Traversing the LSP

Alternately, tables can be configured (using the mpls create command) that map the ingress packet/frame bits to the Exp bits - while other tables can be created that map the Exp bits back to packet/frame bits on the egress. The table method has the advantage of allowing flexibility on how packet/frame bits are mapped to the Exp bits.

For example, in Figure 8.36, an ingress table has been created (using the mpls create tosprec-to-exp-tbl command) that maps incoming ToS precedence bits to the Exp bits. In this example, the ToS precedence bits are read from incoming packets then compared against the table to determine how to set the Exp bits. Within the table, any ToS precedence value can be mapped to any Exp bit value - for instance, in Figure 8.36, ToS precedence bit value 6 (110 binary) is mapped to Exp bit value 2 (010 binary).

click to expand
Figure 8.36: Setting the Exp Bits Using a Mapping Table

The following is the command that creates the ingress table mapping in Figure 8.36:

rs(config)# mpls create tosprec-to-exp-tbl <name> tosprec0 0 tosprec1 1  tosprec2 6 tosprec3 3 tosprec4 7 tosprec5 2 tosprec6 5 tosprec7 6 

A second table can be created on the egress LSR that maps the Exp bits back to bit fields within packets or frames.

Note 

The DSCP bits cannot be directly copied into the Exp bits of the MPLS label. The mapping of DSCP bits to Exp bits must always be done using a table.

The following lists the possible tables that can be used to map packet/frame bits to the Exp bits.

On ingress:

802.1P bits to Exp bits (mpls create 1p-to-exp-tbl <name>)

DSCP bits to Exp bits (mpls create dscp-to-exp-tbl <name>)

Internal priority bits to Exp bits (mpls create intprio-to-exp-tbl <name>)

ToS precedence bits to Exp bits (mpls create tosprec-to-exp-tbl <name>)

On egress:

Exp bits to 802.1P bits (mpls create exp-to-1p-tbl <name>)

Exp bits to DSCP bits (mpls create exp-to-dscp-tbl <name>)

Exp bits to ToS precedence bits (mpls create exp-to-tosprec-tbl <name>)

Note 

There is no facility for mapping Exp bits to internal priority bits on egress. However, Exp bits that were set on ingress using the internal priority bits can be mapped to other packet/frame bits on egress (DSCP, 802.1/p, and so on).

Creating and using tables is covered in more detail within the following sections.

Creating Ingress and Egress Policies

This section illustrates the basic steps for creating both an ingress and egress policy for mapping packet and frame bits to and from the Exp bits. Configuration examples for both Layer-2 and Layer-3 traffic are presented at the end of this section.

Layer-2 Ingress and Egress Policies

The following steps outline the process for creating a Layer-2 ingress policy on the ingress LSR.

Note 

If using table matching to map frame bits to the Exp bits, use the mpls create command to specify the type of table, the table’s name, and its contents.

Use the ldp set l2-fec command to apply the ingress policy to Layer-2 traffic.

The following steps outline the process for creating a Layer-2 egress policy on the egress LSR.

Note 

If using table matching to map Exp bits to frame bits, use the mpls create command to specify the type of table, the table’s name, and its contents.

Use the mpls set egress-l2-diffserv-policy command to apply the egress policy to Layer-2 traffic. Note that the egress policy is applied globally to all Layer-2 traffic traversing the LSP.

Layer-3 Ingress and Egress Policies

The following steps outline the process for creating a Layer-3 ingress policy on the ingress LSR.

Note 

If using table matching to map packet bits to the Exp bits, use the mpls create command to specify the type of table, the table’s name, and its contents.

Use the mpls set ingress-diffserv-policy command to apply the ingress policy to Layer-3 traffic.

The following steps outline the process for creating a Layer-3 egress policy on the egress LSR.

Note 

If using table matching to map Exp bits to packet bits, use the mpls create command to specify the type of table, the table’s name, and its contents.

Use the mpls set egress-l3-diffserv-policy command to apply the egress policy to Layer-3 traffic. Note that the egress policy is applied globally to all Layer-3 traffic traversing the LSP

[1]The following text provided by the permission of Riverstone



 < Day Day Up > 



Rick Gallagher's MPLS Training Guide. Building Multi-Protocol Label Switching Networks
Rick Gallahers MPLS Training Guide: Building Multi Protocol Label Switching Networks
ISBN: 1932266003
EAN: 2147483647
Year: 2003
Pages: 138

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net