Configuring PBAR

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Configure a port mapping.

  • Configure a general port mapping:port-mapping application application-name port port-number [ protocol protocol-name ]

  • Configure an ACL-based host-port mapping:port-mapping application application-name port port-number [ protocol protocol-name ] acl [ ipv6 ] acl-number

  • Configure a subnet-based host-port mapping:port-mapping application application-name port port-number [ protocol protocol-name ] subnet { ip ipv4-address { mask-length | mask } | ipv6 ipv6-address prefix-length } [ vpn-instance vpn-instance-name ]

  • Configure an IP address-based host-port mapping:port-mapping application application-name port port-number [ protocol protocol-name ] host { ip | ipv6 } start-ip-address [ end-ip-address ] [ vpn-instance vpn- instance-name ]

By default, all application protocols map with well-known ports.

You can configure these commands together.

APR selects a port mapping to recognize the application protocol of a packet in the following order:

  • IP address-based port mapping.

  • Subnet-based port mapping.

  • ACL-based host-port mapping.

  • General port mapping.

For the same type of mappings, the port mapping with a transport layer protocol has higher priority than the mapping without a transport layer protocol.

If the specified application protocol does not exist, the system first creates the protocol.