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
PIM Packet FormatsAll PIM Version 2 packets have a common 4-byte header that consists of the following fields:
PIM uses encoded unicast addresses, which consist of the following fields:
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:
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:
The RP sends register-stop messages to the sender of register messages. These messages consist of the PIM header plus the following fields:
Routers send join/prune messages toward upstream sources and RPs. These messages consist of the PIM header plus the following fields:
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:
Configuring PIMFor 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 ModeBy 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 RouterBy 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 VersionAll 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 IntervalRouters 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 PeriodThe 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 RPEach 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 PolicyYou 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.
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 TrafficTo 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>; }
You can specify the following PIM-specific options in the PIM traceoptions statement:
|