Example: Using a Scope Policy for Multicast Scoping

This example configures a multicast scope policy named allow-auto-rp-on-backbone, allowing packets for auto-RP groups 224.0.1.39/32 and 224.0.1.40/32 on backbone-facing interfaces, and rejecting all other addresses in the 224.0.1.0/24 and 239.0.0.0/8 address ranges.

Requirements

Before you begin:

Overview

Each referenced policy must be correctly configured at the [edit policy-options] hierarchy level, specifying the set of routing device interfaces on which to configure scoping, and defining the scope's address range as a series of route filters. Only the interface, route-filter, and prefix-list match conditions are supported for multicast scope policies. All other configured match conditions are ignored. The only actions supported are accept, reject, and the policy flow actions next-term and next-policy. The reject action means that joins and multicast forwarding are suppressed in both directions on the configured interfaces. The accept action allows joins and multicast forwarding in both directions on the interface. By default, scope policies apply to all interfaces. The default action is accept.

Note: Multicast scoping configured with a scope policy differs in some ways from scoping configured with a named scope (which uses the scope statement):

  • You cannot apply a scope policy to a specific routing instance, because all scope policies apply to all routing instances. In contrast, a named scope does apply individually to a specific routing instance.
  • In contrast to scoping with a named scope, scoping with a scope policy does not automatically add the local scope at scope boundaries. You must explicitly configure the local scope boundaries. The local scope limits the use of the multicast group 239.255.0.0/16 to an attached LAN.

Configuration

CLI Quick Configuration

To quickly a scope policy, copy the following commands and paste the commands into the CLI.

[edit]set policy-options policy-statement allow-auto-rp-on-backbone term allow-auto-rp from interface so-0/0/0.0 set policy-options policy-statement allow-auto-rp-on-backbone term allow-auto-rp from interface so-0/0/1.0set policy-options policy-statement allow-auto-rp-on-backbone term allow-auto-rp from route-filter 224.0.1.39/32 exact set policy-options policy-statement allow-auto-rp-on-backbone term allow-auto-rp from route-filter 224.0.1.40/32 exact set policy-options policy-statement allow-auto-rp-on-backbone term allow-auto-rp then accept set policy-options policy-statement allow-auto-rp-on-backbone term reject-these from route-filter 224.0.1.0/24 orlonger set policy-options policy-statement allow-auto-rp-on-backbone term reject-these from route-filter 239.0.0.0/8 orlonger set policy-options policy-statement allow-auto-rp-on-backbone term reject-these then rejectset routing-options multicast scope-policy allow-auto-rp-on-backbone

Step-by-Step Procedure

  1. Define which packets are allowed.

    [edit]user@host# edit policy-options policy-statement allow-auto-rp-on-backbone[edit policy-options policy-statement allow-auto-rp-on-backbone]user@host# set term allow-auto-rp from interface so-0/0/0.0[edit policy-options policy-statement allow-auto-rp-on-backbone]user@host# set term allow-auto-rp from interface so-0/0/1.0[edit policy-options policy-statement allow-auto-rp-on-backbone]user@host# set term allow-auto-rp from route-filter 224.0.1.39/32 exact[edit policy-options policy-statement allow-auto-rp-on-backbone]user@host# set term allow-auto-rp from route-filter 224.0.1.40/32 exact [edit policy-options policy-statement allow-auto-rp-on-backbone]user@host# set term allow-auto-rp then accept
  2. Define which packets are not allowed.

    [edit policy-options policy-statement allow-auto-rp-on-backbone]user@host# set term reject-these from route-filter 224.0.1.0/24 orlonger[edit policy-options policy-statement allow-auto-rp-on-backbone]user@host# set term reject-these from route-filter 239.0.0.0/8 orlonger[edit policy-options policy-statement allow-auto-rp-on-backbone]user@host# set term reject-these then reject[edit policy-options policy-statement allow-auto-rp-on-backbone]user@host# exit
  3. Apply the policy.

    [edit]user@host# edit routing-options multicast[edit routing-options multicast]user@host# set scope-policy allow-auto-rp-on-backbone
  4. If you are done configuring the device, commit the configuration.

    [edit routing-options multicast]user@host# commit

Results

Confirm your configuration by entering the show policy-options and show routing-options commands.

user@host# show policy-optionspolicy-statement allow-auto-rp-on-backbone {term allow-auto-rp {from {/* backbone-facing interfaces */interface [ so-0/0/0.0 so-0/0/1.0 ];route-filter 224.0.1.39/32 exact;route-filter 224.0.1.40/32 exact;}then {accept;}}term reject-these {from {route-filter 224.0.1.0/24 orlonger;route-filter 239.0.0.0/8 orlonger;}then reject;}}
user@host# show routing-optionsmulticast {scope-policy allow-auto-rp-on-backbone;}

Verification

To verify that the scope policy is in effect, issue the show multicast scope configuration mode command:


user@host> show multicast scope
Scope policy: [ allow-auto-rp-on-backbone ]

When you configure multicast scoping with a scope policy, the show multicast scope operational mode command displays only the name of the scope policy.

Related Topics