HCIE Interview Information-PIM

PIM

PIM (Protocol Independent Multicast) protocol-independent multicast
Use unicast routing table and RPF to check
PIM Use IP encapsulation protocol number 103
Multicast distribution tree refers to a one-way acyclic data transmission path formed from a multicast source to a receiver . There are two types of multicast distribution trees: SPT and RPT

RPF check
RPF unicast reverse path forwarding (Reverse path forwarding)
When a multicast message is received, it will perform a unicast routing table to find the route of the source address according to the source address of the message, and check the output of the routing table entry. If the interface is consistent with the incoming interface of the received multicast message, it is considered that the message arrives from the correct interface, which ensures the consistency and correctness of the entire forwarding path. If it does not pass, the message will be discarded

If multiple equal-cost routes on a routing table are received, the one with the smallest priority value will be selected first, and the one with the same priority will be selected as multicast static route > MBGP route > MIGP route > unicast route, and the one with the largest next hop address will be used as RPF routing

PIM-DM dense mode

Use push (push) mode to forward multicast packets
Establish SPT (Shortest Path Tree, the shortest path tree)

Build an acyclic SPT tree through periodic (3 minutes) diffusion-pruning

When a PIM-DM neighbor discovers that
a PIM device is on each PIM-enabled interface, it sends Hello messages to the outside world. The multicast packet encapsulating the Hello message has the following characteristics:

  • The destination address is 224.0.0.13, which means all PIM devices in the same network segment
  • The source address is the IP address of the interface
  • The TTL value is 1, only sent to the neighbor interface

Hello negotiation parameters:

  • DR_Priority: Indicates the priority of each router interface to run for DR. The higher the priority, the easier it is to win. (default 1)
  • Holdtime: Indicates the timeout period (105s) for keeping the neighbor reachable.
  • LAN_Delay: Indicates the delay time for transmitting the Prune message in the shared network segment (delivering the downstream prune message to the upstream for 5 seconds).
  • Override-Interval: Indicates the time interval for overriding pruning carried in the Hello message (wait 25s for the downstream to send the join after sending the pruning downstream).

Maintain neighbor relationship:
PIM devices periodically send Hello messages. If the Holdtime expires and has not received a new Hello message from the PIM neighbor, it considers the neighbor unreachable and removes it from the neighbor list.
Changes in PIM neighbors will result in changes in the multicast topology on the network. If an upstream or downstream neighbor on the multicast distribution tree is unreachable, multicast routes will converge again and the multicast distribution tree will migrate.

Send Hello message periodically (30s), and the timeout period of Hello message is 105s

The DR election of PIM-DM
requires all the routers in the network segment to support the DR priority.
The router with the higher DR priority becomes the DR. The router with the same priority becomes the DR with the higher IP address. If the DR fails, the DR will be re-elected. The DR
value is 0~ 2^32-1
defaults to 1
only to help IGMPv1 election queriers

Diffusion of PIM-DM
PIM-DM assumes that each subnet in the network has at least one multicast group member, so multicast data will be periodically (3 minutes) diffused to all nodes in the network, and all PIM devices in the network will Can receive multicast data.
When receiving a multicast packet sent by a multicast source:
1. The router will perform an RPF check upon receiving the multicast packet.
2. If it passes the check, it will create (S, G) entries, and then send the data to all downstream PIMs -DM node forwarding, this process is called Flooding

The pruning of PIM-DM
is set to prevent the downstream from having no multicast members, and the diffusion of multicast packets will lead to a waste of link bandwidth. Pruning is required.
1. When the downstream has no multicast group members, the router sends a Prune message to the upstream to notify the upstream The node no longer needs to forward data to the branch
2. After the upstream node receives it, it deletes the corresponding interface from the corresponding output sending table of the multicast forwarding table item (S, G), and the pruning continues until only PIM-DM remains Necessary branches, so that a SPT tree rooted at the multicast source is built

PIM-DM state refresh
State-Refresh (State-Refresh)
The pruned node will start the pruning timer, the default is 210s, when the timer expires, it will resend the multicast report to the interface deleted from the multicast forwarding entry
In order to prevent the pruning timer from overtime, send a status refresh message periodically (60s) to prevent the timer from overtime (sent by the first multicast router, not the multicast source )

