Example: Configuring Multicast with Subscriber VLANs

This example shows how to configure an MX Series router to function as a broadband service router (BSR).

Requirements

This example uses the following hardware components:

Before you begin:

Overview and Topology

When multiple BSR interfaces receive IGMP and MLD join and leave requests for the same multicast stream, the BSR sends a copy of the multicast stream on each interface. Both the multicast control packets (IGMP and MLD) and the multicast data packets flow on the same BSR interface, along with the unicast data. Because all per-customer traffic has its own interface on the BSR, per-customer accounting, call access control (CAC), and QoS adjustment are supported. The QoS bandwidth used by multicast reduces the unicast bandwidth.

Multiple interfaces on the BSR might connect to a shared device (for example, a DSLAM). The BSR sends the same multicast stream multiple times to the shared device, thus wasting bandwidth. It is more efficient to send the multicast stream once to the DSLAM and replicate the multicast streams in the DSLAM. There are two approaches that do this.

The first approach is to continue to send unicast data on the per-customer interfaces, but have the DSLAM route all the per-customer IGMP and MLD join and leave requests to the BSR on a single dedicated interface (a multicast VLAN). The DSLAM receives the multicast streams from the BSR on the dedicated interface with no unnecessary replication and performs the necessary replication to the customers. Because all multicast control and data packets use only one interface, only one copy of a stream is sent even if there are multiple requests. This approach is called reverse outgoing interface (OIF) mapping. Reverse OIF mapping enables the BSR to propagate the multicast state of the shared interface to the customer interfaces, which enables per-customer accounting and QoS adjustment to work. When a customer changes the TV channel, the router gateway (RG) sends an IGMP or MLD join and leave messages to the DSLAM. The DSLAM transparently passes the request to the BSR through the multicast VLAN. The BSR maps the IGMP or MLD request to one of the subscriber VLANs based on the IP source address or the source MAC address. When the subscriber VLAN is found, QoS adjustment and accounting is done on that VLAN or interface.

The second approach is for the DSLAM to continue to send unicast data and all the per-customer IGMP and MLD join and leave requests to the BSR on the individual customer interfaces, but to have the multicast streams arrive on a single dedicated interface. If multiple customers request the same multicast stream, the BSR sends one copy of the data on the dedicated interface. The DSLAM receives the multicast streams from the BSR on the dedicated interface and performs the necessary replication to the customers. Because the multicast control packets use many customer interfaces, configuration on the BSR must specify how to map each customer’s multicast data packets to the single dedicated output interface. QoS adjustment is supported on the customer interfaces. CAC is supported on the shared interface. This second approach is called multicast OIF mapping.

OIF mapping and reverse OIF mapping are not supported on the same customer or shared interface. This example shows how to configure the two different approaches. Both approaches support QoS adjustment and both approaches support MLD/IPv6. The reverse OIF mapping example focuses on IGMP/IPv4 and shows QoS adjustment enabled. The OIF mapping example focuses on MLD/IPv6 and disables QoS adjustment.

The first approach (reverse OIF mapping) includes the following statements:

The second approach (OIF mapping) includes the following statements:

Figure 43 shows the scenario.

In both approaches, if multiple customers request the same multicast stream, the BSR sends one copy of the stream on the shared multicast VLAN interface. The DSLAM receives the multicast stream from the BSR on the shared interface and performs the necessary replication to the customers.

In the first approach (reverse OIF mapping), the DSLAM uses the per-customer subscriber VLANs for unicast data only. IGMP and MLD join and leave requests are sent on the multicast VLAN.

In the second approach (OIF mapping), the DSLAM uses the per-customer subscriber VLANs for unicast data and for IGMP and MLD join and leave requests. The multicast VLAN is used only for multicast streams, not for join and leave requests.

Figure 43: Multicast with Subscriber VLANs

Image g040610.gif

Configuration

Configuring a Reverse OIF Map

CLI Quick Configuration

To quickly configure reverse OIF mapping copy the following commands and paste them into the CLI.

