PIM Control Messages
PIM devices exchange control messages to implement multicast routing. A PIM control message is encapsulated in an IP packet, as shown in Figure 4-28.
In the header of an IP packet that contains a PIM control message:
The protocol type field is 103.
The destination address identifies a receiver. The destination address can be either a unicast address or a multicast address.
PIM Control Message Types
All PIM control messages use the same header format, as shown in Figure 4-29.
Field |
Description |
---|---|
Version |
PIM version The value is 2. |
Type |
Message type:
|
Reserved |
Reserved |
Checksum |
Checksum |
Hello Messages
PIM devices periodically send Hello messages through all PIM interfaces to discover neighbors and maintain neighbor relationships.
In an IP packet that carries a Hello message, the source address is a local interface's address, the destination address is 224.0.0.13, and the TTL value is 1. The IP packet is transmitted in multicast mode.
Field |
Description |
---|---|
Type |
Message type The value is 0. |
Reserved |
Reserved The field is set to 0 when the message is sent and is ignored when the message is received. |
Checksum |
Checksum |
Option Type |
Parameter type Valid values of this field are listed in Table 4-7. |
Option Length |
Length of the Option Value field |
Option Value |
Parameter value |
Option Type |
Option Value |
---|---|
1 |
Holdtime: timeout period during which a neighbor remains in the reachable state If a router does not receive any Hello message during the timeout period, the router considers its neighbor unreachable. |
2 |
The field consists of the following parts:
|
19 |
DR Priority: priority of a router interface, used to elect a designated router (DR) The higher a router interface's priority, the higher the probability the router interface becomes a DR. |
20 |
Generation ID: a random number, indicating neighbor status If the neighbor status changes, the random number is updated. When a router detects that the Hello messages received from an upstream device contain different Generation ID values, the router considers the upstream neighbor Down or the status of the upstream neighbor has changed. |
21 |
State Refresh Capable: interval for refreshing neighbor status |
24 |
Address List: secondary address list of PIM interfaces |
Register Messages
Register messages are used only in PIM-SM.
When a multicast source becomes active on a PIM-SM network, the source's DR sends a Register message to register with the rendezvous point (RP).
In an IP packet that carries a Register message, the source address is the address of the source's DR, and the destination address is the RP's address. The message is transmitted in unicast mode.
Field |
Description |
---|---|
Type |
Message type The value is 0. |
Reserved |
The field is set to 0 when the message is sent and is ignored when the message is received. |
Checksum |
Checksum |
B |
Border bit |
N |
Null-Register bit |
Reserved2 |
Reserved The field is set to 0 when the message is sent and this field is ignored when the message is received. |
Multicast data packet |
The source's DR encapsulates the received multicast data in a Register message and sends the message to the RP. After decapsulating the message, the RP learns the (S, G) information of the multicast data packet. |
A multicast source can send data to multiple groups, and therefore a source's DR must send Register messages to the RP of each target multicast group. A Register message is encapsulated only in one multicast data packet, so the packet carries only one copy of (S, G) information.
In the register suppression period, a source's DR sends Null-Register messages to notify the RP of the source's active state. A Null-Register message contains only an IP header, including the source address and group address. After the register suppression times out, the source's DR encapsulates a Register message into a multicast data packet again.
Register-Stop Messages
Register-Stop messages are used only in PIM-SM.
Receivers stop requesting a multicast group's data from the RP.
The RP stops serving a multicast group.
Multicast data has been switched from a rendezvous point tree (RPT) to a shortest path tree (SPT).
After receiving a Register-Stop message, a source's DR stops using the Register message to encapsulate multicast data packets and enters the register suppressed state.
In an IP packet that carries a Register-Stop message, the source address is the RP's address, and the destination address is the source DR's address. The message is transmitted in unicast mode.
Field |
Description |
---|---|
Type |
Message type The value is 2. |
Group Address |
Multicast group address |
Source Address |
Multicast source address |
An RP can serve multiple groups, and a group can receive data from multiple sources. Therefore, an RP may simultaneously perform multiple (S, G) registrations.
A Register-Stop message carries only one copy of the (S, G) information. When an RP sends a Register-Stop message to a source's DR, the RP can terminate only one (S, G) registration.
After receiving the Register-Stop message carrying the (S, G) information, the source's DR stops encapsulating (S, G) packets. The source still uses Register messages to encapsulate packets and send the packets to other groups.
Join/Prune Messages
A Join/Prune message can contain both Join messages and Prune messages. A Join/Prune message that contains only a Join message is called a Join message. A Join/Prune message that contains only a Prune message is called a Prune message.
When a PIM device is not required to send data to its downstream interfaces, the PIM device sends Prune messages through its upstream interfaces to instruct upstream devices to stop forwarding packets to the network segment on which the PIM device resides.
When a receiver starts to require data from a PIM-SM network, the receiver's DR sends a Join message through the reverse path forwarding (RPF) interface towards the RP to instruct the upstream neighbor to forward packets to the receiver. The Join message is sent in the upstream direction hop by hop to set up an RPT.
When an RP triggers an SPT switchover, the RP sends a Join message through the RPF interface connected to the source to instruct the upstream neighbor to forward packets to the network segment. The Join message is sent in the upstream direction hop by hop to set up an SPT.
When a receiver's DR triggers an SPT switchover, the DR sends a Join message through the RPF interface connected to the source to instruct the upstream neighbor to forward packets to the network segment. The Join message is sent in the upstream direction hop by hop to set up an SPT.
A PIM network segment may be connected to a downstream interface and multiple upstream interfaces. After an upstream interface sends a Prune message, if other upstream interfaces still require multicast packets, these interfaces must send Join messages within the override-interval. Otherwise, the downstream interfaces responsible for forwarding packets on the network segment do not perform the prune action.
- If PIM is enabled on the interfaces of user-side routers, a receiver' DR is elected, and outbound interfaces are added to the PIM DR's outbound interface list. The PIM DR then sends Join messages to the RP.
As shown in Figure 4-34, Port 1 of DeviceA is a downstream port, and Port 2 of DeviceB and Port 3 of DeviceC are upstream ports. If DeviceB sends a Prune message through Port 3 of DeviceC and Port 1 of DeviceA will receive the message. If DeviceC still wants to receive the multicast data of the group, DeviceC needs to send a Join message within the override-interval. This message will notify Port 1 of DeviceA that a downstream router still wants to receive the multicast data. Therefore, DeviceA does not perform the prune action.
In an IP packet that carries a Join/Prune message, the source address is a local interface's address, the destination address is 224.0.0.13, and the TTL value is 1. The message is transmitted in multicast mode.
Field |
Description |
---|---|
Type |
Message type The value is 3. |
Upstream Neighbor Address |
Upstream neighbor's address, that is, the address of the downstream interface that receives the Join/Prune message and performs the Join or Prune action |
Number of Groups |
Number of groups contained in the message |
Holdtime |
Duration (in seconds) that an interface remains in the Join or Prune state |
Group Address |
Group address |
Number of Joined Sources |
Number of sources that the router joins |
Number of Pruned Sources |
Number of sources that the router prunes |
Joined Source Address |
Address of the source that the router joins |
Pruned Source Address |
Address of the source that the router prunes |
Bootstrap Messages
Bootstrap messages are used only in PIM-SM.
When a dynamic RP is used, candidate-bootstrap routers (C-BSRs) periodically send Bootstrap messages through all PIM interfaces to participate in BSR election. The router that wins in the election continues to send Bootstrap messages carrying RP-Set information to all PIM routers in the domain.
In an IP packet that carries a Bootstrap message, the source address is a PIM interface's address, the destination address is 224.0.0.13, and the TTL value is 1. The packet is transmitted in multicast mode hop by hop and is flooded on the entire network.
Field |
Description |
---|---|
Type |
Message type The value is 4. |
Fragment Tag |
Random number used to distinguish the Bootstrap message |
Hash Mask length |
Length of the hash mask of the C-BSR |
BSR-priority |
C-BSR priority |
BSR-Address |
C-BSR address |
Group Address |
Group address |
RP-Count |
Total number of candidate-rendezvous points (C-RPs) that serve the group |
Frag RP-Cnt |
Number of C-RP addresses included in this fragment of the Bootstrap message for the corresponding group range. This field facilitates parsing of the RP-Set for a given group range, when carried over more than one fragment. |
RP-address |
C-RP address |
RP-holdtime |
Aging time of the advertisement message sent by the C-RP |
RP-Priority |
C-RP priority |
The BSR boundary of a PIM interface can be set by using the pim bsr-boundary command on the interface. Multiple BSR boundary interfaces divide the network into different PIM-SM domains. Bootstrap messages cannot pass through the BSR boundary.
Assert Messages
On a shared network segment, if a PIM router receives an (S, G) packet from the downstream interface of the (S, G) or (*, G) entry, it indicates that other forwarders exist on the network segment. The PIM router then sends an Assert message through the downstream interface to participate in the forwarder election. The router that fails in the forwarder election stops forwarding multicast packets through the downstream interface.
In an IP packet that carries an Assert message, the source address is a local interface's address, the destination address is 224.0.0.13, and the TTL value is 1. The packet is transmitted in multicast mode.
Field |
Description |
---|---|
Type |
Message type The value is 5. |
Group Address |
Group address |
Source address |
This field is a multicast source address if a unique forwarder is elected for (S, G) entries, and this field is 0 if a unique forwarder is elected for (*, G) entries. |
R |
RPT bit This field is 0 if a unique forwarder is elected for (S, G) entries, and this field is 1 if a unique forwarder is elected for (*, G) entries. |
Metric Preference |
Priority of the unicast path to the source address If the R field is 1, this field indicates the priority of the unicast path to the RP. |
Metric |
Cost of the unicast route to the source address If the R field is 1, this field indicates the cost of the unicast path to the RP. |
Graft Messages
The Graft message is applicable only to PIM-DM.
In the PIM-DM network, when a router receives a Report message from a host, the router sends a Graft message through the upstream interface of the related (S, G) entry if the router is not on the SPT. The upstream neighbor immediately restores the forwarding of the downstream interface. If the upstream neighbor is not on the SPT, the neighbor continues to send the Graft message to the upstream.
The source address of the IP packet encapsulated with the Graft message is the local interface address and the destination address is the RPF neighbor. The packet is sent in unicast mode.
The format of the Graft message is the same as that of the Join/Prune message, as shown in Table 4-13. Only the values of partial fields are different.
Field |
Description |
---|---|
Type |
Indicates the message type. The value is 6. |
Joined source address |
Indicates the source address of the (S, G) to be grafted. |
Number of Pruned Sources |
This field is not used in a Graft message. The value is 0. |
HoldTime |
This field is not used in a Graft message. The value is 0. |
Graft-Ack Message
The Graft-Ack message is applicable only to PIM-DM.
In the PIM-DM network, when a router receives a Graft message from the downstream, the router restores the forwarding of the related downstream interface. At the same time, the router sends a Graft-Ack message through the downstream interface to notify that it has received the Graft message.
If the router that sends out the Graft message does not receive any Graft-Ack message in the set time, the router considers that the upstream does not receive the Graft message and resends it.
The source address of the IP packet encapsulated in the Graft-Ack message is the downstream interface address of an upstream device and the destination address is the address of the router that sends out the Graft message. The packet is sent in unicast mode.
The format of the Graft-Ack message is the same as that of the Graft message and copies some contents of the Graft message. Only the values of partial fields are different. See Table 4-14.
C-RP Advertisement Messages
C-RP Advertisement messages are used only in PIM-SM.
When a dynamic RP is used, C-RPs periodically send Advertisement messages to notify the BSR of the range of groups they want to serve.
In an IP packet that carries an Advertisement message, the source address is the source's C-RP address, and the destination address is the BSR's address. The packet is transmitted in unicast mode.
Field |
Description |
---|---|
Type |
Message type The value is 8. |
Prefix-Cnt |
Prefix value of the multicast address |
Priority |
C-RP priority |
Holdtime |
Aging time of the Advertisement message |
RP-Address |
C-RP address |
Group Address |
Group address |
State-Refresh Message
The State-Refresh message is applicable only to PIM-DM.
In the PIM-DM network, to avoid that the interface restores forwarding because the prune timer times out, the first-hop router nearest to the source periodically triggers State-Refresh messages. The State-Refresh message is flooded in the entire network and the statuses of prune timers on all routers are refreshed.
The source address of the IP packet encapsulated with the State-Refresh message is the downstream interface address, the destination address is 224.0.0.13, and the TTL value is 1. The packet is sent in multicast mode.
Field |
Description |
---|---|
Type |
Indicates the message type. The value is 9. |
Multicast Group Address |
Indicates the group address. |
Source Address |
Indicates the source address. |
Originator Address |
Indicates the address of the first-hop router. |
Metric Preference |
Indicates the priority of the unicast route to the source. |
Metric |
Indicates the cost of the unicast route to the source. |
Masklength |
Indicates the address mask length of the unicast route to the source. |
TTL |
Indicates the TTL of the State-Refresh message. The TTL is used to limit the transmission range of the messages. The TTL value is reduced by 1 each time the State-Refresh message is forwarded by a router. |
P |
Indicates the prune indicator flag. If the State-Refresh message is sent out through the pruned interface, P is 1. Otherwise, P is 0. |
Interval |
Indicates the interval for sending State-Refresh messages. |