[an error occurred while processing this directive][an error occurred while processing this directive]

Tracing Mobile IP Operations

Mobile IP supports tracing operations. Mobile IP tracing operations track Mobile IP operations and record them in a log file. The error descriptions captured in the log file provide detailed information to help you solve problems.

Trace-related configurations are independent for each logical system and routing instance in which Mobile IP is configured. Mobile IP can generate two types of log messages:

  • Trace messages common to all logical systems and routing instances in which Mobile IP is configured. Examples of this global message type are the messages generated by Mobile IP during initialization after it starts up. These trace messages are stored in the default trace file, /var/log/mipd. You cannot configure Mobile IP to save global messages in a different file. Mobile IP traces global messages by default.
  • Trace messages specific to a logical system or routing instance in which Mobile IP is configured. An example of this message type is the message generated by Mobile IP when it receives a registration request. These trace messages are stored in the trace file configured for that logical system or routing instance. These messages cannot be saved in /var/log/mipd.

Tracing operations take place as follows:

  1. Global messages are logged in the /var/log/mipd file. Logical system or routing instance messages are logged in a file that you must configure, also located in the /var/log directory. You cannot change the directory (/var/log) in which trace files are located.
  2. When the file reaches 128 kilobytes (KB), it is renamed until there are three trace files. For example, mipd becomes mipd.0, then mipd.1, and then mipd.2). Then the oldest trace file (mipd.2) is overwritten.

    You can optionally configure the maximum file size to be from 10 KB through 1 gigabyte (GB). You can also specify the number of trace files to be from 2 through 1000. (For more information about how log files are created, see the JUNOS System Log Messages Reference.)

By default, only the user who configures the tracing operation can access log files. You can optionally configure read-only access for other users.

To configure Mobile IP tracing operations:

  1. Specify that you want to configure tracing options.
    [edit services mobile-ip]user@host# edit traceoptions
  2. (Optional) Configure the name for the file used for the trace output.

    See Configuring the Mobile IP Trace Log Filename.

  3. (Optional) Configure the number and size of the log files.

    See Configuring the Number and Size of Mobile IP Log Files.

  4. (Optional) Configure access to the log file.

    See Configuring Access to the Mobile IP Log File.

  5. (Optional) Configure a regular expression to filter logging events.

    See Configuring a Regular Expression for Mobile IP Lines to Be Logged.

  6. (Optional) Configure flags to filter the operations to be logged.

    See Configuring the Mobile IP Tracing Flags.

The Mobile IP traceoptions operations are described in the following sections:

Configuring the Mobile IP Trace Log Filename

Global messages common to all Mobile IP logical systems and routing instances are recorded only in /var/log/mipd. Mobile IP automatically creates this file if it is not present when Mobile IP starts. You cannot configure global messages to be recorded in any other file.

You must specify a different name with the file option for messages that are specific to a logical system or routing instance in which Mobile IP is configured. Ensure that filenames are unique for each logical system or routing instance in which Mobile IP is configured. If you do not configure a trace filename for a logical system or routing instance, then nothing is traced for that entity.

To configure the filename for Mobile IP tracing operations for a logical system or routing instance:

  • Specify the name of the file used for the trace output.
    [edit logical-systems lr1 services mobile-ip traceoptions]user@host# set file mip-lr1_1

Configuring the Number and Size of Mobile IP Log Files

By default, when the trace file reaches 128 kilobytes (KB) in size, it is renamed filename.0, then filename.1, and so on, until there are three trace files. Then the oldest trace file (filename.2) is overwritten.

You can optionally configure the maximum file size to be from 10 KB through 1 gigabyte (GB). You can also specify the number of trace files to be from 2 through 1000.

For example, you can set the maximum file size to 2 MB, and the maximum number of files to 20. When the file that receives the output of the tracing operation (filename) reaches 2 MB, filename is renamed filename.0, and a new file called filename is created. When the new filename reaches 2 MB, filename.0 is renamed filename.1 and filename is renamed filename.0. This process repeats until there are 20 trace files. Then the oldest file (filename.19) is overwritten by the newest file (filename.0).

To configure the number and size of trace files:

  • Specify the name, number, and size of the file used for the trace output. (Mobile IP supports the files and size options for the traceoptions statement.)
    [edit services mobile-ip traceoptions]user@host# set file mip_1 _logfile_1 files 20 size 2097152

Configuring Access to the Mobile IP Log File

By default, only the user who configures the tracing operation can access the log files. You can enable all users to read the log file and you can explicitly set the default behavior of the log file.

To specify that all users can read the log file:

  • Configure the log file to be world-readable.
    [edit services mobile-ip traceoptions]user@host# set file mip_1 _logfile_1 world-readable

To explicitly set the default behavior, only the user who configured tracing can read the log file:

  • Configure the log file to be no-world-readable.
    [edit services mobile-ip traceoptions]user@host# set file mip_1 _logfile_1 no-world-readable

Configuring a Regular Expression for Mobile IP Lines to Be Logged

By default, the trace operation output includes all lines relevant to the logged events.

You can refine the output by including regular expressions that will be matched.

To configure regular expressions to be matched:

  • Configure the regular expression.
    [edit services mobile-ip traceoptions]user@host# set file mip_1 _logfile_1 match regex

Configuring the Mobile IP Tracing Flags

By default, only important events are logged. You can specify which trace operations are logged by including specific tracing flags. The following table describes the flags that you can include.

Flag

Description

all

Trace all operations

authentication

Trace authentication operations

binding

Trace bindings

event

Trace events

home-agent

Trace home agent operations

interface-database

Trace interface database operations

packet

Trace packet decoding operations

protocol

Trace protocol operations

rtsock

Trace routing socket operations

session-db

Trace session database events

signal

Trace signal operations

subscriber

Trace subscriber events

trace

Trace changes in tracing

tunnel

Trace tunneling operations

user-interface

Trace user interface operations

To configure the flags for the events to be logged:

  • Configure the flags.
    [edit services mobile-ip traceoptions]user@host# set flag home-agent

Published: 2010-04-15

[an error occurred while processing this directive]