[edit]set class-of-service traffic-control-profiles tcp-ifl shaping-rate 20m set class-of-service interfaces ge-2/2/0 shaping-rate 240m set class-of-service interfaces ge-2/2/0 unit 50 output-traffic-control-profile tcp-ifl set class-of-service interfaces ge-2/2/0 unit 51 output-traffic-control-profile tcp-ifl set interfaces ge-2/0/0 unit 0 family inet address 30.0.0.2/24 set interfaces ge-2/2/0 hierarchical-scheduler set interfaces ge-2/2/0 vlan-tagging set interfaces ge-2/2/0 unit 10 vlan-id 10 set interfaces ge-2/2/0 unit 10 family inet address 40.0.0.2/24 set interfaces ge-2/2/0 unit 50 vlan-id 50 set interfaces ge-2/2/0 unit 50 family inet address 50.0.0.2/24 set interfaces ge-2/2/0 unit 51 vlan-id 51 set interfaces ge-2/2/0 unit 51 family inet address 50.0.1.2/24 set policy-options policy-statement all-mcast-groups from source-address-filter 30.0.0.0/8 orlonger set policy-options policy-statement all-mcast-groups then accept set protocols igmp interface all set protocols igmp interface fxp0.0 disable set protocols pim rp local address 20.0.0.2 set protocols pim interface all set protocols pim interface fxp0.0 disable set protocols pim interface ge-2/2/0.10 disable set routing-options multicast flow-map map1 policy all-mcast-groups set routing-options multicast flow-map map1 bandwidth 10m set routing-options multicast flow-map map1 bandwidth adaptive set routing-options multicast interface ge-2/2/0.10 maximum-bandwidth 500m set routing-options multicast interface ge-2/2/0.10 reverse-oif-mapping set routing-options multicast interface ge-2/2/0.10 subscriber-leave-timer 20

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Modification of the Junos OS Configuration in Junos OS CLI, Release 10.3.

To configure reverse OIF mapping:

  1. Configure a logical interface for unicast data traffic.
    [edit]user@host# edit interfaces ge-2/0/0 [edit interfaces ge-2/0/0]user@host# set unit 0 family inet address 30.0.0.2/24[edit interfaces ge-2/0/0]user@host# exit
  2. Configure a logical interface for subscriber control traffic.
    [edit]user@host# edit interfaces ge-2/2/0 [edit interfaces ge-2/2/0]user@host# set hierarchical-scheduler[edit interfaces ge-2/2/0]user@host# set vlan-tagging[edit interfaces ge-2/2/0]user@host# set unit 10 vlan-id 10[edit interfaces ge-2/2/0]user@host# set unit 10 family inet address 40.0.0.2/24
  3. Configure two logical interfaces on which QoS adjustments are made.
    [edit interfaces ge-2/2/0]user@host# set unit 50 vlan-id 50[edit interfaces ge-2/2/0]user@host# set unit 50 family inet address 50.0.0.2/24[edit interfaces ge-2/2/0]user@host# set unit 51 vlan-id 51[edit interfaces ge-2/2/0]user@host# set unit 51 family inet address 50.0.1.2/24[edit interfaces ge-2/2/0]user@host# exit
  4. Configure a policy.
    [edit]user@host# edit policy-options policy-statement all-mcast-groups[edit policy-options policy-statement all-mcast-groups]user@host# set from source-address-filter 30.0.0.0/8 orlonger[edit policy-options policy-statement all-mcast-groups]user@host# set then accept[edit policy-options policy-statement all-mcast-groups]user@host# exit
  5. Enable a flow map that references the policy.
    [edit]user@host# edit routing-options multicast[edit routing-options multicast]user@host# set flow-map map1 policy all-mcast-groups[edit routing-options multicast]user@host# set flow-map map1 bandwidth 10m adaptive
  6. Enable OIF mapping on the logical interface that receives subscriber control traffic.
    [edit routing-options multicast]user@host# set interface ge-2/2/0.10 maximum-bandwidth 500m[edit routing-options multicast]user@host# set interface ge-2/2/0.10 reverse-oif-mapping[edit routing-options multicast]user@host# set interface ge-2/2/0.10 subscriber-leave-timer 20[edit routing-options multicast]user@host# exit
  7. Configure PIM and IGMP.
    [edit]user@host# edit protocols[edit protocols]user@host# set igmp interface all[edit protocols]user@host# set igmp interface fxp0.0 disable[edit protocols]user@host# set pim rp local address 20.0.0.2[edit protocols]user@host# set pim interface all[edit protocols]user@host# set pim interface fxp0.0 disable[edit protocols]user@host# set pim interface ge-2/2/0.10 disable[edit protocols]user@host# exit
  8. Configure the hierarchical scheduler by configuring a shaping rate for the physical interface and a slower shaping rate for the logical interfaces on which QoS adjustments are made.
    [edit]user@host# edit class-of-service interfaces ge-2/2/0[edit class-of-service interfaces ge-2/2/0]user@host# set shaping-rate 240m[edit class-of-service interfaces ge-2/2/0]user@host# set unit 50 output-traffic-control-profile tcp-ifl[edit class-of-service interfaces ge-2/2/0]user@host# set unit 51 output-traffic-control-profile tcp-ifl[edit class-of-service interfaces ge-2/2/0]user@host# exit[edit]user@host# edit class-of-service traffic-control-profiles tcp-ifl[edit class-of-service traffic-control-profiles tcp-30m-no-smap]user@host# set shaping-rate 20m[edit class-of-service traffic-control-profiles tcp-ifl]user@host# exit

