Related Documentation
- EX, M, MX, PTX, T Series
- Example: Configuring a Multicast Flow Map
- M, MX, T Series
- Configuring Multicast Routing Over IP Demux Interfaces
- Additional Information
- Junos OS Subscriber Management, Release 12.2
- Junos OS Subscriber Management, Release 12.2
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:
- One MX Series router or EX Series switch with a PIC that supports traffic control profile queuing
- One DSLAM
Before you begin:
- Configure an interior gateway protocol. See the Junos OS Routing Protocols Configuration Guide.
- Configure PIM and IGMP or MLD on the interfaces.
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 admission control (CAC), and quality-of-service (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 one time to the DSLAM and replicate the multicast streams in the DSLAM. There are two approaches that you can use.
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 are perfomed 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 interface 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 enables QoS adjustment. The OIF mapping example focuses on MLD/IPv6 and disables QoS adjustment.
The first approach (reverse OIF mapping) includes the following statements:
- flow-map—Defines a flow map that controls the bandwidth for each flow.
- maximum-bandwidth—Enables CAC.
- reverse-oif-mapping—Enables the routing
device to identify a subscriber VLAN or interface based on an IGMP
or MLD join or leave request that it receives over the multicast VLAN.
After the subscriber VLAN is identified, the routing device immediately adjusts the QoS (in this case, the bandwidth) on that VLAN based on the addition or removal of a subscriber.
The routing device uses IGMP and MLD join or leave reports to obtain the subscriber VLAN information. This means that the connecting equipment (for example, the DSLAM) must forward all IGMP and MLD reports to the routing device for this feature to function properly. Using report suppression or an IGMP proxy can result in reverse OIF mapping not working properly.
- subscriber-leave-timer—Introduces a delay to the QoS update. After receiving an IGMP or MLD leave request, this statement defines a time delay (between 1 and 30 seconds) that the routing device waits before updating the QoS for the remaining subscriber interfaces. You might use this delay to decrease how often the routing device adjusts the overall QoS bandwidth on the VLAN when a subscriber sends rapid leave and join messages (for example, when changing channels in an IPTV network).
- traffic-control-profile—Configures a shaping rate on the logical interface. The configured shaping rate must be configured as an absolute value, not as a percentage.
The second approach (OIF mapping) includes the following statements:
- map-to-interface—In a policy statement,
enables you to build the OIF map.
The OIF map is a routing policy statement that can contain multiple terms. When creating OIF maps, keep the following in mind:
- If you specify a physical interface (for example, ge-0/0/0), a ".0" is appended to the interface to create a logical interface (for example, ge-0/0/0.0).
- Configure a routing policy for each logical system. You cannot configure routing policies dynamically.
- The interface must also have IGMP, MLD, or PIM configured.
- You cannot map to a mapped interface.
- We recommend that you configure policy statements for IGMP and MLD separately.
- Specify either a logical interface or the keyword self. The self keyword specifies that multicast data packets be sent on the same interface as the control packets and that no mapping occur. If no term matches, then no multicast data packets are sent.
- no-qos-adjust—Disables QoS adjustment.
QoS adjustment decreases the available bandwidth on the client interface by the amount of bandwidth consumed by the multicast streams that are mapped from the client interface to the shared interface. This action always occurs unless it is explicitly disabled.
If you disable QoS adjustment, available bandwidth is not reduced on the customer interface when multicast streams are added to the shared interface.
Note: You can dynamically disable QoS adjustment for IGMP and MLD interfaces using dynamic profiles.
- oif-map—Associate a map with an IGMP or
MLD interface. The OIF map is then applied to all IGMP or MLD requests
received on the configured interface. In this example, subscriber
VLANs 1 and 2 have MLD configured, and each VLAN points to an OIF
map that directs some traffic to ge-2/3/9.4000, some traffic
to ge-2/3/9.4001, and some traffic to self.
Note: You can dynamically associate OIF maps with IGMP interfaces using dynamic profiles.
- passive—Defines either IGMP or MLD to use
passive mode.
The OIF map interface should not typically pass IGMP or MLD control traffic and should be configured as passive. However, the OIF map implementation does support running IGMP or MLD on an interface (control and data) in addition to mapping data streams to the same interface. In this case, you should configure IGMP or MLD normally (that is, not in passive mode) on the mapped interface. In this example, the OIF map interfaces (ge-2/3/9.4000 and ge-2/3/9.4001) are configured as MLD passive.
By default, specifying the passive statement means that no general queries, group-specific queries, or group-source-specific queries are sent over the interface and that all received control traffic is ignored by the interface. However, you can selectively activate up to two out of the three available options for the passive statement while keeping the other functions passive (inactive).
These options include the following:
- send-general-query—When specified, the interface sends general queries.
- send-group-query—When specified, the interface sends group-specific and group-source-specific queries.
- allow-receive—When specified, the interface receives control traffic.
Figure 1 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 1: Multicast with Subscriber VLANs

Configuration
Configuring a Reverse OIF Map
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.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure reverse OIF mapping:
- Configure a logical interface for unicast data traffic.[edit interfaces ge-2/0/0]user@host# set unit 0 family inet address 30.0.0.2/24
- Configure a logical interface for subscriber control traffic.[edit interfaces ge-2/2/0]user@host# set hierarchical-scheduleruser@host# set vlan-tagginguser@host# set unit 10 vlan-id 10user@host# set unit 10 family inet address 40.0.0.2/24
- Configure two logical interfaces on which QoS adjustments
are made.[edit interfaces ge-2/2/0]user@host# set unit 50 vlan-id 50user@host# set unit 50 family inet address 50.0.0.2/24user@host# set unit 51 vlan-id 51user@host# set unit 51 family inet address 50.0.1.2/24
- Configure a policy.[edit policy-options policy-statement all-mcast-groups]user@host# set from source-address-filter 30.0.0.0/8 orlongeruser@host# set then accept
- Enable a flow map that references the policy. [edit routing-options multicast]user@host# set flow-map map1 policy all-mcast-groupsuser@host# set flow-map map1 bandwidth 10m adaptive
- 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 500muser@host# set interface ge-2/2/0.10 reverse-oif-mappinguser@host# set interface ge-2/2/0.10 subscriber-leave-timer 20
- Configure PIM and IGMP.[edit protocols]user@host# set igmp interface alluser@host# set igmp interface fxp0.0 disableuser@host# set pim rp local address 20.0.0.2user@host# set pim interface alluser@host# set pim interface fxp0.0 disableuser@host# set pim interface ge-2/2/0.10 disable
- 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 class-of-service interfaces ge-2/2/0]user@host# set shaping-rate 240muser@host# set unit 50 output-traffic-control-profile tcp-ifluser@host# set unit 51 output-traffic-control-profile tcp-ifl
[edit class-of-service traffic-control-profiles tcp-30m-no-smap]user@host# set shaping-rate 20m
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 instructions in this example to correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
Configuring an OIF Map
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.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see the CLI User Guide.
To configure reverse OIF mapping:
- Configure a logical interface for unicast data traffic.[edit interfaces ge-2/3/8 ]user@host# set unit 0 family inet6 address C300:0101::/24
- Configure logical interfaces for subscriber VLANs.[edit interfaces ge-2/3/9]user@host# set vlan-tagginguser@host# set unit 1 vlan-id 1user@host# set unit 1 family inet6 address C400:0101::/24user@host# set unit 2 vlan-id 2user@host# set unit 2 family inet6 address C400:0201::/24 lo0 unit 0 family inet6 address C000::1/128user@host# set unit 2 family inet6 address C400:0201::/24
- Configure two map-to logical interfaces.[edit interfaces ge-2/2/0]user@host# set unit 4000 vlan-id 4000user@host# set unit 4000 family inet6 address C40F:A001::/24user@host# set unit 4001 vlan-id 4001user@host# set unit 4001 family inet6 address C40F:A101::/24
- Configure the OIF map.[edit policy-options policy-statement g539-v6]user@host# set term g539-4000 from route-filter FF05:0101:0000::/39 orlongeruser@host# set then map-to-interface ge-2/3/9.4000user@host# set then acceptuser@host# set term g539-4001 from route-filter FF05:0101:0200::/39 orlongeruser@host# set then map-to-interface ge-2/3/9.4001user@host# set then acceptuser@host# set term self from route-filter FF05:0101:0700::/40 orlongeruser@host# set then map-to-interface selfuser@host# set then accept
[edit policy-options policy-statement g539-v6-all]user@host# set term g539 from route-filter 0::/0 orlongeruser@host# set then map-to-interface ge-2/3/9.4000user@host# set then accept - Disable QoS adjustment on the subscriber VLANs. [edit routing-options multicast]user@host# set interface ge-2/3/9.1 no-qos-adjustuser@host# set interface ge-2/3/9.2 no-qos-adjust
- Configure PIM and MLD. Point the MLD subscriber VLANs
to the OIF map.[edit protocols]user@host# set pim rp local address 20.0.0.4user@host# set pim rp local family inet6 address C000::1 #C000::1 is the address of lo0user@host# set pim interface ge-2/3/8.0 mode sparseuser@host# set pim interface ge-2/3/8.0 version 2user@host# set mld interface fxp0.0 disableuser@host# set interface ge-2/3/9.4000 passiveuser@host# set interface ge-2/3/9.4001 passiveuser@host# set interface ge-2/3/9.1 version 1user@host# set interface ge-2/3/9.1 oif-map g539-v6user@host# set interface ge-2/3/9.2 version 2user@host# set interface ge-2/3/9.2 oif-map g539-v6
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 instructions in this example to correct the configuration.
If you are done configuring the device, enter commit from configuration mode.
Verification
To verify the configuration, run the following commands:
- show igmp statistics
- show class-of-service interface
- show interfaces statistics
- show mld statistics
- show multicast interface
- show policy
Related Documentation
- EX, M, MX, PTX, T Series
- Example: Configuring a Multicast Flow Map
- M, MX, T Series
- Configuring Multicast Routing Over IP Demux Interfaces
- Additional Information
- Junos OS Subscriber Management, Release 12.2
- Junos OS Subscriber Management, Release 12.2
Published: 2012-11-16
Related Documentation
- EX, M, MX, PTX, T Series
- Example: Configuring a Multicast Flow Map
- M, MX, T Series
- Configuring Multicast Routing Over IP Demux Interfaces
- Additional Information
- Junos OS Subscriber Management, Release 12.2
- Junos OS Subscriber Management, Release 12.2