Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring a Dedicated PIM RPF Routing Table

This example explains how to configure a dedicated Protocol Independent Multicast (PIM) reverse path forwarding (RPF) routing table.

Requirements

Before you begin:

This example uses the following software components:

  • Junos OS Release 7.4 or later

Overview

By default, PIM uses the inet.0 routing table as its RPF routing table. PIM uses an RPF routing table to resolve its RPF neighbor for a particular multicast source address and to resolve the RPF neighbor for the rendezvous point (RP) address. PIM can optionally use inet.2 as its RPF routing table. The inet.2 routing table is dedicated to this purpose.

PIM uses a single routing table for its RPF check, this ensures that the route with the longest matching prefix is chosen as the RPF route.

If multicast routes are exchanged by Multiprotocol Border Gateway Protocol MP-BGP or multitopology IS-IS, they are placed in inet.2 by default.

Using inet.2 as the RPF routing table enables you to have a control plane for multicast, which is independent of the normal unicast routing table. You might want to use inet.2 as the RPF routing table for any of the following reasons:

  • If you use traffic engineering or have an interior gateway protocol (IGP) configured for shortcuts, the router has label-switched paths (LSPs) installed as the next hops in inet.2. By applying policy, you can have the router install the routes with non-MPLS next-hops in the inet.2 routing table.
  • If you have an MPLS network that does not support multicast traffic over LSP tunnels, you need to configure the router to use a routing table other than inet.0. You can have the inet.2 routing table populated with native IGP, BGP, and interface routes that can be used for RPF.

To populate the PIM RPF table, you use rib groups. A rib group is defined with the rib-groups statement at the [edit routing-options] hierarchy level. The rib group is applied to the PIM protocol by including the rib-group statement at the [edit pim] hierarchy level. A rib group is most frequently used to place routes in multiple routing tables.

When you configure rib groups for PIM, keep the following in mind:

  • The import-rib statement copies routes from the protocol to the routing table.
  • The export-rib statement has no effect on PIM.
  • Only the first rib routing table specified in the import-rib statement is used by PIM for RPF checks.

You can also configure IS-IS or OSPF to populate inet.2 with routes that have regular IP next hops. This allows RPF to work properly even when MPLS is configured for traffic engineering, or when IS-IS or OSPF are configured to use “shortcuts” for local traffic.

You can also configure the PIM protocol to use a rib group for RPF checks under a virtual private network (VPN) routing instance. In this case the rib group is still defined at the [edit routing-options] hierarchy level.

Configuration

Configuring a PIM RPF Routing Table Group Using Interface Routes

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

set routing-options rib-groups mcast-rpf-rib import-rib inet.2set protocols pim rib-group mcast-rpf-ribset routing-options interface-routes rib-group inet if-ribset routing-options rib-groups if-rib import-rib [ inet.0 inet.2 ]

Step-by-Step Procedure

In this example, the network administrator has decided to use the inet.2 routing table for RPF checks. In this process, local routes are copied into this table by using an interface rib group.

To define an interface routing table group and use it to populate inet.2 for RPF checks:

  1. Use the show multicast rpf command to verify that the multicast RPF table is not populated with routes.
    user@host> show multicast rpf
    instance is not running
  2. Create a multicast routing table group named mcast-rpf-rib.

    Each routing table group must contain one or more routing tables that Junos OS uses when importing routes (specified in the import-rib statement).

    Include the import-rib statement and specify the inet.2 routing table at the [edit routing-options rib-groups] hierarchy level.

    [edit routing-options rib-groups]user@host# set mcast-rpf-rib import-rib inet.2
  3. Configure PIM to use the mcast-rpf-rib rib group.

    The rib group for PIM can be applied globally or in a routing instance. In this example, the global configuration is shown.

    Include the rib-group statement and specify the mcast-rpf-rib rib group at the [edit protocols pim] hierarchy level.

    [edit protocols pim]user@host# set rib-group mcast-rpf-rib
  4. Create an interface rib group named if-rib.

    Include the rib-group statement and specify the inet address family at the [edit routing-options interface-routes] hierarchy level.

    [edit routing-options interface-routes]user@host# set rib-group inet if-rib
  5. Configure the if-rib rib group to import routes from the inet.0 and inet.2 routing tables.

    Include the import-rib statement and specify the inet.0 and inet.2 routing tables at the [edit routing-options rib-groups] hierarchy level.

    [edit routing-options rib-groups]user@host# set if-rib import-rib [ inet.0 inet.2 ]
  6. Commit the configuration.
    user@host# commit

Verifying The Multicast RPF Table

Purpose

Verify that the multicast RPF table is now populated with routes.

Action

Use the show multicast rpf command.

user@host> show multicast rpf
Multicast RPF table: inet.2 , 10 entries

10.0.24.12/30
    Protocol: Direct
    Interface: fe-0/1/2.0

10.0.24.13/32
    Protocol: Local

10.0.27.12/30
    Protocol: Direct
    Interface: fe-0/1/3.0

10.0.27.13/32
    Protocol: Local

10.0.224.8/30
    Protocol: Direct
    Interface: ge-1/3/3.0

10.0.224.9/32
    Protocol: Local

127.0.0.1/32
    Inactive

192.168.2.1/32
    Protocol: Direct
    Interface: lo0.0

192.168.187.0/25
    Protocol: Direct
    Interface: fxp0.0

192.168.187.12/32
    Protocol: Local

Meaning

The first line of the sample output shows that the inet.2 table is being used and that there are 10 routes in the table. The remainder of the sample output lists the routes that populate the inet.2 routing table.

Published: 2014-02-25

Published: 2014-02-25