Results

From configuration mode, confirm your configuration by entering the show class-of-service, show interfaces, show policy-options, show protocols, and show routing-options commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

user@host# show class-of-servicetraffic-control-profiles {tcp-ifl {shaping-rate 20m;}}interfaces {ge-2/2/0 {shaping-rate 240m;unit 50 {output-traffic-control-profile tcp-ifl;}unit 51 {output-traffic-control-profile tcp-ifl;}}}
user@host# show interfacesge-2/0/0 {unit 0 {family inet {address 30.0.0.2/24;}}}ge-2/2/0 {hierarchical-scheduler;vlan-tagging;unit 10 {vlan-id 10;family inet {address 40.0.0.2/24;}}unit 50 {vlan-id 50;family inet {address 50.0.0.2/24;}}unit 51 {vlan-id 51;family inet {address 50.0.1.2/24;}}}
user@host# show policy-optionspolicy-statement all-mcast-groups {from {source-address-filter 30.0.0.0/8 orlonger;}then accept;}
user@host# show protocolsigmp {interface all;interface fxp0.0 {disable;}}pim {rp {local {address 20.0.0.2;}}interface all;interface fxp0.0 {disable;}interface ge-2/2/0.10 {disable;}}
user@host# show routing-optionsmulticast {flow-map map1 {policy all-mcast-groups;bandwidth 10m adaptive;}interface ge-2/2/0.10 {maximum-bandwidth 500m;reverse-oif-mapping;subscriber-leave-timer 20;}}

If you are done configuring the device, enter commit from configuration mode.

Configuring an OIF Map

CLI Quick Configuration

To quickly configure OIF mapping copy the following commands and paste them into the CLI.

