In some scenarios where multiple logical systems are involved, traceoptions must be applied for debugging purposes. However, traceoptions cannot be applied within logical systems; it must be configured in the root logical system and the lsys name called in the filter.
traceoptions
lsys
This article describes the step-by-step configuration of traceoptions for logical systems by using an example.
To configure traceoptions in logical systems:
Log in to the SRX device and enter configuration mode.
Specify the file in which the debug log will be stored for "security flow " :
"
# set security flow traceoptions file flow-trace
This sets the security flow debug file to the name flow-trace .
flow-trace
Set the traceoptions flag:
# set security flow traceoptions flag basic-datapath
This sets traceoptions to perform a basic data flow.
Use filters to reduce the volume of data:
# set security flow traceoptions packet-filter pf1 source-prefix 198.20.20.2
Add the logical system’s name in the packet filter.
# set security flow traceoptions packet-filter pf1 logical-system LSYS-STS
This sets traceoptions to log traces for the specified logical systems.
Issue commit to apply the configuration and exit configuration mode. Logging starts after the commit.
commit
# commit and-quit
The traceoptions debug files can be viewed with the show log <tracefilename> command.
show log <tracefilename>
For the above example, run the following command:
> show log flow-trace
Use additional options to match, trim, and find by using the pipe output (see the " Making Output More Readable " section in KB16108 - SRX Getting Started -- Configuring Traceoptions for Debugging and Trimming Output [juniper.net] ).
deactivate
<option> traceoptions
activate
<option>
# deactivate security flow traceoptions # commit
OR
delete <option> traceoptions
# delete security flow traceoptions # commit
2020-10-29: Article reviewed for accuracy, article accurate and valid