To trace BGP protocol traffic, you can specify options in the global traceoptions statement at the [edit routing-options] hierarchy level, and you can specify BGP-specific options by including the traceoptions statement at the [edit protocols bgp] hierarchy level. For routing instances, include the statement.
-
traceoptions {
- file filename <files number> <size size> <world-readable |
no-world-readable>;
- flag flag <flag-modifier> <disable>;
- }
For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.
You can specify the following BGP-specific options in the BGP traceoptions statement:
You can filter trace statements and output only the statement information that passes through the filter by specifying the filter flag modifier. The filter modifier is only supported for the route and damping tracing flags.
![]() |
Note: Per-neighbor trace filtering is not supported on a BGP per-neighbor level for route and damping flags. Trace option filtering support is on a peer group level. |
![]() |
Note: Use the trace flags detail and all with caution. These flags may cause the CPU to become very busy. |
The match-on statement specifies filter matches based on prefixes. It is used to match on route filters.
For general information about tracing, see the tracing and logging information in the JUNOS System Basics Configuration Guide.