[edit]set interfaces ge-2/3/8 unit 0 family inet6 address C300:0101::/24 set interfaces ge-2/3/9 vlan-tagging set interfaces ge-2/3/9 unit 1 vlan-id 1 set interfaces ge-2/3/9 unit 1 family inet6 address C400:0101::/24 set interfaces ge-2/3/9 unit 2 vlan-id 2 set interfaces ge-2/3/9 unit 2 family inet6 address C400:0201::/24 set interfaces ge-2/3/9 unit 4000 vlan-id 4000 set interfaces ge-2/3/9 unit 4000 family inet6 address C40F:A001::/24 set interfaces ge-2/3/9 unit 4001 vlan-id 4001 set interfaces ge-2/3/9 unit 4001 family inet6 address C40F:A101::/24 set policy-options policy-statement g539-v6 term g539-4000 from route-filter FF05:0101:0000::/39 orlonger set policy-options policy-statement g539-v6 term g539-4000 then map-to-interface ge-2/3/9.4000 set policy-options policy-statement g539-v6 term g539-4000 then accept set policy-options policy-statement g539-v6 term g539-4001 from route-filter FF05:0101:0200::/39 orlonger set policy-options policy-statement g539-v6 term g539-4001 then map-to-interface ge-2/3/9.4001 set policy-options policy-statement g539-v6 term g539-4001 then accept set policy-options policy-statement g539-v6 term self from route-filter FF05:0101:0700::/40 orlonger set policy-options policy-statement g539-v6 term self then map-to-interface self set policy-options policy-statement g539-v6 term self then accept set policy-options policy-statement g539-v6-all term g539 from route-filter 0::/0 orlonger set policy-options policy-statement g539-v6-all term g539 then map-to-interface ge-2/3/9.4000 set policy-options policy-statement g539-v6-all term g539 then accept set protocols mld interface fxp0.0 disable set protocols mld interface ge-2/3/9.4000 passive set protocols mld interface ge-2/3/9.4001 passive set protocols mld interface ge-2/3/9.1 version 1 set protocols mld interface ge-2/3/9.1 oif-map g539-v6 set protocols mld interface ge-2/3/9.2 version 2 set protocols mld interface ge-2/3/9.2 oif-map g539-v6 set protocols pim rp local address 20.0.0.4 set protocols pim rp local family inet6 address C000::1 set protocols pim interface ge-2/3/8.0 mode sparse set protocols pim interface ge-2/3/8.0 version 2 set routing-options multicast interface ge-2/3/9.1 no-qos-adjust set routing-options multicast interface ge-2/3/9.2 no-qos-adjust

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Modification of the Junos OS Configuration in Junos OS CLI, Release 10.3.

To configure reverse OIF mapping:

  1. Configure a logical interface for unicast data traffic.
    [edit]user@host# edit interfaces ge-2/3/8 [edit interfaces ge-2/3/8 ]user@host# set unit 0 family inet6 address C300:0101::/24 [edit interfaces ge-2/3/8 ]user@host# exit
  2. Configure logical interfaces for subscriber VLANs.
    [edit]user@host# edit interfaces ge-2/3/9[edit interfaces ge-2/3/9]user@host# set vlan-tagging[edit interfaces ge-2/3/9]user@host# set unit 1 vlan-id 1[edit interfaces ge-2/3/9]user@host# set unit 1 family inet6 address C400:0101::/24[edit interfaces ge-2/3/9]user@host# set unit 2 vlan-id 2[edit interfaces ge-2/3/9]user@host# set unit 2 family inet6 address C400:0201::/24 lo0 unit 0 family inet6 ddress C000::1/128[edit interfaces ge-2/3/9]user@host# set unit 2 family inet6 address C400:0201::/24
  3. Configure two map-to logical interfaces.
    [edit interfaces ge-2/2/0]user@host# set unit 4000 vlan-id 4000[edit interfaces ge-2/2/0]user@host# set unit 4000 family inet6 address C40F:A001::/24[edit interfaces ge-2/2/0]user@host# set unit 4001 vlan-id 4001[edit interfaces ge-2/2/0]user@host# set unit 4001 family inet6 address C40F:A101::/24[edit interfaces ge-2/2/0]user@host# exit
  4. Configure the OIF map.
    [edit]user@host# edit policy-options policy-statement g539-v6[edit policy-options policy-statement g539-v6]user@host# set term g539-4000 from route-filter FF05:0101:0000::/39 orlonger[edit policy-options policy-statement g539-v6]user@host# set then map-to-interface ge-2/3/9.4000[edit policy-options policy-statement g539-v6]user@host# set then accept[edit policy-options policy-statement g539-v6]user@host# set term g539-4001 from route-filter FF05:0101:0200::/39 orlonger[edit policy-options policy-statement g539-v6]user@host# set then map-to-interface ge-2/3/9.4001[edit policy-options policy-statement g539-v6]user@host# set then accept[edit policy-options policy-statement g539-v6]user@host# set term self from route-filter FF05:0101:0700::/40 orlonger[edit policy-options policy-statement g539-v6]user@host# set then map-to-interface self[edit policy-options policy-statement g539-v6]user@host# set then accept[edit policy-options policy-statement g539-v6]user@host# exit[edit policy-options policy-statement g539-v6]user@host# edit policy-statement g539-v6-all[edit policy-options policy-statement g539-v6-all]user@host# set term g539 from route-filter 0::/0 orlonger[edit policy-options policy-statement g539-v6-all]user@host# set then map-to-interface ge-2/3/9.4000[edit policy-options policy-statement g539-v6-all]user@host# set then accept[edit policy-options policy-statement g539-v6-all]user@host# exit
  5. Disable QoS adjustment on the subscriber VLANs.
    [edit]user@host# edit routing-options multicast[edit routing-options multicast]user@host# set interface ge-2/3/9.1 no-qos-adjust[edit routing-options multicast]user@host# set interface ge-2/3/9.2 no-qos-adjust
  6. Configure PIM and MLD. Point the MLD subscriber VLANs to the OIF map.
    [edit]user@host# edit protocols[edit protocols]user@host# set pim rp local address 20.0.0.4[edit protocols]user@host# set pim rp local family inet6 address C000::1 #C000::1 is the address of lo0[edit protocols]user@host# set pim interface ge-2/3/8.0 mode sparse[edit protocols]user@host# set pim interface ge-2/3/8.0 version 2[edit protocols]user@host# set mld interface fxp0.0 disable[edit protocols]user@host# set interface ge-2/3/9.4000 passive[edit protocols]user@host# set interface ge-2/3/9.4001 passive[edit protocols]user@host# set interface ge-2/3/9.1 version 1[edit protocols]user@host# set interface ge-2/3/9.1 oif-map g539-v6[edit protocols]user@host# set interface ge-2/3/9.2 version 2[edit protocols]user@host# set interface ge-2/3/9.2 oif-map g539-v6[edit protocols]user@host# exit

