Tracing PPPoE Operations
The Junos OS trace feature tracks PPPoE operations and records events in a log file. The error descriptions captured in the log file provide detailed information to help you solve problems.
By default, nothing is traced. When you enable the tracing operation, the default tracing behavior is as follows:
Important events are logged in a file called pppoed located in the /var/log directory. You cannot change the directory (/var/log) in which trace files are located.
When the file pppoed reaches 128 kilobytes (KB), it is renamed pppoed.0, then pppoed.1, and finally pppoed.2, until there are three trace files. Then the oldest trace file (pppoed.2) is overwritten.
You can optionally specify the number of trace files to be from 2 through 1000. You can also configure the maximum file size to be from 10 KB through 1 gigabyte (GB). (For more information about how log files are created, see the System Log Explorer.)
By default, only the user who configures the tracing operation can access log files. You can optionally configure read-only access for all users.
To configure PPPoE tracing operations:
- Specify that you want to configure tracing options.[edit protocols pppoe]user@host# edit traceoptions
- (Optional) Configure the name for the file used for the trace output.
- (Optional) Configure the number and size of the log files.
- (Optional) Configure access to the log file.
- (Optional) Configure a regular expression to filter logging events.
- (Optional) Configure flags to filter the operations to be logged.
Optional PPPoE traceoptions operations are described in the following sections:
Configuring the PPPoE Trace Log Filename
By default, the name of the file that records trace output for PPPoE is pppoed. You can specify a different name with the file option.
Configuring the Number and Size of PPPoE Log Files
You can optionally specify the number of compressed, archived trace log files to be from 2 through 1000. You can also configure the maximum file size to be from 10 KB through 1 gigabyte (GB); the default size is 128 kilobytes (KB).
The archived files are differentiated by a suffix in the format .number.gz. The newest archived file is .0.gz and the oldest archived file is .(maximum number)-1.gz. When the current trace log file reaches the maximum size, it is compressed and renamed, and any existing archived files are renamed. This process repeats until the maximum number of archived files is reached, at which point the oldest file is overwritten.
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 compressed and renamed filename.0.gz, and a new file called filename is created. When the new filename reaches 2 MB, filename.0.gz is renamed filename.1.gz and filename is compressed and renamed filename.0.gz. This process repeats until there are 20 trace files. Then the oldest file, filename.19.gz, is simply overwritten when the next oldest file, filename.18.gz is compressed and renamed to filename.19.gz.
Configuring Access to the PPPoE 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.
Configuring a Regular Expression for PPPoE 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 to be matched.
Configuring the PPPoE Tracing Flags
By default, no events are logged. You can specify which events and operations are logged by specifying one or more tracing flags.
To configure the flags for the events to be logged, configure the flags:
- [edit protocols pppoe traceoptions]user@host# set flag authentication