As part of debugging the operation of PIM, you want to trace all PIM packets exchanged by your router.
Enable PIM packet tracing:
[edit protocols pim] aviva@RouterA# set traceoptions file pim-trace world-readable aviva@RouterA# set traceoptions flag packets
As you are setting up and debugging a PIM domain, you can turn on tracing on PIM to keep a log of packet exchanges between routers. The option you choose depends on what you are interested in logging at any particular time. With JUNOS PIM, you can trace the following:
[edit protocols pim traceoptions] aviva@RouterA# set flag ? Possible completions: all Trace everything assert Trace assert messages autorp Trace bootstrap/RP/auto-RP messages bootstrap Trace bootstrap/RP/auto-RP messages general Trace general events graft Trace join/prune/graft/graft-ack messages hello Trace hello packets join Trace join/prune/graft/graft-ack messages mdt Trace messages related to multicast data tunnels normal Trace normal events packets Trace all PIM packets policy Trace policy processing prune Trace join/prune/graft/graft-ack messages register Trace register/register-stop messages route Trace routing information rp Trace bootstrap/RP/auto-RP messages state Trace state transitions task Trace routing protocol task processing timer Trace routing protocol timer processing
The trace options let you track all PIM operations and packets. More useful is being able to trace specific packet types, such as Join/Prune messages and auto-RP messages. You can also select additional options, to get either detailed traces or limit the traces only to packets sent or received by the router:
aviva@RouterA# set flag join ? Possible completions: <[Enter]> Execute this command detail Trace detailed information disable Disable this trace flag receive Trace received packets send Trace transmitted packets
The command in this recipe is a simple example of tracing all PIM packets to a file named pim-trace. As soon as you commit the configuration, the file starts recording PIM messages:
aviva@RouterA> show log pim-trace Nov 30 20:21:54 trace_on: Tracing to "/var/log/pim-trace" started Nov 30 20:22:01 PIM se-0/0/3.0 RECV 10.0.16.2 -> 18.104.22.168 V2 JoinPrune to 10.0.16.1 holdtime 210 groups 1 sum 0xc0e6 len 34 Nov 30 20:22:03 PIM fe-0/0/1.0 RECV 10.0.15.1 -> 22.214.171.124 V2 Hello hold 105 T-bit LAN prune 500 ms override 2000 ms pri 1 genid 300123470 sum 0xbe67 len 34 Nov 30 20:22:14 PIM fe-0/0/1.0 SENT 10.0.15.2 -> 126.96.36.199 V2 Bootstrap sum 0x46d4 len 36 Nov 30 20:22:14 PIM se-0/0/3.0 SENT 10.0.16.1 -> 188.8.131.52 V2 Bootstrap sum 0x46d4 len 36 Nov 30 20:22:14 PIM se-0/0/2.0 SENT 10.0.21.1 -> 184.108.40.206 V2 Bootstrap sum 0x46d4 len 36 Nov 30 20:22:14 PIM se-0/0/3.0 RECV 10.0.16.2 -> 220.127.116.11 V2 JoinPrune to 10.0.16.1 holdtime 210 groups 4 sum 0x4406 len 102 Nov 30 20:22:14 PIM fe-0/0/1.0 RECV 10.0.15.1 -> 18.104.22.168 V2 JoinPrune to 10.0.15.2 holdtime 210 groups 2 sum 0x5203 len 54
This output records PIM Join/Prune, Hello, and Bootstrap messages.
About the Author
Aviva Garrett has documented Juniper Networks technologies since joining the company as its first writer in 1997. She wrote the first JUNOS manuals and then oversaw the documentation as the company grew from a startup to an established network equipment provider. She recently stepped down as the Juniper Networks Director of Technical Publications to pursue other writing and business assignments, such as JUNOS Cookbook. Prior to Juniper Networks, Aviva worked at Cisco Systems for six years. She also worked for Excelan/Novell, Gavilan, and other technology companies and startups. She is the coauthor of Juniper Networks Field Guide and Reference (Addison-Wesley).
Router Configuration and File Management
Basic Router Security and Access Control
Routing Policy and Firewall Filters