Results

From configuration mode, confirm your configuration by entering the show interfaces, show policy-options, show protocols, and show routing-options commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

user@host# show interfacesge-2/3/8 {unit 0 {family inet6 {address C300:0101::/24;}}}ge-2/3/9 {vlan-tagging;unit 1 {vlan-id 1;family inet6 {address C400:0101::/24;}}unit 2 {vlan-id 2;family inet6 {address C400:0201::/24;}}unit 4000 {vlan-id 4000;family inet6 {address C40F:A001::/24;}}unit 4001 {vlan-id 4001;family inet6 {address C40F:A101::/24;}}}
user@host# show policy-optionspolicy-statement g539-v6 {term g539-4000 {from {route-filter FF05:0101:0000::/39 orlonger;}then {map-to-interface ge-2/3/9.4000;accept;}}term g539-4001 {from {route-filter FF05:0101:0200::/39 orlonger;}then {map-to-interface ge-2/3/9.4001;accept;}}term self {from {route-filter FF05:0101:0700::/40 orlonger;}then {map-to-interface self;accept;}}}policy-statement g539-v6-all {term g539 {from {route-filter 0::/0 orlonger;}then {map-to-interface ge-2/3/9.4000;accept;}}}
user@host# show protocolsmld {interface fxp0.0 {disable;}interface ge-2/3/9.4000 {passive;}interface ge-2/3/9.4001 {passive;}interface ge-2/3/9.1 {version 1;oif-map g539-v6;}interface ge-2/3/9.2 {version 2;oif-map g539-v6;}}pim {rp {local {address 20.0.0.4;family inet6 {address C000::1;}}}interface ge-2/3/8.0 {mode sparse;version 2;}}
user@host# show routing-optionsmulticast {interface ge-2/3/9.1 no-qos-adjust;interface ge-2/3/9.2 no-qos-adjust;}

If you are done configuring the device, enter commit from configuration mode.

Verification

To verify the configuration, run the following commands:

Related Topics