Grafting of PIM-DM Graft
(Graft) mechanism: In order to prevent new members from getting multicast data quickly, when a new member joins a multicast group, it will quickly receive multicast messages
1. When a new member sends a multicast The group member joins the message IGMP report,
2. After the router receives it, it will feel that the new member has the need to forward multicast data, and will immediately send a Graft message to the upstream, requesting the upstream router to resume the forwarding of the corresponding outbound interface. 3. The upstream
receives After receiving the Graft message, it will reply Graft Ack and restore the outgoing interface of the connected RTE to the forwarding state

Assert mechanism of PIM-DM
If the following situations occur, it means that there may be other multicast forwarders
1. The multicast packet cannot pass RPF detection
2. The interface receiving the multicast packet is on the router (S, G) A downstream interface in the entry
will only perform the assertion mechanism at this time

Assertion mechanism: avoiding duplication of multicast packets
When multicast data from a multicast source is forwarded to the same member by multiple routers, resources will be wasted

In order to avoid waste, after receiving the same multicast packet from the downstream interface, the PIM router will send an Assert message to the downstream interface in multicast mode, in which the destination network segment is 244.0.0.13, the source address is the address of the downstream interface, and the TTL is 1. Other routers compare after receiving the parameters carried by the other party's message
1. The unicast routing protocol that receives the multicast source has a higher priority (small value)
2. Compare the routing overhead with the same priority (small overhead)
3 , and the
overhead is the same, then the IP value of the receiver’s broadcast network interface is
large
. After forwarding the multicast packet, the PIM router will also delete the downstream interface from the (S, G) table

Assert winner periodically sends Assert messages to maintain the status of Assert winner. If the Assert loser timer expires and the Assert loser still does not receive the Assert message from the Assert winner, add a new downstream interface to forward multicast data.

Limitations of PIM-DM
PIM-DM is suitable for networks with densely distributed multicast members, but it will bring a great burden to the network in networks with sparsely distributed multicast members

Configure PIM-DM
in the system view multicast routing-enable
and configure it on each interface of each routerpim dm

PIM-SM sparse mode

Basic functions In the ASM model,
use the pull (pull) method to forward multicast packets.
The main functions of PIM: establish SPT trees (Shortest Path Tree, shortest path tree) and RPT trees (Rendezvous Point Tree, rendezvous point trees, also known as shared trees) )
is suitable for networks with sparse multicast members

When a PIM-SM neighbor discovers that
a PIM device is on each PIM-enabled interface, it sends a Hello message to the outside world. The multicast packet encapsulating the Hello message has the following characteristics:

  • The destination address is 224.0.0.13, which means all PIM devices in the same network segment
  • The source address is the IP address of the interface
  • The TTL value is 1, only sent to the neighbor interface

Hello negotiation parameters:

  • DR_Priority: Indicates the priority of each router interface to run for DR. The higher the priority, the easier it is to win.
  • Holdtime: Indicates the timeout period for keeping the neighbor reachable.
  • LAN_Delay: Indicates the delay time for transmitting Prune messages in the shared network segment.
  • Override-Interval: Indicates the time interval for overriding pruning carried in the Hello message.

Maintain neighbor relationship:
PIM devices periodically send Hello messages. If the Holdtime expires and has not received a new Hello message from the PIM neighbor, it considers the neighbor unreachable and removes it from the neighbor list.
Changes in PIM neighbors will result in changes in the multicast topology on the network. If an upstream or downstream neighbor on the multicast distribution tree is unreachable, multicast routes will converge again and the multicast distribution tree will migrate.

Send Hello message periodically (30s), and the timeout period of Hello message is 105s

DR election of PIM-SM
Each network segment elects DR.
PIM devices exchange Hello messages to become PIM neighbors. The Hello messages carry the DR priority and the interface address of the network segment.
All routers in the network segment must support DR priority.
The router with the highest DR priority becomes the DR, and the router with the same priority becomes the DR with the highest IP address. If the DR fails, the DR will be re-elected. The DR
value is 0~2^32-1,
and the default is 1.

The RP of PIM-SM discovers that
the RP (Rendezvous Point) rendezvous point
RP is the core switch of PIM-SM, and acts as the root node of the RPT tree.
All multicast traffic in the shared tree must be forwarded to the receiver
C-BSR through the RP (candidate self-enumeration Router Candidate-Bootstrap Router)
BSR (Self-enumeration Router Bootstrap Router)
C-RP (Candidate Rendezvous Point)

