Creating a traffic template
A traffic template can be created, modified, or deleted by entering this command in the global configuration context.
Syntax:
qos traffic-template <template-name>
no qos traffic-template <template-name>
Enter the Traffic Template Configuration level or execute one command for that level. With no additional parameters specified, the
qos traffic-template
command changes the context to Traffic Template Configuration level for execution of configuration changes to the named template.
If
<template-name>
does not exist already, the template will be created as a copy of default-tcgt and the traffic template context is entered. The maximum length is 40 characters.
If
<template-name>
already exists, the traffic template context for that template is entered and you can make modifications to the template.
qos traffic-template <template-name> <copy-from-name>
<template-name>
as a copy of the existing template named
<copy-from-name>
.
You cannot modify any predefined traffic templates.
no qos traffic-template <template-name>
Deletes the specified traffic template. Predefined templates and the currently active template may not be deleted.
show qos traffic-template [<template-name>]
When entered without the name of a specific traffic template, displays a list of the current traffic templates and their status - active, valid, or invalid.
When executed with the name of a specific traffic template, detailed information for that traffic template is displayed.
After executing the
qos traffic-template
<template-name>
command in the global configuration context, you are in traffic template context and can begin modifying a newly created template or an existing template.
Creating a new traffic template and entering traffic template configuration context
switch(config)# qos traffic-template example switch(cfg-tcgt-example1)# show qos traffic-template example Template Name: example Status : Valid Queue-no Priorities Name -------- ------------- -------------------- 1 1,2 background-tcg 2 0,3 best-effort-tcg 3 4,5 controlled-load-tcg 4 6,7 control-tcg
1 Traffic template context
You should always check the traffic template status using the
show qos traffic-template
command to make sure that the template is valid. Invalid templates cannot be applied to ports. A traffic template will be invalid if the priorities are not mapped to an egress queue. This can happen, for example, if you delete a priority from a queue and do not reassign it to another queue.
If a template has been applied, it is considered to be in use and cannot be deleted. The
show qos queue-config
command displays the currently active traffic template.
Displaying the currently active traffic template
switch(config)# show qos queue-config Egress Queue Configuration Number of Queues: 8 Traffic Template: default-tcgt 802.1p Queue Priority ----- -------- 1 1 2 2 3 0 4 3 5 4 6 5 7 6 8 7