match protocol [http|ftp|voip]
Matches packets based on the application protocol (HTTP, FTP, or VoIP) in a class map for QoS classification.
match protocol [http|ftp|voip]When to Use This Command
- Prioritizing HTTP traffic for web servers in a data center.
- Shaping FTP traffic to prevent bandwidth saturation during large file transfers.
- Applying strict priority queuing to VoIP traffic for low latency.
- Classifying and marking traffic for different service levels in an enterprise network.
Command Examples
Match HTTP traffic
match protocol httpThis command matches all HTTP (port 80) traffic. No output is generated; it is used within a class-map configuration.
Match FTP traffic
match protocol ftpMatches FTP control and data traffic (ports 20 and 21). No output.
Match VoIP traffic
match protocol voipMatches VoIP signaling and media streams (e.g., SIP, RTP). No output.
Understanding the Output
The 'match protocol' command does not produce output on its own. It is used within class-map configuration mode to define a match criterion. Verification is done via 'show class-map' which displays the configured match statements. In 'show class-map', look for the 'Match protocol' line under the class map name. A correctly configured class map will show the protocol listed. If the protocol is misspelled or unsupported, the command will be rejected with an error.
CCNA Exam Tips
Remember that 'match protocol' uses NBAR (Network-Based Application Recognition) to identify applications; it is not just port-based.
CCNA exam may test that 'match protocol http' matches HTTP traffic regardless of port if NBAR is enabled.
Know that 'match protocol voip' matches common VoIP protocols like SIP, H.323, and RTP.
Be aware that 'match protocol' is only available in class-map configuration mode under 'class-map type qos'.
Common Mistakes
Using 'match protocol' in a class-map that is not type qos (e.g., class-map type traffic).
Misspelling the protocol name (e.g., 'http' vs 'https' or 'ftp' vs 'ftp-data').
Forgetting that 'match protocol' requires NBAR to be enabled globally with 'ip nbar protocol-discovery'.
Related Commands
policy-map [name]
Creates or modifies a QoS policy-map that defines a set of class-maps and associated actions (e.g., bandwidth, priority, drop) to apply to traffic on Cisco IOS routers.
show class-map
Displays the configuration and match criteria of all class maps or a specific class map, used to verify QoS classification rules.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions