Example: Configuring Multicast VPNs
The following example illustrates how to configure multicast VPNs.
Requirements
This example uses the following software and hardware components:
- JunosE Release 7.1.0 or higher-numbered releases
- E Series router (ERX7xx models, ERX14xx models, the ERX310 router, the E120 router, or the E320 router)
- ASIC-based line modules that support Fast Ethernet or Gigabit Ethernet
Overview
In the following example (Figure 13), customer edge router 1 (CE1) and customer edge router 2 (CE2) exist in two separate VPNs. Each VPN is configured with its assigned Multicast Domain (235.1.1.1 and 235.1.1.2, respectively).
Figure 13: Multicast VPNs

To better understand the example, keep the following in mind:
- Lp is a loopback interface in the parent router. This address is the loopback interface used as the BGP peer address of the provider edge router (PE). Its address is advertised in the provider address space.
- Tv is the MTI in the VRF. This interface is typically
configured as a PIM sparse-mode interface (though you can configure
it for dense-mode or sparse-dense-mode). Any packets that originate
in the VRF are sent using the address of this interface as the source
address. You must set this interface address to be identical to loopback
interface of the parent router (Lp).
Caution: Defining the Tv interface with an address other than the loopback interface of the parent router might restrict operation with non-Juniper Networks routers.
- Tp is an unnumbered IP interface that is tied to the loopback interface of the provider edge router (PE).
Configuring a Multicast VPN Network
Step-by-Step Procedure
To configure the example, use the following general procedures:
![]() | Note: This example provides general information for configuring a simple Multicast VPN network. For detailed information about creating GRE tunnels, see Configuring IP Tunnels in the JunosE IP Services Configuration Guide. For detailed information about PIM sparse-mode configuration, see PIM Sparse Mode in Understanding PIM for IPv4 Multicast. |
- Configure BGP/MPLS VPN.host1:PE2(config-router)#router bgp 100 host1:PE2(config-router)#address-family vpnv4 unicast host1:PE2(config-router-af)#neighbor 1.1.1.1 activate host1:PE2(config-router-af)#neighbor 1.1.1.1 next-hop-self host1:PE2(config-router-af)#neighbor 3.3.3.3 activate host1:PE2(config-router-af)#neighbor 3.3.3.3 next-hop-self host1:PE2(config-router-af)#exit-address-family
See Configuring BGP-MPLS Applications in the JunosE BGP and MPLS Configuration Guide for details.
- Configure PIM sparse mode in the core and RP for MVPN
group addresses.
Note: For MVPN, it is a typical practice to use shared trees.
host1:PE1(config-router)#virtual-router PE2 host1:PE2(config)#ip multicast-routing host1:PE2(config)# host1:PE2(config)#! MDT RP is 72.72.72.72 (P1)host1:PE2(config)#access-list 1 permit ip 235.0.0.0 0.255.255.255 any host1:PE2(config)#ip pim rp-address 72.72.72.72 1 host1:PE2(config)# host1:PE2(config)#! Do not switch from RPT for MDTshost1:PE2(config)#ip pim spt-threshold infinity group-list 1 host1:PE2(config)# - Configure the loopback interface, Lp, in parent router
PE2.host1:PE2(config)#interface loopback 0 host1:PE2(config-if)#ip address 2.2.2.2 255.255.255.255 host1:PE2(config-if)#ip pim sparse-mode host1:PE2(config-if)
Note: You must configure the loopback interface for PIM sparse mode to support unnumbered MDTs.
- Add PIM-SM to core-facing interfaces.host1:PE2(config)#interface atm2/1.20 host1:PE2(config-subif)#ip pim sparse-mode host1:PE2(config-subif)#
- Extend the BGP router configuration to contribute VPN
routes into the multicast router table of the VRF using the ip route-type both command.host1:PE2(config)#router bgp 100 host1:PE2(config-router)#address-family ipv4 unicast vrf PE21 host1:PE2(config-router-af)#ip route-type both host1:PE2(config-router-af)#exit host1:PE2(config-router)#
- Configure the GRE tunnel for VPN1.host1(config)#interface tunnel gre:MTI-21 transport-virtual-router PE2 host1(config-if)#tunnel source 2.2.2.2 host1(config-if)#tunnel destination 235.1.1.1 host1(config-if)#tunnel mdt host1(config-if)#exit host1(config)#
- Configure the GRE tunnel for VPN2.host1(config)#interface tunnel gre:MTI-22 transport-virtual-router PE2 host1(config-if)#tunnel source 2.2.2.2 host1(config-if)#tunnel destination 235.1.1.2 host1(config-if)#tunnel mdt host1(config-if)#exit host1(config)#
- Configure the IP interface (Tv) in PE2:CE1 as a numbered
or unnumbered PIM sparse-mode interface. Use the same address as the
loopback interface, Lp in the parent router, PE2.host1(config)#virtual-router PE2:CE1 host1:PE2:CE1(config)#interface tunnel gre:MTI-21 host1:PE2:CE1(config-if)#ip address 2.2.2.2 255.255.255.255 host1:PE2:CE1(config-if)#ip pim sparse-mode host1:PE2:CE1(config-if)#exit host1:PE2:CE1#
- Configure the IP interface (Tv) in PE2:CE2 as a numbered
or unnumbered PIM sparse-mode interface. Use the same address as the
loopback interface, Lp in the parent router, PE2. host1(config)#virtual-router PE2:CE2host1:PE2:CE2(config)#interface loopback 0 host1:PE2:CE2(config-if)#ip address 2.2.2.2 255.255.255.255 host1:PE2:CE2(config-if)#exit host1:PE2:CE2(config)# host1:PE2:CE2(config)#interface tunnel gre:MTI-22 host1:PE2:CE2(config-if)#ip unnumbered loopback 0 host1:PE2:CE2(config-if)#ip pim sparse-mode host1:PE2:CE2(config-if)#exit host1:PE2:CE2#
- Configure the Tp interfaces in the parent router, PE2,
as unnumbered PIM sparse-mode interfaces tied to the loopback interface,
Lp.host1(config)#virtual-router PE2host1: PE2(config)#interface tunnel gre:MTI-21.mdt host1:PE2(config-if)#ip unnumbered loopback 0 host1:PE2(config-if)#ip pim sparse-mode host1:PE2(config-if)#exit host1:PE2(config)#
host1:PE2(config)#interface tunnel gre:MTI-22.mdt host1:PE2(config-if)#ip unnumbered loopback 0 host1:PE2(config-if)#ip pim sparse-mode host1:PE2(config-if)#exit host1:PE2(config)#Note: You can configure PIM on IPv4 and IPv6 interfaces. However, IPv6 does not support all PIM configuration options. For information about configuring PIM on IPv6 interfaces, see Configuring PIM for IPv6 Multicast.