QoSClass-map Config

match protocol [http|ftp|voip]

Matches packets based on the application protocol (HTTP, FTP, or VoIP) in a class map for QoS classification.

Syntax·Class-map Config
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 http

This command matches all HTTP (port 80) traffic. No output is generated; it is used within a class-map configuration.

Match FTP traffic

match protocol ftp

Matches FTP control and data traffic (ports 20 and 21). No output.

Match VoIP traffic

match protocol voip

Matches 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

1.

Remember that 'match protocol' uses NBAR (Network-Based Application Recognition) to identify applications; it is not just port-based.

2.

CCNA exam may test that 'match protocol http' matches HTTP traffic regardless of port if NBAR is enabled.

3.

Know that 'match protocol voip' matches common VoIP protocols like SIP, H.323, and RTP.

4.

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

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions