Step 1: Monitor Packets Sent from and Received by the Routing Engine
Action
To print packet headers transmitted through network interfaces sent from or received by the Routing Engine, enter the following JUNOS CLI operational mode command:
user@host>monitor traffic interfaceinterface-nameSample Output
user@R1>monitor traffic interface so-0/0/1verbose output suppressed, use <detail> or <extensive> for full protocol decode Listening on so-0/0/1, capture size 96 bytes11:23:01.666720 In IP 10.1.15.2 > OSPF-ALL.MCAST.NET: OSPFv2 Hello length: 4811:23:01.666884 Out IP 10.1.15.1 > OSPF-ALL.MCAST.NET: OSPFv2 Hello length: 48 11:23:01.681330 Out IP 10.0.0.1.bgp > 10.0.0.5.3813: P 3821434885:3821434904(19) ack 165811073 win 16417 <nop,nop,timestamp 42120056 42108995>: BGP, length: 1911:23:01.682041 In IP 10.0.0.5.3813 > 10.0.0.1.bgp: P 1:20(19) ack 19 win 16398 <nop,nop,timestamp 42111985 42120056>: BGP, length: 1911:23:01.781132 Out IP 10.0.0.1.bgp > 10.0.0.5.3813: . ack 20 win 16398 <nop,nop,timestamp 42120066 42111985>11:23:03.996629 In LCP echo request (type 0x09 id 0x67 len 0x0008)11:23:03.996645 Out LCP echo reply (type 0x0a id 0x67 len 0x0008)11:23:04.801130 Out LCP echo request (type 0x09 id 0x6d len 0x0008)11:23:04.801694 In LCP echo reply (type 0x0a id 0x6d len 0x0008)^C11 packets received by filter0 packets dropped by kernelWhat It Means
The sample output shows the actual packets entering and leaving the Routing Engine, not the transit packets passing through the router. You can use this information to diagnose issues such as Point-to-Point Protocol negotiation, Border Gateway Protocol negotiation, and Open Shortest Path First hellos.
The
monitor trafficcommand is similar to the UNIXtcpdumpcommand. For more information about themonitor trafficcommand, see the JUNOS System Basics and Services Command Reference.
CAUTION: Use the
monitor trafficcommand to diagnose problems on your router. Do not to leave this command on because it consumes Routing Engine resources.