Example: Defining a Custom ICMP Application

This example shows how to define a custom ICMP application.

Requirements

Before you begin:

Overview

Junos OS supports ICMP—as well as several ICMP messages—as predefined or custom applications. When configuring a custom ICMP application, you define a type and code.

Junos OS supports any type or code within the range of 0 through 55 .

In this example, you define a custom application named host-unreachable using ICMP as the transport protocol. The type is 3 (for destination unreachable) and the code is 1 (for host unreachable). You set the timeout value at 4 minutes.

Note: For more information about ICMP types and codes, refer to RFC 792, Internet Control Message Protocol.

Configuration

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode.

To define a custom ICMP application:

  1. Set the application type and code.

    [edit applications application host-unreachable]user@host# set icmp-type 5 icmp-code 0
  2. Set the inactivity timeout value.

    [edit applications application host-unreachable]user@host# set inactivity-timeout 4
  3. If you are done configuring the device, commit the configuration.
    [edit]user@host# commit

Verification

To verify the configuration is working properly, enter the show applications command.

Related Topics