To configure application properties, include the application statement at the [edit applications] hierarchy level:
- [edit applications]
- application application-name {
- application-protocol protocol-name;
- destination-port port-number;
- icmp-code value;
- icmp-type value;
- inactivity-timeout value;
- learn-sip-register;
- protocol type;
- rpc-program-number number;
- sip-call-hold-timeout seconds;
- snmp-command command;
- source-port port-number;
- ttl-threshold value;
- uuid hex-value;
- }
You can group application objects by configuring the application-set statement; for more information, see Configuring Application Sets.
This section includes the following tasks for configuring applications:
The application-protocol statement allows you to specify which of the supported application protocols (ALGs) to configure and include in an application set for service processing. To configure application protocols, include the application-protocol statement at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- application-protocol protocol-name;
Table 5 shows the list of supported protocols. For more information about specific protocols, see ALG Descriptions.
Table 5: Application Protocols Supported by Services Interfaces
Protocol Name |
CLI Value |
Comments |
|---|---|---|
Bootstrap protocol (BOOTP) |
bootp |
Supports BOOTP and dynamic host configuration protocol (DHCP). |
Distributed Computing Environment (DCE) remote procedure call (RPC) |
dce-rpc |
Requires the protocol statement to have the value udp or tcp. Requires a uuid value. You cannot specify destination-port or source-port values. |
DCE RPC portmap |
dce-rpc-portmap |
Requires the protocol statement to have the value udp or tcp. Requires a destination-port value. |
Domain Name System (DNS) |
dns |
Requires the protocol statement to have the value udp. This application protocol closes the DNS flow as soon as the DNS response is received. |
Exec |
exec |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port value. |
FTP |
ftp |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port value. |
H.323 |
h323 |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port value. |
Internet Control Message Protocol (ICMP) |
icmp |
Requires the protocol statement to have the value icmp or to be unspecified. |
Internet Inter-ORB Protocol (IIOP) Transmission Control Protocol (TCP) |
iiop |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port value. |
IP |
ip |
– |
Login |
login |
– |
NetBIOS |
netbios |
Requires the protocol statement to have the value udp or to be unspecified. Requires a destination-port value. |
NetShow |
netshow |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port value. |
RealAudio |
realaudio |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port value. |
Real-Time Streaming Protocol (RTSP) |
rtsp |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port value. |
RPC User Datagram Protocol (UDP) or TCP |
rpc |
Requires the protocol statement to have the value udp or tcp. Requires a rpc-program-number value. You cannot specify destination-port or source-port values. |
RPC port mapping |
rpc-portmap |
Requires the protocol statement to have the value udp or tcp. Requires a destination-port value. |
Session Initiation Protocol (SIP) |
sip |
For more information, see Configuring SIP. |
Shell |
shell |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port value. |
SNMP |
snmp |
Requires the protocol statement to have the value udp or to be unspecified. Requires a destination-port value. |
SQLNet |
sqlnet |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port or source-port value. |
Trace route |
traceroute |
Requires the protocol statement to have the value udp or to be unspecified. Requires a destination-port value. |
Trivial FTP (TFTP) |
tftp |
Requires the protocol statement to have the value udp or to be unspecified. Requires a destination-port value. |
WinFrame |
winframe |
Requires the protocol statement to have the value tcp or to be unspecified. Requires a destination-port value. |
![]() |
Note: You can configure application-level gateways (ALGs) for ICMP and trace route under stateful firewall, NAT, or CoS rules when twice NAT is configured in the same service set. These ALGs cannot be applied to flows created by the Packet Gateway Controller Protocol (PGCP). Twice NAT does not support any other ALGs. NAT applies only the IP address and TCP or UDP headers, but not the payload. For more information about configuring twice NAT, see Network Address Translation Services Configuration Guidelines. |
The protocol statement allows you to specify which of the supported network protocols to match in an application definition. To configure network protocols, include the protocol statement at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- protocol type;
You specify the protocol type as a numeric value; for the more commonly used protocols, text names are also supported in the command-line interface (CLI). Table 6 shows the list of the supported protocols.
Table 6: Network Protocols Supported by Services Interfaces
For a complete list of possible numeric values, see RFC 1700, Assigned Numbers (for the Internet Protocol Suite).
![]() |
Note: IP version 6 (IPv6) is not supported as a network protocol in application definitions. By default, the twice NAT feature can affect IP, TCP, and UDP headers embedded in the payload of ICMP error messages. You can include the protocol tcp and protocol udp statements with the application statement for twice NAT configurations. For more information about configuring twice NAT, see Network Address Translation Services Configuration Guidelines. |
The ICMP code and type provide additional specification, in conjunction with the network protocol, for packet matching in an application definition. To configure ICMP settings, include the icmp-code and icmp-type statements at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- icmp-code value;
- icmp-type value;
You can include only one ICMP code and type value. The application-protocol statement must have the value icmp. Table 7 shows the list of supported ICMP values.
Table 7: ICMP Codes and Types Supported by Services Interfaces
![]() |
Note: If you configure an interface with an input firewall filter that includes a reject action and with a service set that includes stateful firewall rules, the router executes the input firewall filter before the stateful firewall rules are run on the packet. As a result, when the Packet Forwarding Engine sends an ICMP error message out through the interface, the stateful firewall rules might drop the packet because it was not seen in the input direction. Possible workarounds are to include a forwarding-table filter to perform the reject action, because this type of filter is executed after the stateful firewall in the input direction, or to include an output service filter to prevent the locally generated ICMP packets from going to the stateful firewall service. |
The TCP or UDP source and destination port provide additional specification, in conjunction with the network protocol, for packet matching in an application definition. To configure ports, include the destination-port and source-port statements at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- destination-port value;
- source-port value;
You must define one source or destination port. Normally, you specify this match in conjunction with the protocol match statement to determine which protocol is being used on the port; for constraints, see Table 5.
You can specify either a numeric value or one of the text synonyms listed in Table 8.
Table 8: Port Names Supported by Services Interfaces
For more information about matching criteria, see the JUNOS Policy Framework Configuration Guide.
You can specify a timeout period for application inactivity. If the software has not detected any activity during the duration, the flow becomes invalid when the timer expires. To configure a timeout period, include the inactivity-timeout statement at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- inactivity-timeout seconds;
The default value is 30 seconds. The value you configure for an application overrides any global value configured at the [edit interfaces interface-name service-options] hierarchy level; for more information, see Configuring Default Timeout Settings for Services Interfaces.
The Session Initiation Protocol (SIP) is a generalized protocol for communication between endpoints involved in Internet services such as telephony, fax, video conferencing, instant messaging, and file exchange. The supported standard is described in RFC 3261, SIP: Session Initiation Protocol, which includes stateful firewall and Network Address Translation (NAT) support for SIP dialogs and UDP IPv4 transport of SIP messages.
To implement SIP on adaptive services interfaces, you configure the application-protocol statement at the [edit applications application application-name] hierarchy level with the value sip. For more information about this statement, see Configuring an Application Protocol. In addition, there are two other statements you can configure to modify how SIP is implemented:
To configure SIP registration, include the learn-sip-register statement at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- learn-sip-register;
You can also manually inspect the SIP register by issuing the show services stateful-firewall sip-register command; for more information, see the JUNOS System Basics and Services Command Reference.
To configure a timeout period, include the sip-call-hold-timeout statement at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- sip-call-hold-timeout seconds;
The default value is 7200 seconds and the range is from 0 through 36,000 seconds (10 hours).
You can specify an SNMP command setting for packet matching. To configure SNMP, include the snmp-command statement at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- snmp-command value;
The supported values are get, get-next, set, and trap. You can configure only one value for matching. The application-protocol statement at the [edit applications application application-name] hierarchy level must have the value snmp. For information about specifying the application protocol, see Configuring an Application Protocol.
You can specify an RPC program number for packet matching. To configure an RPC program number, include the rpc-program-number statement at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- rpc-program-number number;
The range of values used for DCE or RPC is from 100,000 through 400,000. The application-protocol statement at the [edit applications application application-name] hierarchy level must have the value rpc. For information about specifying the application protocol, see Configuring an Application Protocol.
You can specify a trace route time-to-live (TTL) threshold value, which controls the acceptable level of network penetration for trace routing. To configure a TTL value, include the ttl-threshold statement at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- ttl-threshold value;
The application-protocol statement at the [edit applications application application-name] hierarchy level must have the value traceroute. For information about specifying the application protocol, see Configuring an Application Protocol.
You can specify a Universal Unique Identifier (UUID) for DCE RPC objects. To configure a UUID value, include the uuid statement at the [edit applications application application-name] hierarchy level:
- [edit applications application application-name]
- uuid hex-value;
The uuid value is in hexadecimal notation. The application-protocol statement at the [edit applications application application-name hierarchy level must have the value dce-rpc. For information about specifying the application protocol, see Configuring an Application Protocol. For more information on UUID numbers, see http://www.opengroup.org/onlinepubs/9629399/apdxa.htm.