Oct 12 2009
Pim Packet Formats
The following information was taken from the RFCs below.
- RFC 4601(Obsoletes RFC 2362) — Protocol Independent Multicast – Sparse Mode (PIM-SM)
- RFC 5059 — Bootstrap Router (BSR) Mechanism for Protocol Independent Multicast (PIM)
To read the RFCs please visit the links below.
ftp://ftp.rfc-editor.org/in-notes/rfc4601.txt
ftp://ftp.rfc-editor.org/in-notes/rfc5059.txt
The following PIM packets formats are described within rfc 4601 and 5059.
RFC 4601 PIM Packet Formats
- Hello Message Format
- Register Message Format
- Register-Stop Message Format
- Join/Prune Message Format
- Assert Message Format
RFC 5059 PIM Packet Formats
- Bootstrap Message Format
- Candidate-RP-Advertisement Message Format
PIM Packet Header
All PIM control messages have IP protocol number 103. PIM messages are either unicast (e.g., Registers and Register-Stop) or multicast with TTL 1 to the ‘ALL-PIM-ROUTERS’ group (e.g., Join/Prune, Asserts, etc.). Candidate-RP-Advertisement messages are unicast to a BSR. Usually, Bootstrap messages are multicast with TTL 1 to the ALL-PIM-ROUTERS group, but in some circumstances (described in section 3.5.2 RFC 5059) Bootstrap messages may be unicast to a specific PIM neighbor.
The source address used for unicast messages is a domain-wide reachable address; the source address used for multicast messages is the link-local address of the interface on which the message is being sent.
The IPv4 ‘ALL-PIM-ROUTERS’ group is ’224.0.0.13′. The IPv6 ‘ALL-PIM-ROUTERS’ group is ‘ff02::d’.
All the PIM Packets have the common header below.
The Pim Version is 2.
The Message type is one of those listed in the table below.
The “Reserved” field is set to zero on transmission and ignored upon receipt.
The “Checksum” is a standard IP checksum.
PIM Hello Packet
The PIM Hello packet contains the PIM common header as described above as well as a series of optional fields namely. Optiontype, OptionLength and OptionValue. Multiple Options triplets can be transmitted in the hello packet.
The OptionType is one of those listed in the table below.
| Option Type | Optiontype Description |
| OptionType 1 | Holdtime |
| OptionType 2 | LAN Prune Delay |
| OptionType 3 to 16 | reserved to be defined in future versions of this document |
| OptionType 18 | deprecated and should not be used |
| OptionType 19 | DR Priority |
| OptionType 20 | Generation ID |
| OptionType 24 | Address List |
Whether all of these options are implemented in IOS will be examined in subsequent posts.
Register Message Format
A Register message is sent by the DR to the RP when a multicast packet needs to be transmitted on the RP-tree. The IP source address is set to the address of the DR, the destination address to the RP’s address. The IP TTL of the PIM packet is the system’s normal unicast TTL.
| Field | Description |
| B | The border bit – If the router is a DR for a source that it is directly connected to, it sets the B bit to 0. |
| N | The Null-Register bit – Set to 1 by a DR that is probing the RP before expiring its local Register-Suppression Timer. Set to 0 otherwise. |
| Reserved2 | Transmitted as zero, ignored on receipt. |
| Multicast Data Packet | The original packet sent by the source. |
The Register-Stop packet format
A Register-Stop is unicast from the RP to the sender of the Register message. The IP source address is the address to which the register was addressed. The IP destination address is the source address of the register message.
| Field | Description |
| Group Address | The group address from the multicast data packet in the original Register message sent to the RP |
| Source Address | The host address of the source from the multicast data packet in the original Register message sent to the RP. |
Join/Prune Message Format
A Join/Prune message is sent by routers towards upstream sources and RPs. Joins are sent to build shared trees (RP trees) or source trees (SPT). Prunes are sent to prune source trees when members leave groups as well as sources that do not use the shared tree.
| Field | Description |
| Upstream Neighbor Address | The address of the upstream neighbor that is the target of the message. For IPv6 the source address used for multicast messages is the link-local address of the interface on which the message is being sent. For IPv4, the source address is the primary address associated with that interface. |
| Reserved | Transmitted as Zero, ignored on receipt. |
| Holdtime | The amount of time a receiver must keep the Join/Prune state alive, in seconds. |
| Number of Groups | The number of multicast group sets contained in the message |
| Multicast group address | For format description, see Section 4.9.1. in RFC 4601 |
| Number of Joined Sources | Number of joined source addresses listed for a given group |
| Joined Source Address 1 .. n | This list contains the sources for a given group that the sending router will forward multicast datagrams from if received on the interface on which the Join/Prune message is sent. |
| Number of Pruned Sources | Number of pruned source addresses listed for a group |
| Pruned Source Address 1 .. n | This list contains the sources for a given group that the sending router does not want to forward multicast datagrams from when received on the interface on which the Join/Prune message is sent. |
Assert Message Format
The Assert message is used to resolve forwarder conflicts between routers on a link. It is sent when a router receives a multicast data packet on an interface on which the router would normally have forwarded that packet. Assert messages may also be sent in response to an Assert message from another router.
| Field | Description |
| Group Address | The group address for which the router wishes to resolve the
forwarding conflict. |
| Source Address | Source address for which the router wishes to resolve the
forwarding conflict. The source address MAY be set to zero for (*,G) asserts (see below). |
| R | RPT-bit is a 1-bit value. The RPT-bit is set to 1 for Assert(*,G) messages and 0 for Assert(S,G) messages. |
| Metric Preference | Preference value assigned to the unicast routing protocol that provided the route to the multicast source or Rendezvous-Point. |
| Metric | The unicast routing table metric associated with the route used to reach the multicast source or Rendezvous-Point. The metric is in units applicable to the unicast routing protocol used. |






Nov 24, 2009 @ 08:35:56
How is the PIM hello format when authentication is enabled.
Dec 22, 2009 @ 07:31:06
Nice doc … It was helpful for me. Thanks.