Article ID: 15028

Matrix N-Series DFE

Map a Tagged Ingress VLAN to an Outbound Rate Shaper.

Presented below is one possible Policy/CoS configuration (basic VLAN configurations would also be needed) to accomplish this via switch CLI.

The design requirements here are highly specialized, not likely to be needed elsewhere. However, this example can provide useful insights as to how Policy and CoS commands work together, and such insights in turn can permit the user to go on to tailor Policy and/or CoS commands for the desired effect. Before tackling this configuration, the user is advised to start with 13816 because it presents some background hints and tricks.

On a given physical egress port, and sticking with default port group 0 ('<

A further limitation used here is that, to simplify matters, all traffic is treated with the same priority.

Finally, the commands as shown below do not appear in 'show config' order. For ease of understanding, they are presented in a progression from the policy that assigns the initial class of service to port ge.1.1 ingress traffic, in steps through to the behavior of the hardware which transmits the traffic out the one or more egress ports anywhere in this system/chassis.

**Products**Matrix N-Series DFE

**Goals**Map a Tagged Ingress VLAN to an Outbound Rate Shaper.

**Solution**Presented below is one possible Policy/CoS configuration (basic VLAN configurations would also be needed) to accomplish this via switch CLI.

The design requirements here are highly specialized, not likely to be needed elsewhere. However, this example can provide useful insights as to how Policy and CoS commands work together, and such insights in turn can permit the user to go on to tailor Policy and/or CoS commands for the desired effect. Before tackling this configuration, the user is advised to start with 13816 because it presents some background hints and tricks.

On a given physical egress port, and sticking with default port group 0 ('<

*group*>.<*type*>' is used in the cos settings, port-config, and reference commands), we are limited to as many different treatments as there are physical transmit queues on that port. The N-Series accommodates either 4, 11, or 16 transmit queues per port, depending on the hardware type. If - as is done here - it is desired to configure for any hardware type, then effectively we are limited to three different shapers plus a default action.A further limitation used here is that, to simplify matters, all traffic is treated with the same priority.

Finally, the commands as shown below do not appear in 'show config' order. For ease of understanding, they are presented in a progression from the policy that assigns the initial class of service to port ge.1.1 ingress traffic, in steps through to the behavior of the hardware which transmits the traffic out the one or more egress ports anywhere in this system/chassis.

If you need further assistance in developing a rate-shaping configuration in the absence of NetSight Policy Manager (the recommended method of configuring Policy and Class of Service), please contact the GTAC.

# policy [map port ge.1.1's ingress tagged vlan to a class of service 11, 22, or 33, but default to cos 10 otherwise]

set policy profile 15 name "VLAN to CoS" cos-status enable cos 10

set policy rule 15 vlantag 1 cos 11

set policy rule 15 vlantag 2 cos 22

set policy rule 15 vlantag 3 cos 33

set policy port ge.1.1 15

# cos state

set cos state enable

# cos settings [map classes of service to priorities and txq references, for any cos that might be encountered]

set cos settings 0 txq-reference 10

set cos settings 1 txq-reference 10

set cos settings 2 txq-reference 10

set cos settings 3 txq-reference 10

set cos settings 4 txq-reference 10

set cos settings 5 txq-reference 10

set cos settings 6 txq-reference 10

set cos settings 7 txq-reference 10

set cos settings 10 priority 0 txq-reference 10

set cos settings 11 priority 0 txq-reference 11

set cos settings 22 priority 0 txq-reference 12

set cos settings 33 priority 0 txq-reference 13

# cos port-config [toggle from Strict Queueing to Weighted Fair Queueing for generally equal treatment]

set cos port-config txq 0.0 arb-percentage 25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0

set cos port-config txq 0.1 arb-percentage 25,25,25,25

set cos port-config txq 0.2 arb-percentage 25,25,25,25,0,0,0,0,0,0,0

# cos reference [map txq references to txq hardware]

set cos reference txq 0.0 10 queue 0

set cos reference txq 0.0 11 queue 1

set cos reference txq 0.0 12 queue 2

set cos reference txq 0.0 13 queue 3

set cos reference txq 0.1 10 queue 0

set cos reference txq 0.1 11 queue 1

set cos reference txq 0.1 12 queue 2

set cos reference txq 0.1 13 queue 3

set cos reference txq 0.2 10 queue 0

set cos reference txq 0.2 11 queue 1

set cos reference txq 0.2 12 queue 2

set cos reference txq 0.2 13 queue 3

# cos port-resource [provide txq hardware function]

# default uses TXQ 0, which does no shaping

# VLAN 1 uses TXQ 1, which shapes to 10mbps

# VLAN 2 uses TXQ 2, which shapes to 30mbps

# VLAN 3 uses TXQ 3, which shapes to 45mbps

set cos port-resource txq 0.0 1 rate 10 unit mbps

set cos port-resource txq 0.0 2 rate 30 unit mbps

set cos port-resource txq 0.0 3 rate 45 unit mbps

set cos port-resource txq 0.1 1 rate 10 unit mbps

set cos port-resource txq 0.1 2 rate 30 unit mbps

set cos port-resource txq 0.1 3 rate 45 unit mbps

set cos port-resource txq 0.2 1 rate 10 unit mbps

set cos port-resource txq 0.2 2 rate 30 unit mbps

set cos port-resource txq 0.2 3 rate 45 unit mbps

There are no replies.