PIM


Protocol-Independent Multicast (PIM) is used to efficiently route to multicast groups that might span wide-area and interdomain internetworks. It is referred to as "protocol independent" because it is not dependent on any particular unicast routing protocol. The software supports both sparse mode and dense mode. In sparse mode, routers must join and leave multicast groups explicitly. Upstream routers do not forward multicast traffic to this router unless this router has sent an explicit request (using a join message) to receive multicast traffic. When a host joins a multicast group, its first-hop router sends a join message upstream toward the rendezvous point (RP) for the group. The RP serves as the root of the shared multicast delivery tree and is responsible for forwarding multicast data from different sources toward the receivers. Multicast traffic is forwarded out a PIM interface only if the interface has received a join message from a downstream router or if group members are directly connected to the interface. Sparse-mode routers periodically send join messages toward the RP to join a shared tree and directly toward the source if they prefer to join the source tree. The routers also send periodic prune messages toward the RP when they move from the shared tree onto the source-based tree.

Table 9.7 lists the PIM standards and drafts supported by the JUNOS software.

Table 9.7. PIM Standards Supported by JUNOS Software
Standard Title
RFC 2362 Protocol Independent Multicast-Sparse Mode (PIM-SM): Protocol Specification
IETF draft draft-ietf-pim-v2-dm-03.txt Protocol Independent Multicast Version 2 Dense Mode Specification
IETF draft-ietf-mboned-anycast-rp-08.txt Anycast RP Mechanism Using PIM and MSDP

PIM Packet Formats

All PIM Version 2 packets have a common 4-byte header that consists of the following fields:

  • Version number ”The PIM version number, which is 2

  • Type ”Type of PIM message

  • Reserved ”Set to 0 on transmission and ignored on receipt

  • Checksum ”Standard IP checksum

PIM uses encoded unicast addresses, which consist of the following fields:

  • Address family ”PIM address family

  • Encoding type ”Type of encoding used for the address family

  • Unicast address ”Unicast address represented by the address family and encoding type

Routers periodically send hello messages on all interfaces, including virtual links, to establish and maintain neighbor relationships. These messages consist of the PIM header plus the following fields:

  • Option type ”Type of option

  • Option length ”Length of the option field

  • Option value ”Value of the option. It can be one of the following:

    • Hold time ”Amount of time a receiver must keep the neighbor reachable

    • LAN prune delay ”Time before pruning the propagation delay on multiaccess networks

    • DR priority ”Designated router election priority

    • Generation ID ”Interface on which hello messages are sent

Designated routers periodically send register messages to the RP or PIM multicast border router when the RP or border router needs to transmit a multicast packet. These messages consist of the PIM header plus the following fields:

  • Border bit

  • Null register bit

  • Multicast data packet

The RP sends register-stop messages to the sender of register messages. These messages consist of the PIM header plus the following fields:

  • Group address ”Group address from the multicast data packet in the register

  • Source address ”Source address from the multicast data packet in the register

Routers send join/prune messages toward upstream sources and RPs. These messages consist of the PIM header plus the following fields:

  • Unicast upstream neighbor address ”Address of the RPF or upstream neighbor

  • Hold time ”Amount of time a receiver must keep the join/prune state alive

  • Number of groups ”Number of multicast group sets contained in the message

  • Multicast group address

  • Number of joined sources

  • Join source address

  • Number of pruned sources

  • Prune source addresses

PIM uses assert messages to resolve forwarded conflicts between routers on a link. They are sent when a multicast data packet is received on an interface that the router would normally use to forward the packet. These messages consist of the PIM header plus the following fields:

  • Group address ”Group address for which the router wants to resolve the forwarding conflict

  • Source address ”Source address for which the router wants to resolve the forwarding conflict

  • Metric preference ”Preference value assigned by the unicast routing protocol that provided the route to the RP

  • Metric ”Route's metric from the unicast routing table

Configuring PIM

