NBAR2 Custom Protocol

Network-Based Application Recognition (NBAR) supports the use of custom protocols to identify custom applications. Custom protocols support static port-based protocols and applications that NBAR does not support.

Prerequisites for NBAR2 Custom Protocol

Protocol pack licensing must be enabled to configure custom protocols.

Information About NBAR2 Custom Protocol

Overview of NBAR2 Custom Protocol

Network-Based Application Recognition (NBAR) supports the use of custom protocols to identify custom applications. Custom protocols support static port-based protocols and applications that NBAR does not support.

For more information about custom protocols, refer to "Creating a Custom Protocol" module.

IP Address and Port-based Custom Protocol

IP address and port-based custom protocol includes supporting an IP subnet or a list of IP addresses with a specific TCP or UDP transport. This enables Network-Based Application Recognition (NBAR) to recognize traffic based on IP addresses and to associate an application ID to traffic from and to specified IP addresses. You define a custom protocol transport by using the keywords and arguments of the ip nbar custom transport command.

To support the IP address and port-based custom protocol option, the custom configuration mode (config-custom) is introduced with the ip nbar custom transport command. This mode supports options to specify a maximum of eight individual IP addresses, subnet IP addresses, and subnet mask length. You can also specify a list of eight ports or a start port range and an end port range.

How to Configure NBAR2 Custom Protocol

Configuring IP Address and Port-based Custom Protocol

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. ip nbar custom name transport {tcp | udp} {id id } {ip address ip-address | subnet subnet-ip subnet-mask } | ipv6 address {ipv6-address | subnet subnet-ipv6 ipv6-prefix } | port { port-number | range start-range end-range } | direction {any | destination | source}
  4. ip nbar custom name transport {tcp | udp} {id id}
  5. end

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

ip nbar custom name transport {tcp | udp} {id id } {ip address ip-address | subnet subnet-ip subnet-mask } | ipv6 address {ipv6-address | subnet subnet-ipv6 ipv6-prefix } | port { port-number | range start-range end-range } | direction {any | destination | source}

Example:

Specifies the IP address.


Device(config)# ip nbar custom mycustomprotocol transport tcp id 100
Device(config-custom)# ip address 10.2.1.1

Example:

Specifies the subnet IP and a subnet mask of 0.


Device(config)# ip nbar custom mycustomprotocol transport tcp
Device(config-custom)# ip subnet 255.255.255.255 0

Configures the custom protocol, with options to specify IP address, subnet, port, direction, and so on. In the examples given, the command is executed on multiple lines, using the custom configuration mode, rather than the single-line format.

Step 4

ip nbar custom name transport {tcp | udp} {id id}

Example:


Device(config)# ip nbar custom mycustom transport tcp id 100
Device(config-custom)#

Specifies TCP or UDP as the transport protocol and enters custom configuration mode.

Step 5

end

Example:


Device(config-custom)# end

(Optional) Exits custom configuration mode.

Configuration Examples for NBAR2 Custom Protocol

Example: Configuring IP Address and Port-based Custom Protocol

The following example shows how to enter custom configuration mode from global configuration mode and configure a subnet IP address and its mask length:


Device(config)# ip nbar custom mycustomprotocol transport tcp id 100
Device(config-custom)# ip subnet 10.1.2.3 22


The following example configures two custom protocols, one for TCP and one for UDP traffic. In each, the subnet, subnet mask, DSCP value, and direction are configured.


Device(config)# ip nbar custom mycustomprotocol_tcp transport tcp
Device(config-custom)# ip subnet 255.255.255.255 0
Device(config-custom)# dscp 18 
Device(config-custom)# direction any 
Device(config-custom)# end
Device(config)# ip nbar custom mycustomprotocol_udp transport udp
Device(config-custom)# ip subnet 255.255.255.255 0
Device(config-custom)# dscp 18 
Device(config-custom)# direction any 

Additional References for NBAR2 Custom Protocol

Related Documents

Related Topic

Document Title

Cisco IOS commands

Cisco IOS Master Command List, All Releases

Cisco IOS LAN switching commands

Cisco IOS LAN Switching Command Reference

Cisco IOS QoS configuration information

QoS Configuration Guide

Technical Assistance

Description

Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

http://www.cisco.com/cisco/web/support/index.html

Feature Information for NBAR2 Custom Protocol

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1. Feature Information for NBAR2 Custom Protocol

Feature Name

Releases

Feature Information

NBAR2 Custom Protocol Enhancements Ph II

15.4(2)T

The NBAR2 Custom Protocol Enhancements Phase II feature enables supporting an IP subnet or a list of IP addresses with a specific TCP or UDP transport.

The following command was introduced or modified:

ip nbar custom .