June 26, 2009

PIM Notes

PIM Neigbour Discovery

PIM routers send PIM Hello messages every 30 seconds on each PIM enabled interface. The Hellos are sent to 224.0.0.13, the link local address reserved for All-PIM-Routers

PIM DR

Hellos are used to find neighbors, and to determine who should be the Designated Router (DR) on multi-access networks. If no DR priority configured, then the PIM router with the highest IP address wins. In PIM Sparse Mode, the DR is responsible for registering to the RP, and forwarding traffic.

PIM Asserts

If a router sees traffic for a stream coming in on an interface it uses to forward traffic for the stream, it will send an Assert message on that interface. The assert contains administrative distance and metric information for the route in the murib for the source of the stream. First administrative distance is compared. If equal, metric is compared. If the metric is also equal, than the peer with the highest IP address wins. The loser prunes itself off the path for the stream.

PIM SM

A PIM router creates (S,G) state under the following conditions
  • Traffic is seen on a directly connected interface. Examples: DR, routers in path down RPT from RP to LH
  • An RP receives a Register message.
  • A Join for the (S,G) is received.

A PIM router forwards (S,G) Joins towards the source when

  • The (S,G) has a valid outgoing interface list (olist) and the router has RPF information for the source.

PIM SSM

If IGMP knows the sources it wants to receive, it can inform it's router. PIM can then forward joins directly to the source. PIM-SSM takes this a step further by outlawing (*,G) state in the SSM range. Not only isn't an RP required, it's prohibited.

232.0.0.0/8 is the default range for SSM, but it can be configured to any other range as well. Currently though 232/8 is hardwired in our (XR, IOS?) IGMP implementation, so no (*,G) IGMP reports will be accepted in that range.

These rules are directly from the PIM spec.

  • A router MUST NOT send a (*,G) Join/Prune message for any reason.
  • A router MUST NOT send an (S,G,rpt) Join/Prune message for any reason.
  • A router MUST NOT send a Register message for any packet that is destined to an SSM address.
  • A router MUST NOT forward packets based on (*,G) or (S,G,rpt) state. The (*,G) and (S,G,rpt) -related state summarization macros are NULL for any SSM address, for the purposes of packet forwarding.
  • A router acting as an RP MUST NOT forward any Register-encapsulated packet that has an SSM destination address

PIM-BIDIR

PIM-BIDIR makes the RPT bidirectional. The RP is the hub of all traffic, though traffic does not have to go all the way to the RP to reach local leaf nodes. BIDIR forwards on (*,G) routes.

Simpler than PIM-SM. No data driven events (eg, S,G creation based on data, KAT).

New sources are forwarded on the path to the RP (called the (*,G/M) route.

New (*,G) joins propagate towards the RP, and inherit accepting information from the RP. The joins will create outgoing interface information – pointing back towards the LH (Last Hop).

MSDP

MSDP listens to PIM register messages, and if PIM installs an L flag for the route in the MRIB, MSDP sends the traffic in the registers encapsulated in Source Active (SA) messages to it's configured peers.

If the remote RP has local receivers for the (S,G), it installs the route into the PIM topology table and forwards the traffic down the RPT. The LH router performs SPT switchover.

If the remote RP has no local PIM interest in the SA, the SA stays in the MSDP cache but is not installed in PIM.

An SA contains the (S,G) info, the RP that originated the SA, and the encapsulated data sent in the register.

MSDP can be thought of as a poor man's BGP. It doesn't have ASs (so NO good loop avoidance), and it doesn't have policy other than filtering. It uses the below set of rules to determine which peers to accept SAs from, based on the RP which originated the SA. connect-source == peer address used originator-id == RP address SA sent from.

1) The MSDP peer P's connect-source is equal to the originator-id of the SA

2) The MSDP peer P's connect-source is equal to the BGP NEXT_HOP of the active route for the originator-id of the SA

3) a) The active route for the originator-id of the SA is known via BGP and the MSDP peer P's connect-source is equal to the BGP peering address of the peer who announced the route.

b) The active route for the originator-id of the SA is known via ISIS/OSPF and the MSDP peer P's connect-source is equal to the IGP next hop for the route.

4) The MSDP peer P's connect-source is in an AS in the ASPATH of the active route for the originator-id of the SA, and has the highest IP address of the MSDP peer's connect-sources which reside in ASs in that ASPATH.

5) The MSDP peer P is configured as the static RPF-peer.

Tags: multicast CCIE study PIM