For PIM to operate on the router, you must configure it. By default, PIM operates in dense mode.

 [edit protocols] pim {   disable;   dense-groups {  addresses  ;   }   import [  policy-name  ];   rib-group  group-name  ;   traceoptions {     file  name  <replace> <size  size  > <files number > <no-stamp>       <(world-readable  no-world-readable)>;     flag  flag  <  flag-modifier  > <disable>;   }   interface  interface-name  {     disable;     hello-interval  seconds  ;     mode (dense  sparse  sparse-dense);     priority  number  ;     version  version  ;   }   rp {     auto-rp (announce  discovery  mapping);     bootstrap-import pim-import;     bootstrap-export pim-export;     bootstrap-priority  number  ;     local {       disable;       address  address  ;       group-ranges {  destination-mask  ;       }       hold-time  seconds  ;       priority  number  ;     }     static {       address  address  {         version  version  ;         group-ranges {  destination-mask  ;         }       }     }   } } 

To enable PIM routing and associate it with PIM, a routing table group that imports and exports routes into the specified routing table group, include the following statements:

 [edit protocols] pim {   rib-group  group-name  ;   interface  interface-name  ; } 

You cannot configure both PIM and DVMRP on the same interface. However, you can configure PIM on the same interface if you configure DVMRP in unicast-routing mode.

Configuring Dense, Sparse, or Sparse-Dense Mode

By default, PIM interfaces operate in dense mode on all interfaces. To configure PIM to operate in sparse mode on an interface, include the mode sparse statement:

 [edit protocols pim interface  interface-name  ] mode sparse; 

To explicitly configure PIM to operate in dense mode on an interface, include the mode dense statement:

 [edit protocols pim interface  interface-name  ] mode dense; 

Sparse-dense mode is a mode in which some groups are forwarded using dense mode and some are forwarded using sparse mode. To configure PIM to operate in sparse-dense mode on an interface, include the mode sparse-dense statement to enable the mode and the dense-groups statement to specify which groups are operating in dense mode:

 [edit protocols pim] dense-groups {  addresses  ; } interface  interface-name  {   mode sparse-dense; } 
Configuring the Priority to Be Elected the Designated Router

By default, a PIM interface has the lowest likelihood of being elected to be the designated router. The default priority is 1. Configure a larger number to increase the interface's likelihood of being elected to be the designated router. To modify the likelihood , include the priority statement:

 [edit protocols pim interface  interface-name  ] priority  number  ; 
Changing the PIM Version

All systems on a subnet must run the same version of PIM. By default, the JUNOS software uses PIM Version 2. To configure PIM Version 1, include the version statement:

 [edit protocols pim interface  interface-name  ] version 1; 
Modifying the Hello Interval

Routers send hello packets at a fixed interval on all interfaces to establish and maintain neighbor relationships. This interval is advertised in the hello interval field in the hello packet. By default, a designated intersystem (DIS) router sends hello packets every 3 seconds, and a non-DIS router sends hello packets every 9 seconds. To modify how often the router sends hello packets out of an interface, include the hello-interval statement:

 [edit protocols pim interface  interface-name  ] hello-interval  seconds  ; 
Modifying the PIM Hold-Time Period

The PIM hold-time period is when the rendezvous point is considered to be down. The default hold-time period is 35 seconds. To modify the hold-time value for a rendezvous point, include the hold-time statement. The hold-time range is 1 to 255 seconds.

 [edit protocols pim rp local] hold-time  seconds  ; 
Configuring the Router's Properties for Becoming a Candidate RP

Each multicast group has a shared tree through which receivers learn about new multicast sources and new receivers learn about all multicast sources. The rendezvous point (RP) is the root of this shared tree. To configure this router's properties for becoming a candidate RP, include the rp statement:

 [edit protocols pim] rp {   auto-rp (announce  discovery  mapping);   bootstrap-import pim-import;   bootstrap-export pim-export;   bootstrap-priority number;   local {     disable;     address  address  ;     group-ranges {  destination-mask  ;     }     hold-time  seconds  ;     priority  number  ;   }   static {     address  address  {       version  version  ;       group-ranges {  destination-mask  ;       }     }   } } 

To determine which router is the RP, all routers within a PIM domain collect bootstrap messages. (A PIM domain is a contiguous set of routers that all implement PIM and are configured to operate within a common boundary.) The domain's bootstrap router originates bootstrap messages, and these messages are sent hop by hop within the domain. The routers use bootstrap messages to distribute RP information dynamically and to elect a bootstrap router when necessary. By default, the router has a bootstrap priority of 0, which means the router can never be the bootstrap router. To modify this priority, include the bootstrap-priority statement. The router with the highest priority value is elected to be the bootstrap router. In the case of a tie, the router with the highest IP address is elected to be the bootstrap router.

