Prerequisites for NBAR2 Custom Protocol
Protocol pack licensing must be enabled to configure custom protocols.
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
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.
Protocol pack licensing must be enabled to configure custom protocols.
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 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.
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable Example:
|
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
|
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.
Example:Specifies the subnet IP and a subnet mask of 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:
|
Specifies TCP or UDP as the transport protocol and enters custom configuration mode. |
Step 5 |
end Example:
|
(Optional) Exits custom configuration mode. |
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
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
Cisco IOS LAN switching commands |
|
Cisco IOS QoS configuration information |
QoS Configuration Guide |
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. |
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.
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 . |