Can be statically specified or dynamically elected

  • Static RP election
    Static designation requires the administrator to configure on each PIM-SM router, so that each router knows the location of the RP

  • Dynamic RP election
    1. To use dynamic RP, C-BSR and C-RP must be configured, and BSR is generated by C-BSR election.
    Initially, each C-BSR considers itself a BSR and sends Bootstrap messages to the entire network. The Bootstrap message carries the C-BSR address and the priority of the C-BSR. Each router receives the Bootstrap messages sent by all C-BSRs, and compares the information of these C-BSRs to elect to generate a BSR. The election rules are as follows:
    a. 优先级较高者获胜(优先级数值越大优先级越高)
    b. 如果优先级相同,IP地址较大者获胜
    Since all routers use the same election rules, the winning BSRs are also the same. All routers in the network know the address of the BSR.
    2. The C-RP sends a C-RP Advertisement message to the BSR. The message carries the C-RP address, service group range, and C-RP priority.
    3. The BSR summarizes the information into an RP-Set, encapsulates it in a Bootstrap message, and publishes it to every PIM-SM device in the entire network.
    4. According to the RP-Set, each router uses the same rules to calculate and compare, and selects the group RP from multiple C-RPs for a specific group
    a. 与用户加入的组地址匹配的C-RP服务的组范围掩码最长者获胜。
    b. 则比较C-RP优先级,C-RP优先级较高者获胜(优先级数值越大优先级越低)。
    c. 如果优先级相同,则执行Hash函数,计算结果较大者获胜。(计算内容组地址、Hash Mask(由BSR通告)、C-RP地址)
    d. 如果以上都相同,则C-RP地址较大者获胜。

Establishment of RPT of PIM-SM
Multicast source joins
When there is an active multicast source in the network (the multicast source sends multicast data to the multicast group), the DR at the multicast source end encapsulates the multicast data in the Register and sends it as a unicast For RP, create (S, G) entry on RP, and register source information

Member joining
1. When a group member in the network joins a multicast group, an IGMP membership report is sent to the multicast group.
2. The last hop router (receiver DR) sends a Join message to the RP, which will be generated by routers along the way to the RP (*, G) Multicast forwarding entries, generating an RPT tree rooted at RP

When a group member and a multicast source sending data to the group appear in the network at the same time, the RP is used as the transfer station, and the multicast data is first encapsulated in a Register message and sent to the RP by unicast, and then reaches the group member RPT along the RPT to realize the
group The purpose of on-demand forwarding of broadcast data is to reduce the occupation of network bandwidth by unneeded data

Register registration message:
The source address of the encapsulated IP message is the source DR, the destination address is RP, and the unicast method is used.
A Register message can only encapsulate one multicast data message, and only carries one hop (S, G) information

In PIM-SM SPT switchover
, since a multicast group corresponds to only one RP, only one RPT tree is constructed. In the case of no SPT switchover, all multicast packets sent to this group must be encapsulated in the Register message and sent. To the RP, after the RP decapsulates, it is distributed along the RPT.
Since all multicast data packets forwarded through RPT must be transferred through RP, when multicast data packets gradually increase, it will form a huge burden on RP, so create a forwarding link from the multicast source directly to the receiver

  • RP triggers SPT switching.
    After receiving the Register message from the source DR, the RP forwards the multicast data encapsulated in the Register message to the group members along the RPT. At the same time, the RP sends an SPT Join message to the source DR to establish an SPT from the RP to the source. .
    After the SPT is successfully established, when the RP receives the first multicast data packet from the SPT, the RP stops using the Register message, so that the DR and RP at the source end avoid frequent encapsulation/decapsulation. Multicast data is forwarded from the router directly connected to the multicast source to the RP through the SPT tree, and then forwarded to the group members along the RPT.

  • The DR at the group member side triggers the SPT switchover.
    1. The multicast data is forwarded by the RPT, and the member-side DR sends a (*, G) Join message to the RP.
    2. The member-side DR periodically checks the forwarding rate of the multicast message. Once the forwarding rate of the (S, G) message is found to exceed Threshold (RPT is not necessarily the tree with the shortest path), triggering SPT switchover
    3. The member DR sends a (S, G) Join message directly to the multicast source DR. When the receiver DR receives the multicast sent along the SPT After the data, discard the multicast data sent along the RPT, and send a Prune message to the RP at the same time, delete the receiver in the RPT, and realize the switch from RPT to SPT 4. Data forwarding multicast
    source -> multicast source DR - >Member-side DR—>member (no longer going through RP)

