Creating a DSCP policy based on TCP/UDP port number classifiers
The following procedure creates a DSCP policy for IP packets carrying the selected TCP or UDP port-number classifier.
Example:
Port Applications |
DSCP Policies |
|
---|---|---|
DSCP |
Priority |
|
23-UDP |
000111 |
7 |
80-TCP |
000101 |
5 |
914-TCP |
000010 |
1 |
1001-UDP |
000010 |
1 |
Determine if the DSCP codepoints that you want to use to mark matching packets already have an 802.1p priority assigned, which could indicate use by existing applications (
show qos dscp-map
command).A DSCP codepoint must also have a priority configured before you can use it to mark matching packets.switch(config)# show qos dscp-map DSCP -> 802.p priority mappings NOTE: ‘qos type-of-service diff-services’ must be configured before DSCP is honored on inbound traffic. DSCP CodePoint DSCP Value 802.1p tag DSCP Policy name -------------- ---------- ----------- ---------------------- 000000 0 0 cs0 000001 1 No-override 000010 2 No-override 000011 3 No-override 000100 4 No-override 000101 5 No-override 000110 6 No-override 000111 7 No-override 001000 8 1 cs1 001001 9 No-override
- Configure the DSCP policies for the codepoints you want to use.
switch(config)# qos dscp-map af11 priority 3 switch(config)# qos dscp-map 13 priority 3 switch(config)# qos dscp-map af13 priority 3 switch(config)# write memory switch(config)# show config switch configuration: ; J9146 Configuration Editor; Created on release XX.15.XX hostname “Switch” time daylight-time-rule None qos dscp-map af11 priority 3 qos dscp-map 13 priority 3 qos dscp-map af13 priority 3 ...
- Assign the DSCP policies to the selected TCP/UDP port applications and display the result.
switch(config)# qos udp-port 23 dscp 000111 switch(config)# qos tcp-port 80 dscp 000101 switch(config)# qos tcp-port 914 dscp 000010 switch(config)# qos udp-port range 1001 2000 dscp 000010 TCP/UDP port based priorities | IP Packet Application | Protocol | Type Port Apply rule | DSCP Priority -------- + --------- ----------- ---------- + ------ ----------- UDP | IPV4 23 DSCP | 8 7 TCP | IPV4 80 DSCP | 6 5 TCP | IPV4 914 DSCP | 3 1 UDP | IPV4 1001-2000 DSCP | 3 1
The switch applies the DSCP policies in the above output to IP packets with the specified TCP/UDP port applications that are received in the switch. The switch manages the packets as follows:Overwrites the original DSCPs in the selected packets with the new DSCPs specified in the above policies.
Assigns the 802.1p priorities in the above policies to the selected packets.