Command List
Use the following commands to complete this exercise:
Command | Description |
no service-policy {input | output} policy-map-name | Removes a service policy from an input or output interface. |
show ip cef | Displays the state of Cisco Express Forwarding (CEF). |
ip nbar protocol-discovery | Configures NBAR to discover traffic for all protocols known to NBAR on a particular interface. |
clear ip nbar protocol-discovery | Clears NBAR protocol discovery statistics. |
show ip nbar protocol-discovery [interface interface-spec] | Displays the statistics gathered by the NBAR protocol discovery feature. |
ip access-list {standard | extended} access-list-name | Defines an IP access list by name. |
permit tcp source source-wildcard destination destination-wildcard [operator [port]] | Sets conditions to allow a TCP packet to pass a named IP access list. |
permit udp source source-wildcard destination destination-wildcard [operator [port]] | Sets conditions to allow a UDP packet to pass a named IP access list. |
class-map class-map-name | Creates a class map to be used for matching packets to a specified class. |
match protocol protocol-name | Configures the match criteria for a class map on the basis of the specified protocol. |
match access-group {access-group | name access-group-name} | Configures the match criteria for a class map on the basis of the specified access list. |
policy-map policy-map-name | Creates or modifies a policy map that can be attached to one or more interfaces. |
class {class-name | class-default} | Specifies the name of the class whose policy you want to create or change or to specify the default class. |
set dscp dscp-value | Marks a packet by setting the differentiated services code point (DSCP). |
service-policy {input | output} policy-map-name | Attaches a policy map to an input, or an output interface. |
show class-map class-map-name | Displays all class maps and their matching criteria. |
show policy-map policy-map | Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps. |
show policy-map interface interface-name [input | output] [class class-map-name] | Displays the packet statistics of all classes that are configured for all service policies on the specified interface. |
Table 1: Configuration and monitoring commands used in this Lab exercise
Complete Solution;
ip access-list extended VoIP-RTCP
permit udp any any range 16384 32767
!
ip access-list extended Voice-Control
permit tcp any any eq 1720
permit tcp any any range 11000 11999
permit udp any any eq 2427
permit tcp any any eq 2428
permit tcp any any range 2000 2002
permit udp any any eq 1719
permit udp any any eq 5060
!
class-map match-any real-time
match protocol rtp
match protocol icmp
match access-group name VoIP-RTCP
class-map match-any mission-critical
match protocol sqlnet
match access-group name Voice-Control
class-map match-all interactive
match protocol citrix
class-map match-all bulk
match protocol ftp
class-map match-any scavenger
match protocol kazaa2
match protocol napster
!
policy-map mark-nbar
class real-time
set dscp ef
class mission-critical
set dscp af31
class interactive
set dscp af21
class bulk
set dscp af11
class scavenger
set dscp cs1
class class-default
set dscp default
!
interface fastethernet0/0
service-policy input mark-nbar
----------------------------------------------------------
Configuration 12: Configuration description
Step 18 The following commands need to be entered on R1 router.
R1#show policy-map interface fastethernet0/0
FastEthernet0/0
Service-policy input: mark-nbar
Class-map: real-time (match-any)
5 packets, 570 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol rtp
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol icmp
5 packets, 570 bytes
5 minute rate 0 bps
Match: access-group name VoIP-RTCP
0 packets, 0 bytes
5 minute rate 0 bps
QoS Set
dscp ef
Packets marked 5
Class-map: mission-critical (match-any)
7298 packets, 770942 bytes
5 minute offered rate 27000 bps, drop rate 0 bps
Match: protocol sqlnet
6596 packets, 694955 bytes
5 minute rate 22000 bps
Match: access-group name Voice-Control
702 packets, 75987 bytes
5 minute rate 6000 bps