Assert mechanism of PIM-DM
If the following situations occur, it means that there may be other multicast forwarders
1. The multicast packet cannot pass RPF detection
2. The interface receiving the multicast packet is on the router (S, G) A downstream interface in the entry
will only perform the assertion mechanism at this time

Assertion mechanism: avoiding duplication of multicast packets
When multicast data from a multicast source is forwarded to the same member by multiple routers, resources will be wasted

In order to avoid waste, after receiving the same multicast message sent by a neighboring router, a PIM router will send an Assert message to all PIM routers in the network segment in multicast mode, where the destination network segment is 244.0.0.13 and the source address is downstream Interface address, TTL is 1, and other routers compare the parameters after receiving the parameters carried by the other party's message
1. The unicast routing protocol that receives the multicast source has a higher priority (small value)
2. The same priority compares the routing overhead ( 3. If the overhead
is the same, the IP value of the receiver’s broadcast network interface is large . The multicast packet will be forwarded to the network segment, and the PIM router will also delete it from the downstream interface in the (S, G) table.


Assert winner periodically sends Assert messages to maintain the status of Assert winner. If the Assert loser timer expires and the Assert loser still does not receive the Assert message from the Assert winner, add a new downstream interface to forward multicast data.

DR Switchover Delay
DR Switchover Delay
If the current DR fails, causing the PIM neighbor relationship to time out (105s), other PIM neighbors will re-elect the DR.
By default, the interface changes from DR to non-DR, and the router stops using this interface to forward data immediately. If the multicast data of the new DR has not arrived at this time, there will be a brief interruption of multicast data flow.
After PIM DR delayed switchover is configured, when a PIM-SM-enabled interface changes from DR to non-DR because it receives a Hello message from a new neighbor, the interface still has partial DR functions before the delay time expires. , and continue to forward multicast data.

Configure PIM-SM
in the system view multicast routing-enable
and configure it on each interface of each router To configure a static RP, you need to configure (enable the pim function) pim sm
on each interface to specify the RPpimstatic-rp 2.2.2.2

PIM GR
Graceful Restart GR (Graceful Restart) is a kind of high reliability HA (High Availability) technology, which realizes the non-stop forwarding (Multicast Non-Stop Forwarding) capability of services when the protocol is restarted. PIM GR is a multicast protocol GR. On a device with dual main control boards, PIM GR can implement normal forwarding of user multicast traffic when the device performs active/standby switchover.

Currently, only PIM-SM (ASM model) and PIM-SM (SSM model) support PIM GR, and PIM-DM does not support PIM GR.

Basic principle:
PIM GR depends on unicast GR. During active/standby switchover, the PIM protocol of the new main control board needs to relearn the PIM joining status from the downstream neighbors, and also need to learn the joined group members from the IGMP member hosts. The PIM protocol of the new main control board completes the following actions through the above process:
1. Recalculate the PIM multicast routing table entry.
2. Maintain the joining status of downstream neighbors.
3. Update the multicast routing entry of the forwarding plane.

Through PIM GR, the device can quickly restore the PIM routing table entries of the new master main control board and refresh the multicast forwarding table entries of the interface board after the master-standby switchover, thereby minimizing the user multicast traffic caused by the master-standby switchover The effect of forwarding.

PIM SSM model
The SSM model is implemented by using some technologies of PIM-SM and IGMPv3/MLDv2. It does not need to maintain RP, build RPT, or register multicast source, and can directly establish SPT between the source and group members.

The characteristic of SSM is that network users can know the specific location of the multicast source in advance. Therefore, when a user joins a multicast group, he can clearly specify which sources to receive information from. After the DR at the group member end learns the requirements of the user host, it directly sends a Join message to the DR at the source end. The Join message is transmitted upward hop by hop, and an SPT is established between the source and the group members.

In the SSM model, the key mechanisms of PIM-SM include neighbor discovery, DR election, and construction of SPT.

To configure the priority,
you need to execute multicast routing-enable in the public network or VPN instance.
Execute the command in the PIM view. c-bsr interface-type interface-number priorityConfigure c-bsr interface and specify the priority
. Execute the command in the PIM view. c-bsr priority 优先级值It is the configured global c-bsr priority. If Both are configured with limited interface

Guess you like

Origin blog.csdn.net/PanJWei/article/details/114998121