Using Cisco NBAR to Monitor Traffic Protocols

Posted: February 28, 2011 in Cisco
Tags: ,

Many network administrators already know how to use tools like Cacti or MRTG to monitor the usage on their network links. (If you don’t, let me know and I’ll show you how.) Unfortunately, those tools only reveal part of the story. They show you how much traffic is traversing a link, but not what kind of traffic is traversing a link. The difference may not be that important until your corporate DS3 is hitting 42 Mbps and you have no idea why.

WHAT IS NBAR?

According to Cisco:

NBAR is an intelligent classification engine in Cisco IOS Software that can recognize a wide variety of applications, including Web-based and client/server applications.

In layman’s terms, NBAR examines traffic on a designated router interface and makes note of what application the traffic is associated with. It does this by mapping traffic ports to protocols (i.e. 25/TCP is SMTP), but it also recognizes traffic with no standard port number like various P2P protocols. The primary purpose of NBAR is to recognize the traffic on an interface so that QoS policies can be applied to it. This is a big step forward compared to clunky ACLs which require exact protocol and port matching.

QOS? I JUST WANT TO KNOW WHAT’S GOING ON!

Nothing could be simpler. If you release of IOS supports NBAR, simply add the 'ip nbar protocol-discovery' configuration command to the interface that your users are using as their default gateway. For example:

SLAP#config t
Enter configuration commands, one per line. End with CNTL/Z.
SLAP(config)#interface FastEthernet0/0
SLAP(config-if)#ip nbar protocol-discovery
SLAP(config-if)#^Z
SLAP#wr
Building configuration...
[OK]
SLAP#

Once NBAR is gathering data, you can use the 'show ip nbar resources' command to see how much memory it’s taking up. As long as the numbers are acceptable, you can leave NBAR protocol discovery running as long as you like. To see the really interesting information, issue 'show ip nbar protocol-discover' and look at all the protocols flowing to (and perhaps through) your router. In the screenshot to the right, you can see that I’ve limited the output by using the 'top-n' variant of the above command

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s