The global multicast address space can be divided into multiple administrative domains. PIM sparse mode supports this concept and is commonly deployed within administrative domains. Naturally, some control information must remain within an administrative domain, yet PIM control information (bootstrap messages) is multicast. To filter PIM bootstrap router messages at administrative boundaries, include the following statements:

 [edit protocols pim rp] bootstrap-import pim-import; bootstrap-export pim-export; 

To configure the router's RP properties, include the local statement.

To specify the local RP address, include the address statement.

The router's priority value for becoming the RP is included in the bootstrap messages that the router sends. The bootstrap router uses the priority value to try to limit the number of candidate RPs it includes in the bootstrap message for a particular group range. After the set of candidate RPs is distributed, each router determines algorithmically the RP from the candidate RP set using a well-known hash function. By default, the priority value is set to 0, which means that the bootstrap router can override the group range being advertised by the candidate RP. To modify the router's priority, include the priority statement. The priority can be a number in the range 0 through 255.

By default, a router running PIM is eligible to be the RP for all groups ( 224.0.0.0/4 ). To limit the groups for which this router can be the RP, include the group-ranges statement.

For candidate RPs, the hold time is used by the bootstrap router to time out RPs. If the bootstrap router does not receive a candidate RP advertisement from an RP within the hold time, it removes that router from its list of candidate RPs. The default hold time is 150 seconds. To modify the hold-time value for the local RP, include the hold-time statement.

To configure static RPs, include the static statement. The default static RP address is 224.0.0.0/4 . To configure other addresses, include one or more address statements. For each static RP address, you can optionally specify the PIM version and the groups for which this address can be the RP. The default PIM version is Version 1. The RP that you select for a particular group must be consistent across all routers in a multicast domain.

When PIM is operating in sparse or sparse-dense mode, you can configure how the router handles automatic RP announcement and discovery. You can configure the router to advertise that it is eligible to be the RP, to learn which systems are RPs, and to run the RP election algorithm. However, you must first configure the two multicast groups, 224.0.1.39 and 224.0.1.40 , as dense groups (the router must be running in sparse-dense mode), or configure a static RP for those two groups. To configure automatic RP features, include the auto-rp statement. The announce option configures the router to listen only for mapping packets and also to advertise itself if it is an RP. The discovery option configures the router to listen only for mapping packets. The mapping option configures the router to announce, listens for and generates mapping packets, and announces that the router is eligible to be an RP. The RP that you select for a particular group must be consistent across all routers in a multicast domain. The router joins the auto-RP groups on the configured interfaces and on the loopback interface, lo0.0 . For auto-RP to work correctly, you must configure an IP address on the loopback interface. You can use the loopback address 127.0.0.1 .

Configuring a PIM Routing Policy

You can restrict multicast traffic from certain source addresses by creating a routing policy and then applying it to PIM. The routing policy prevents a join from making it back to a source, so that multicast traffic never flows across the internetwork.

For more information, see Chapter 8, "Routing Policy and Firewall Filters," on page 301.

To apply one or more policies to routes being imported into the routing table from PIM, include the import statement:

 [edit protocols pim] import [  policy-names  ]; 
Tracing PIM Protocol Traffic

To trace PIM protocol traffic, specify PIM-specific options by including the traceoptions statement:

 [edit protocols pim] traceoptions {   file  name  <replace> <size  size  > <files  number  > <no-stamp>     <(world-readable  no-world-readable)>;   flag  flag  <  flag-modifier  > <disable>; } 

For more information about tracing and global tracing options, see the JUNOS technical documentation.

You can specify the following PIM-specific options in the PIM traceoptions statement:

  • assert ” Assert messages

  • bootstrap ” Bootstrap messages

  • cache ” Packets in the PIM routing cache

  • graft ” Graft and graft acknowledgment messages

  • hello ” Hello packets

  • join ” Join messages

  • packets ” All PIM packets

  • prune ” Prune messages

  • register ” Register and register-stop messages

  • rp ” Candidate RP advertisements



Juniper Networks Field Guide and Reference
Juniper Networks Field Guide and Reference
ISBN: 0321122445
EAN: 2147483647
Year: 2002
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net