Tracing BGP Protocol Traffic
You can trace various BGP protocol traffic to help you debug the BGP protocol issues. To trace BGP protocol traffic include the traceoptions statement at the [edit protocols bgp] hierarchy level. For routing instances, include the traceoptions statement at the [edit routing-instances routing-instance-name protocols bgp] hierarchy level.
You can specify the following BGP protocol-specific trace options using the flag statement:
- 4byte-as—4-byte AS events
- bfd—BFD protocol events
- damping—Damping operations
- graceful-restart—Graceful restart events
- keepalive—BGP keepalive messages
- nsr-synchronization—Nonstop active routing synchronization events
- open—BGP open packets. These packets are sent between peers when they are establishing a connection.
- packets—All BGP protocol packets
- refresh—BGP refresh packets
- update—BGP update packets. These packets provide routing updates to BGP systems.
Global tracing options are inherited from the configuration set by the traceoptions statement at the [edit routing-options] hierarchy level. You can override the following global trace options for the BGP protocol using the traceoptions flag statement included at the [edit protocols bgp] hierarchy level:
- all—All tracing operations
- general—All normal operations and routing table changes (a combination of the normal and route trace operations)
- normal—Normal events
- policy—Policy processing
- route—Routing information
- state—State transitions
- task—Routing protocol task processing
- timer—Routing protocol timer processing
You can optionally specify one or more of the following flag modifiers:
- detail—Detailed trace information
- filter—Filter trace information. Applies only to route and damping tracing flags.
- receive—Packets being received
- send—Packets being transmitted
![]() | Note: Use the all trace flag and the detail flag modifier with caution as these may cause the CPU to become very busy. |
![]() | Note: If you only enable the update flag, received keepalive messages do not generate a trace message. |
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.
The match-on statement specifies filter matches based on prefixes. It is used to match on route filters.
![]() | 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. |
Examples: Tracing BGP Protocol Traffic
Trace only unusual or abnormal operations to routing-log, and trace detailed information about all BGP messages to bgp-log:
Trace only update messages received from the configured peer:
Trace only messages that pass the policy based on prefix match:
Related Topics
- traceoptions statement
- For general information about tracing, see the tracing and logging information in the Junos System Basics Configuration Guide.
Hide Navigation Pane
Show Navigation Pane
Download
SHA1
