The commands described in this section allow you to specify which data packets
have greater precedence when traffic is buffered in the switch due to congestion.
This switch supports CoS with four priority queues for each port. Data packets
in a ports high-priority queue will be transmitted before those in the
lower-priority queues. You can set the default priority for each interface,
the relative weight of each queue, and the mapping of frame priority tags to
the switchs priority queues.
Use this command to set a priority for incoming untagged frames, or the priority
of frames received by the device connected to the specified interface. Use the
no form to restore the default value.
Syntax
switchport prioritydefaultdefault-priority-id no switchport prioritydefault
default-priority-id - The priority number for untagged ingress traffic.
The priority is a number from 0 to 7. Seven is the highest priority.
Default Setting
The priority is not set, and the default value for untagged frames received
on the interface is zero. .
Command Mode
Interface Configuration (Ethernet, Port Channel)
Command Usage
The precedence for priority mapping is IP Port, IP Precedence or IP DSCP,
and default switchport priority.
The default priority applies for an untagged frame received on a port set
to accept all frame types (i.e, receives both untagged and tagged frames).
This priority does not apply to IEEE 802.1Q VLAN tagged frames. If the incoming
frame is an IEEE 802.1Q VLAN tagged frame, the IEEE 802.1p User Priority bits
will be used.
This switch provides four priority queues for each port. It is configured
to use Weighted Round Robin, which can be viewed with the queue bandwidth
command. Inbound frames that do not have VLAN tags are tagged with the input
ports default ingress user priority, and then placed in the appropriate
priority queue at the output port. The default priority for all ingress ports
is zero. Therefore, any inbound frames that do not have priority tags will
be placed in queue 0 of the output port. (Note that if the output port is
an untagged member of the associated VLAN, these frames are stripped of all
VLAN tags prior to transmission.)
Example
The following example shows how to set a default priority on port 3 to 5:
Use this command to assign weighted round-robin (WRR) weights to the four class
of service (CoS) priority queues. Use the no form to restore the default
weights.
Syntax
queue bandwidthweight1...weight4 no queue bandwidth
weight1...weight4 - The ratio of weights for queues 0 - 3 determines
the weights used by the WRR scheduler. (Range: 1 - 255)
Default Setting
PowerConnect 3248: Weights 1, 4, 16 and 64 are assigned to queue 0, 1, 2
and 3 respectively
PowerConnect 5224: Weights 16, 64, 128 and 240 are assigned to queue 0, 1,
2 and 3 respectively
Command Mode
Global Configuration
Command Usage
WRR allows bandwidth sharing at the egress port by defining scheduling weights.
Example
The following example shows how to assign WRR weights of 1, 3, 5 and 7 to
the CoS priority queues 0, 1, 2 and 3:
Use this command to assign class of service (CoS) values to the CoS priority
queues. Use the no form set the CoS map to the default values.
Syntax
queue cos-mapqueue_id [cos1 ... cosn] no queue cos-map
queue_id - The queue ID of the CoS priority queue.
Ranges are 0 to 3, where 3 is the highest CoS priority queue.
cos1 .. cosn - The CoS values that are mapped to the queue id.
It is a space-separated list of numbers. The CoS value is a number from
0 to 7, where 7 is the highest priority.
Default Setting
This switch supports Class of Service by using four priority queues, with
Weighted Round Robin for each port. Up to 8 separate traffic classes are defined
in IEEE 802.1p. The default priority levels are assigned according to recommendations
in the IEEE 802.1p standard as shown in the following table.
Table 1. Priority to Queue Mapping
Queue
0
1
2
3
Priority
0
1
2
3
4
5
6
7
Command Mode
Interface Configuration (Ethernet, Port Channel)
Command Usage
CoS assigned at the ingress port is used to select a CoS priority at the
egress port.
Example
The following example shows how to map CoS values 0, 1 and 2 to CoS priority
queue 0, value 3 to CoS priority queue 1, values 4 and 5 to CoS priority queue
2, and values 6 and 7 to CoS priority queue 3:
The table below shows the default priority mapping.
Table 2. IP Precedence to CoS
Mapping
IP Precedence
Value
CoS Value
0
0
1
1
2
2
3
3
4
4
5
5
6
6
7
7
Command Mode
Interface Configuration (Ethernet, Port Channel)
Command Usage
The precedence for priority mapping is IP Port, IP Precedence or IP DSCP,
and default switchport priority.
IP Precedence values are mapped to default Class of Service values on a
one-to-one basis according to recommendations in the IEEE 802.1p standard,
and then mapped to the queue defaults shown in Table
1.
This command sets the IP Precedence for all interfaces.
Example
The following example shows how to map IP precedence value 1 to CoS value
0:
Console(config)#interface ethernet
1/5
Console(config-if)#map ip precedence 1 cos 0 Console(config-if)#
Use this command to set IP DSCP priority (i.e., Differentiated Services Code
Point priority). Use the no form to restore the default table.
Syntax
map ip dscp dscp-valuecoscos-value
no map ip dscp
dscp-value - 8-bit DSCP value. (Range: 0-255)
cos-value - Class-of-Service value (Range: 0-7)
Default Setting
The table below shows the default priority mapping.
Table 3. DSCP to CoS Mapping
DSCP
CoS
DSCP
CoS
DSCP
CoS
DSCP
CoS
DSCP
CoS
DSCP
CoS
DSCP
CoS
DSCP
CoS
0
0
8
1
16
2
24
3
32
4
40
5
48
6
56
7
1
0
9
0
17
0
25
0
33
0
41
0
49
0
57
0
2
0
10
2
18
3
26
4
34
4
42
5
50
0
58
0
3
0
11
0
19
0
27
0
35
0
43
0
51
0
59
0
4
0
12
2
20
3
28
4
36
4
44
6
52
0
60
0
5
0
13
0
21
0
29
0
37
0
45
0
53
0
61
0
6
0
14
2
22
3
30
4
38
5
46
7
54
0
62
0
7
0
15
0
23
0
31
0
39
0
47
0
55
0
63
0
Command Mode
Interface Configuration (Ethernet, Port Channel)
Command Usage
The precedence for priority mapping is IP Port, IP Precedence or IP DSCP,
and default switchport priority.
DSCP priority values are mapped to default Class of Service values according
to recommendations in the IEEE 802.1p standard as shown in the following table,
and then mapped to the queue defaults shown in Table
3.
This command sets the DSCP Priority for all interfaces.
Example
The following example shows how to map IP DSCP value 1 to CoS value 0:
Console(config)#interface ethernet
1/5
Console(config-if)#map ip dscp 1 cos 0 Console(config-if)#
Use this command to show the IP precedence priority map.
Syntax
show map ip precedence [interface]
interface
ethernetunit/port
unit - This is device 1.
port - Port number.
port-channelchannel-id (Range: 1-6)
Default Setting
None
Command Mode
Privileged Exec
Example
Console#show map ip precedence
Precedence mapping status:
disabled
Port Precedence
COS
--------- ---------- ---
Eth 1/ 5 0
0
Eth 1/ 5 1
1
Eth 1/ 5 2
2
Eth 1/ 5 3
3
Eth 1/ 5 4
4
Eth 1/ 5 5
5
Eth 1/ 5 6
6
Eth 1/ 5 7
7
Console#