Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    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.

    • There are different message types within ICMP. For example:
      • type 0 = Echo Request message
      • type 3 = Destination Unreachable message
    • An ICMP message type can also have a message code. The code provides more specific information about the message, as shown in Table 1.

      Table 1: Message Descriptions

      Message TypeMessage Code

      5 = Redirect

      0 = Redirect datagram for the network (or subnet)

       

      1 = Redirect datagram for the host

       

      2 = Redirect datagram for the type of application and network

       

      3 = Redirect datagram for the type of application and host

      11 = Time Exceeded Codes

      0 = Time to live exceeded in transit

       

      1 = Fragment reassembly time exceeded

    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 in the Junos OS CLI User Guide PDF Document.

    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.

    Published: 2012-06-29