When setting timeouts, be aware of the following contingencies:
user@host# set applications application test
protocol tcp destination-port 1035-1035 inactivity-timeout 20
user@host# set applications application test
term test protocol udp
user@host# set applications
application test term test source-port 1-65535
user@host# set applications application test term test destination-port
1111-1111
user@host# set applications application ftp-1
protocol tcp source-port 0-65535 destination-port 2121-2121 inactivity-timeout
10
user@host# set applications application
telnet-1 protocol tcp source-port 0-65535 designating-port 2100-2148
inactivity-timeout 20
With this configuration, JUNOS software with enhanced services applies the 20-minute timeout for destination port 2121 in an application group, because the destination port numbers for telnet-1 (2100-2148) overlap those for ftp-1 (2121), and you defined telnet-1 after you defined ftp-1.
To modify an application timeout when multiple applications use the same protocol and an overlapping destination port range, you must unset the application and reset it with the new timeout value. This is because, during reboot, applications are loaded according to creation time, not modification time.
To avoid the unintended application of the wrong timeout to an application, do not create applications with overlapping destination port numbers.
If the modified application has overlapping destination ports with other applications, the default protocol-based timeout might not be the desired value. In that case, reboot JUNOS software with enhanced services, or set the application timeout again for the desired timeout to take effect.
For example, if suppose you create the following application:
user@host# set applications application my-application
protocol tcp destination-port 179-179 inactivity-timeout 20
Later you modify the timeout of the predefined application BGP as follows:
user@host# set applications application bgp inactivity-timeout
75
The BGP application will use the 75-minute timeout value, because it is now written to the application entry database. But the timeout for port 179, the port BGP uses, is also changed to 75 in the TCP port-based timeout table. After you reboot, the BGP application will continue to use the 75-minute timeout which, as a single application, it gets from the application entry database. But the timeout in the TCP port-based table for port 179 will now be 60. You can verify this by entering the show applications application bgp command.
The BGP application has no effect on single applications. But if you add BGP or my_application to an application group, the 60-minute timeout value will be used for destination port 179. This is because application group timeout is taken from the port-based timeout table, if one is set.
To ensure predictability when you modify a predefined application timeout, therefore, you can create a similar application, for example:
user@host# set applications application my-bgp
protocol tcp destination-port 179-179 inactivity-timeout 75