Example: Configuring MDT-based MVPN inter-AS option C
Network configuration
As shown in Figure 81, configure MDT-based MVPN inter-AS option C to meet the following requirements:
Item | Network configuration |
---|---|
Multicast sources and receivers |
|
VPN instances to which PEs belong |
|
Unicast routing protocols and MPLS |
|
IP multicast routing |
|
IGMPv2 |
|
PIM-SM | Enable PIM-SM on the public network and for VPN instances a and b:
|
MSDP | Establish an MSDP peering relationship between PE 2 and PE 3 on their Loopback 1. |
Figure 81: Network diagram
Table 21: Interface and IP address assignment
Device | Interface | IP address | Device | Interface | IP address |
---|---|---|---|---|---|
S 1 | — | 10.11.5.2/24 | R 1 | — | 10.11.8.2/24 |
S 2 | — | 10.11.6.2/24 | R 2 | — | 10.11.7.2/24 |
PE 1 | Vlan-int2 | 10.10.1.1/24 | PE 3 | Vlan-int4 | 10.10.2.1/24 |
PE 1 | Vlan-int11 | 10.11.1.1/24 | PE 3 | Vlan-int3 | 192.168.1.2/24 |
PE 1 | Vlan-int12 | 10.11.2.1/24 | PE 3 | Loop1 | 1.1.1.3/32 |
PE 1 | Loop1 | 1.1.1.1/32 | PE 3 | Loop2 | 22.22.22.22/32 |
PE 2 | Vlan-int2 | 10.10.1.2/24 | PE 4 | Vlan-int4 | 10.10.2.2/24 |
PE 2 | Vlan-int3 | 192.168.1.1/24 | PE 4 | Vlan-int13 | 10.11.3.1/24 |
PE 2 | Loop1 | 1.1.1.2/32 | PE 4 | Vlan-int14 | 10.11.4.1/32 |
PE 2 | Loop2 | 11.11.11.11/32 | PE 4 | Loop1 | 1.1.1.4/32 |
CE a1 | Vlan-int10 | 10.11.5.1/24 | CE b1 | Vlan-int20 | 10.11.6.1/24 |
CE a1 | Vlan-int11 | 10.11.1.2/24 | CE b1 | Vlan-int12 | 10.11.2.2/24 |
CE a1 | Loop0 | 2.2.2.2/32 | CE b2 | Vlan-int40 | 10.11.8.1/24 |
CE a2 | Vlan-int30 | 10.11.7.1/24 | CE b2 | Vlan-int14 | 10.11.4.2/24 |
CE a2 | Vlan-int13 | 10.11.3.2/24 | CE b2 | Loop0 | 3.3.3.3/32 |
Procedure
Configure PE 1:
# Configure a global router ID, and enable IP multicast routing on the public network.
<PE1> system-view [PE1] router id 1.1.1.1 [PE1] multicast routing [PE1-mrib] quit
# Create service loopback group 1, and specify the multicast tunnel service for the group.
[PE1] service-loopback group 1 type multicast-tunnel
# Assign HundredGigE 1/0/4 to service loopback group 1. The interface does not belong to VLAN 2, VLAN 11, or VLAN 12.
[PE1] interface hundredgige 1/0/4 [PE1-HundredGigE1/0/4] port service-loopback group 1 [PE1-HundredGigE1/0/4] quit
# Configure an LSR ID, and enable LDP globally.
[PE1] mpls lsr-id 1.1.1.1 [PE1] mpls ldp [PE1-ldp] quit
# Create a VPN instance named a, and configure an RD and route targets for the VPN instance.
[PE1] ip vpn-instance a [PE1-vpn-instance-a] route-distinguisher 100:1 [PE1-vpn-instance-a] vpn-target 100:1 export-extcommunity [PE1-vpn-instance-a] vpn-target 100:1 import-extcommunity [PE1-vpn-instance-a] quit
# Enable IP multicast routing for VPN instance a.
[PE1] multicast routing vpn-instance a [PE1-mrib-a] quit
# Create an MDT-based MVPN for VPN instance a.
[PE1] multicast-mvpn vpn-instance a mode mdt
# Create an MVPN IPv4 address family for VPN instance a.
[PE1-mvpn-a] address-family ipv4
# Specify the default-group, the MVPN source interface, and the data-group range for VPN instance a.
[PE1-mvpn-a-ipv4] default-group 239.1.1.1 [PE1-mvpn-a-ipv4] source loopback 1 [PE1-mvpn-a-ipv4] data-group 225.1.1.0 28 [PE1-mvpn-a-ipv4] quit [PE1-mvpn-a] quit
# Create a VPN instance named b, and configure an RD and route targets for the VPN instance.
[PE1] ip vpn-instance b [PE1-vpn-instance-b] route-distinguisher 200:1 [PE1-vpn-instance-b] vpn-target 200:1 export-extcommunity [PE1-vpn-instance-b] vpn-target 200:1 import-extcommunity [PE1-vpn-instance-b] quit
# Enable IP multicast routing for VPN instance b.
[PE1] multicast routing vpn-instance b [PE1-mrib-b] quit
# Create an MDT-based MVPN for VPN instance b.
[PE1] multicast-mvpn vpn-instance b mode mdt
# Create an MVPN IPv4 address family for VPN instance b.
[PE1-mvpn-b] address-family ipv4
# Specify the default-group, the MVPN source interface, and the data-group range for VPN instance b.
[PE1-mvpn-b-ipv4] default-group 239.4.4.4 [PE1-mvpn-b-ipv4] source loopback 1 [PE1-mvpn-b-ivp4] data-group 225.4.4.0 28 [PE1-mvpn-b-ipv4] quit [PE1-mvpn-b] quit
# Assign an IP address to VLAN-interface 2.
[PE1] interface vlan-interface 2 [PE1-Vlan-interface2] ip address 10.10.1.1 24
# Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 2.
[PE1-Vlan-interface2] pim sm [PE1-Vlan-interface2] mpls enable [PE1-Vlan-interface2] mpls ldp enable [PE1-Vlan-interface2] quit
# Associate VLAN-interface 11 with VPN instance a.
[PE1] interface vlan-interface 11 [PE1-Vlan-interface11] ip binding vpn-instance a
# Assign an IP address to VLAN-interface 11, and enable PIM-SM on the interface.
[PE1-Vlan-interface11] ip address 10.11.1.1 24 [PE1-Vlan-interface11] pim sm [PE1-Vlan-interface11] quit
# Associate VLAN-interface 12 with VPN instance b.
[PE1] interface vlan-interface 12 [PE1-Vlan-interface12] ip binding vpn-instance b
# Assign an IP address to VLAN-interface 12, and enable PIM-SM on the interface.
[PE1-Vlan-interface12] ip address 10.11.2.1 24 [PE1-Vlan-interface12] pim sm [PE1-Vlan-interface12] quit
# Assign an IP address to Loopback 1, and enable PIM-SM on the interface.
[PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.1 32 [PE1-LoopBack1] pim sm [PE1-LoopBack1] quit
# Configure BGP.
[PE1] bgp 100 [PE1-bgp-default] group pe1-pe2 internal [PE1-bgp-default] peer pe1-pe2 connect-interface loopback 1 [PE1-bgp-default] peer 1.1.1.2 group pe1-pe2 [PE1-bgp-default] group pe1-pe4 external [PE1-bgp-default] peer pe1-pe4 as-number 200 [PE1-bgp-default] peer pe1-pe4 ebgp-max-hop 255 [PE1-bgp-default] peer pe1-pe4 connect-interface loopback 1 [PE1-bgp-default] peer 1.1.1.4 group pe1-pe4 [PE1–bgp-default] ip vpn-instance a [PE1-bgp-default-a] address-family ipv4 [PE1-bgp-default-ipv4-a] import-route ospf 2 [PE1-bgp-default-ipv4-a] import-route direct [PE1-bgp-default-ipv4-a] quit [PE1-bgp-default-a] quit [PE1–bgp-default] ip vpn-instance b [PE1-bgp-default-b] address-family ipv4 [PE1-bgp-default-ipv4-b] import-route ospf 3 [PE1-bgp-default-ipv4-b] import-route direct [PE1-bgp-default-ipv4-b] quit [PE1-bgp-default-b] quit [PE1–bgp-default] address-family ipv4 [PE1-bgp-default-ipv4] peer pe1-pe2 enable [PE1-bgp-default-ipv4] peer pe1-pe2 label-route-capability [PE1-bgp-default-ipv4] quit [PE1–bgp-default] address-family vpnv4 [PE1–bgp-default-vpnv4] peer pe1-pe4 enable [PE1–bgp-default-vpnv4] quit [PE1–bgp-default] quit
# Configure OSPF.
[PE1] ospf 1 [PE1-ospf-1] area 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit [PE1] ospf 2 vpn-instance a [PE1-ospf-2] import-route bgp [PE1-ospf-2] area 0.0.0.0 [PE1-ospf-2-area-0.0.0.0] network 10.11.1.0 0.0.0.255 [PE1-ospf-2-area-0.0.0.0] quit [PE1-ospf-2] quit [PE1] ospf 3 vpn-instance b [PE1-ospf-3] import-route bgp [PE1-ospf-3] area 0.0.0.0 [PE1-ospf-3-area-0.0.0.0] network 10.11.2.0 0.0.0.255 [PE1-ospf-3-area-0.0.0.0] quit [PE1-ospf-3] quit
Configure PE 2:
# Configure a global router ID, and enable IP multicast routing on the public network.
<PE2> system-view [PE2] router id 1.1.1.2 [PE2] multicast routing [PE2-mrib] quit
# Configure an LSR ID, and enable LDP globally.
[PE2] mpls lsr-id 1.1.1.2 [PE2] mpls ldp [PE2-ldp] quit
# Assign an IP address to VLAN-interface 2.
[PE2] interface vlan-interface 2 [PE2-Vlan-interface2] ip address 10.10.1.2 24
# Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 2.
[PE2-Vlan-interface2] pim sm [PE2-Vlan-interface2] mpls enable [PE2-Vlan-interface2] mpls ldp enable [PE2-Vlan-interface2] quit
# Assign an IP address to VLAN-interface 3.
[PE2] interface vlan-interface 3 [PE2-Vlan-interface3] ip address 192.168.1.1 24
# Enable PIM-SM and MPLS on VLAN-interface 3.
[PE2-Vlan-interface3] pim sm [PE2-Vlan-interface3] mpls enable [PE2-Vlan-interface3] quit
# Assign an IP address to Loopback 1, and enable PIM-SM on the interface.
[PE2] interface loopback 1 [PE2-LoopBack1] ip address 1.1.1.2 32 [PE2-LoopBack1] pim sm [PE2-LoopBack1] quit
# Assign an IP address to Loopback 2, and enable PIM-SM on the interface.
[PE2] interface loopback 2 [PE2-LoopBack2] ip address 11.11.11.11 32 [PE2-LoopBack2] pim sm [PE2-LoopBack2] quit
# Configure Loopback 2 as a C-BSR and a C-RP.
[PE2] pim [PE2-pim] c-bsr 11.11.11.11 [PE2-pim] c-rp 11.11.11.11 [PE2-pim] quit
# Configure VLAN-interface 3 as a PIM-SM domain border.
[PE2] interface vlan-interface 3 [PE2-Vlan-interface3] pim bsr-boundary [PE2-Vlan-interface3] quit
# Establish an MSDP peering relationship.
[PE2] msdp [PE2-msdp] encap-data-enable [PE2-msdp] peer 1.1.1.3 connect-interface loopback 1
# Configure a static route.
[PE2] ip route-static 1.1.1.3 32 vlan-interface 3 192.168.1.2
# Configure BGP.
[PE2] bgp 100 [PE2-bgp-default] group pe2-pe1 internal [PE2-bgp-default] peer pe2-pe1 connect-interface loopback 1 [PE2-bgp-default] peer 1.1.1.1 group pe2-pe1 [PE2-bgp-default] group pe2-pe3 external [PE2-bgp-default] peer pe2-pe3 as-number 200 [PE2-bgp-default] peer 192.168.1.2 group pe2-pe3 [PE2-bgp-default] address-family ipv4 [PE2-bgp-default-ipv4] peer pe2-pe1 enable [PE2-bgp-default-ipv4] peer pe2-pe1 route-policy map2 export [PE2-bgp-default-ipv4] peer pe2-pe1 label-route-capability [PE2-bgp-default-ipv4] peer pe2-pe3 enable [PE2-bgp-default-ipv4] peer pe2-pe3 route-policy map1 export [PE2-bgp-default-ipv4] peer pe2-pe3 label-route-capability [PE2-bgp-default-ipv4] import-route ospf 1 [PE2-bgp-default-ipv4] quit [PE2–bgp-default] quit
# Configure OSPF.
[PE2] ospf 1 [PE2-ospf-1] area 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 1.1.1.2 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 11.11.11.11 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit
Configure PE 3:
# Configure a global router ID, and enable IP multicast routing on the public network.
<PE3> system-view [PE3] router id 1.1.1.3 [PE3] multicast routing [PE3-mrib] quit
# Configure an LSR ID, and enable LDP globally.
[PE3] mpls lsr-id 1.1.1.3 [PE3] mpls ldp [PE3-ldp] quit
# Assign an IP address to VLAN-interface 4.
[PE3] interface vlan-interface 4 [PE3-Vlan-interface4] ip address 10.10.2.1 24
# Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 4.
[PE3-Vlan-interface4] pim sm [PE3-Vlan-interface4] mpls enable [PE3-Vlan-interface4] mpls ldp enable [PE3-Vlan-interface4] quit
# Assign an IP address to VLAN-interface 3.
[PE3] interface vlan-interface 3 [PE3-Vlan-interface3] ip address 192.168.1.2 24
# Enable PIM-SM and MPLS on VLAN-interface 3.
[PE3-Vlan-interface3] pim sm [PE3-Vlan-interface3] mpls enable [PE3-Vlan-interface3] quit
# Assign an IP address to Loopback 1, and enable PIM-SM on the interface.
[PE3] interface loopback 1 [PE3-LoopBack1] ip address 1.1.1.3 32 [PE3-LoopBack1] pim sm [PE3-LoopBack1] quit
# Assign an IP address to Loopback 2, and enable PIM-SM on the interface.
[PE3] interface loopback 2 [PE3-LoopBack2] ip address 22.22.22.22 32 [PE3-LoopBack2] pim sm [PE3-LoopBack2] quit
# Configure Loopback 2 as a C-BSR and a C-RP.
[PE3] pim [PE3-pim] c-bsr 22.22.22.22 [PE3-pim] c-rp 22.22.22.22 [PE3-pim] quit
# Configure VLAN-interface 3 as a PIM-SM domain border.
[PE3] interface vlan-interface 3 [PE3-Vlan-interface3] pim bsr-boundary [PE3-Vlan-interface3] quit
# Establish an MSDP peering relationship.
[PE3] msdp [PE3-msdp] encap-data-enable [PE3-msdp] peer 1.1.1.2 connect-interface loopback 1
# Configure a static route.
[PE3] ip route-static 1.1.1.2 32 vlan-interface 3 192.168.1.1
# Configure BGP.
[PE3] bgp 200 [PE3-bgp-default] group pe3-pe4 internal [PE3-bgp-default] peer pe3-pe4 connect-interface loopback 1 [PE3-bgp-default] peer 1.1.1.4 group pe3-pe4 [PE3-bgp-default] group pe3-pe2 external [PE3-bgp-default] peer pe3-pe2 as-number 100 [PE3-bgp-default] peer 192.168.1.1 group pe3-pe2 [PE3-bgp-default] address-family ipv4 [PE3-bgp-default-ipv4] peer pe3-pe4 enable [PE3-bgp-default-ipv4] peer pe3-pe4 route-policy map2 export [PE3-bgp-default-ipv4] peer pe3-pe4 label-route-capability [PE3-bgp-default-ipv4] peer pe3-pe2 enable [PE3-bgp-default-ipv4] peer pe3-pe2 route-policy map1 export [PE3-bgp-default-ipv4] peer pe3-pe2 label-route-capability [PE3-bgp-default-ipv4] import-route ospf 1 [PE3-bgp-default-ipv4] quit [PE3–bgp-default] quit
# Configure OSPF.
[PE3] ospf 1 [PE3-ospf-1] area 0.0.0.0 [PE3-ospf-1-area-0.0.0.0] network 1.1.1.3 0.0.0.0 [PE3-ospf-1-area-0.0.0.0] network 22.22.22.22 0.0.0.0 [PE3-ospf-1-area-0.0.0.0] network 10.10.2.0 0.0.0.255 [PE3-ospf-1-area-0.0.0.0] quit [PE3-ospf-1] quit
Configure PE 4:
# Configure a global router ID, and enable IP multicast routing on the public network.
<PE4> system-view [PE4] router id 1.1.1.4 [PE4] multicast routing [PE4-mrib] quit
# Create service loopback group 1, and specify the multicast tunnel service for the group.
[PE4] service-loopback group 1 type multicast-tunnel
# Assign HundredGigE 1/0/4 to service loopback group 1. The interface does not belong to VLAN 4, VLAN 13, or VLAN 14.
[PE4] interface hundredgige 1/0/4 [PE4-HundredGigE1/0/4] port service-loopback group 1 [PE4-HundredGigE1/0/4] quit
# Configure an LSR ID, and enable LDP globally.
[PE4] mpls lsr-id 1.1.1.4 [PE4] mpls ldp [PE4-ldp] quit
# Create a VPN instance named a, and configure an RD and route targets for the VPN instance.
[PE4] ip vpn-instance a [PE4-vpn-instance-a] route-distinguisher 100:1 [PE4-vpn-instance-a] vpn-target 100:1 export-extcommunity [PE4-vpn-instance-a] vpn-target 100:1 import-extcommunity [PE4-vpn-instance-a] quit
# Enable IP multicast routing for VPN instance a.
[PE4] multicast routing vpn-instance a [PE4-mrib-a] quit
# Create an MDT-based MVPN for VPN instance a.
[PE4] multicast-mvpn vpn-instance a mode mdt
# Create an MVPN IPv4 address family for VPN instance a.
[PE4-mvpn-a] address-family ipv4
# Specify the default-group, the MVPN source interface, and the data-group range for VPN instance a.
[PE4-mvpn-a-ipv4] default-group 239.1.1.1 [PE4-mvpn-a-ivp4] source loopback 1 [PE4-mvpn-a-ivp4] data-group 225.1.1.0 28 [PE4-mvpn-a-ipv4] quit [PE4-mvpn-a] quit
# Create a VPN instance named b, and configure an RD and route targets for the VPN instance.
[PE4] ip vpn-instance b [PE4-vpn-instance-b] route-distinguisher 200:1 [PE4-vpn-instance-b] vpn-target 200:1 export-extcommunity [PE4-vpn-instance-b] vpn-target 200:1 import-extcommunity [PE4-vpn-instance-b] quit
# Enable IP multicast routing for VPN instance b.
[PE4] multicast routing vpn-instance b [PE4-mrib-b] quit
# Create an MDT-based MVPN for VPN instance b.
[PE4] multicast-mvpn vpn-instance b mode mdt
# Create an MVPN IPv4 address family for VPN instance b.
[PE4-mvpn-b] address-family ipv4
# Specify the default-group, the MVPN source interface, and the data-group range for VPN instance b.
[PE4-mvpn-b-ipv4] default-group 239.4.4.4 [PE4-mvpn-b-ipv4] source loopback 1 [PE4-mvpn-b-ivp4] data-group 225.4.4.0 28 [PE4-mvpn-b-ipv4] quit [PE4-mvpn-b] quit
# Assign an IP address to VLAN-interface 4.
[PE4] interface vlan-interface 4 [PE4-Vlan-interface4] ip address 10.10.2.2 24
# Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 4.
[PE4-Vlan-interface4] pim sm [PE4-Vlan-interface4] mpls enable [PE4-Vlan-interface4] mpls ldp enable [PE4-Vlan-interface4] quit
# Associate VLAN-interface 13 with VPN instance a.
[PE4] interface vlan-interface 13 [PE4-Vlan-interface13] ip binding vpn-instance a
# Assign an IP address to VLAN-interface 13, and enable PIM-SM on the interface.
[PE4-Vlan-interface13] ip address 10.11.3.1 24 [PE4-Vlan-interface13] pim sm [PE4-Vlan-interface13] quit
# Associate VLAN-interface 14 with VPN instance b.
[PE4] interface vlan-interface 14 [PE4-Vlan-interface14] ip binding vpn-instance b
# Assign an IP address to VLAN-interface 14, and enable PIM-SM on the interface.
[PE4-Vlan-interface14] ip address 10.11.4.1 24 [PE4-Vlan-interface14] pim sm [PE4-Vlan-interface14] quit
# Assign an IP address to Loopback 1, and enable PIM-SM on the interface.
[PE4] interface loopback 1 [PE4-LoopBack1] ip address 1.1.1.4 32 [PE4-LoopBack1] pim sm [PE4-LoopBack1] quit
# Configure BGP.
[PE4] bgp 200 [PE4-bgp-default] group pe4-pe3 internal [PE4-bgp-default] peer pe4-pe3 connect-interface loopback 1 [PE4-bgp-default] peer 1.1.1.3 group pe4-pe3 [PE4-bgp-default] group pe4-pe1 external [PE4-bgp-default] peer pe4-pe1 as-number 100 [PE4-bgp-default] peer pe4-pe1 ebgp-max-hop 255 [PE4-bgp-default] peer pe4-pe1 connect-interface loopback 1 [PE4-bgp-default] peer 1.1.1.1 group pe4-pe1 [PE4–bgp-default] ip vpn-instance a [PE4-bgp-default-a] address-family ipv4 [PE4-bgp-default-ipv4-a] import-route ospf 2 [PE4-bgp-default-ipv4-a] import-route direct [PE4-bgp-default-ipv4-a] quit [PE4-bgp-default-a] quit [PE4–bgp-default] ip vpn-instance b [PE4-bgp-default-b] address-family ipv4 [PE4-bgp-default-ipv4-b] import-route ospf 3 [PE4-bgp-default-ipv4-b] import-route direct [PE4-bgp-default-ipv4-b] quit [PE4-bgp-default-b] quit [PE4–bgp-default] address-family ipv4 [PE4-bgp-default-ipv4] peer pe4-pe3 enable [PE4-bgp-default-ipv4] peer pe4-pe3 label-route-capability [PE4-bgp-default-ipv4] quit [PE4–bgp-default] address-family vpnv4 [PE4–bgp-default-vpnv4] peer pe4-pe1 enable [PE4–bgp-default-vpnv4] quit [PE4–bgp-default] quit
# Configure OSPF.
[PE4] ospf 1 [PE4-ospf-1] area 0.0.0.0 [PE4-ospf-1-area-0.0.0.0] network 1.1.1.4 0.0.0.0 [PE4-ospf-1-area-0.0.0.0] network 10.10.2.0 0.0.0.255 [PE4-ospf-1-area-0.0.0.0] quit [PE4-ospf-1] quit [PE4] ospf 2 vpn-instance a [PE4-ospf-2] import-route bgp [PE4-ospf-2] area 0.0.0.0 [PE4-ospf-2-area-0.0.0.0] network 10.11.3.0 0.0.0.255 [PE4-ospf-2-area-0.0.0.0] quit [PE4-ospf-2] quit [PE4] ospf 3 vpn-instance b [PE4-ospf-3] import-route bgp [PE4-ospf-3] area 0.0.0.0 [PE4-ospf-3-area-0.0.0.0] network 10.11.4.0 0.0.0.255 [PE4-ospf-3-area-0.0.0.0] quit [PE4-ospf-3] quit
Configure CE a1:
# Enable IP multicast routing.
<CEa1> system-view [CEa1] multicast routing [CEa1-mrib] quit
# Assign an IP address to VLAN-interface 10, and enable PIM-SM on the interface.
[CEa1] interface vlan-interface 10 [CEa1-Vlan-interface10] ip address 10.11.5.1 24 [CEa1-Vlan-interface10] pim sm [CEa1-Vlan-interface10] quit
# Assign an IP address to VLAN-interface 11, and enable PIM-SM on the interface.
[CEa1] interface vlan-interface 11 [CEa1-Vlan-interface11] ip address 10.11.1.2 24 [CEa1-Vlan-interface11] pim sm [CEa1-Vlan-interface11] quit
# Assign an IP address to Loopback 1, and enable PIM-SM on the interface.
[CEa1] interface loopback 1 [CEa1-LoopBack1] ip address 2.2.2.2 32 [CEa1-LoopBack1] pim sm [CEa1-LoopBack1] quit
# Configure Loopback 1 as a C-BSR and a C-RP.
[CEa1] pim [CEa1-pim] c-bsr 2.2.2.2 [CEa1-pim] c-rp 2.2.2.2 [CEa1-pim] quit
# Configure OSPF.
[CEa1] ospf 1 [CEa1-ospf-1] area 0.0.0.0 [CEa1-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0 [CEa1-ospf-1-area-0.0.0.0] network 10.11.1.0 0.0.0.255 [CEa1-ospf-1-area-0.0.0.0] network 10.11.5.0 0.0.0.255 [CEa1-ospf-1-area-0.0.0.0] quit [CEa1-ospf-1] quit
Configure CE b1:
# Enable IP multicast routing.
<CEb1> system-view [CEb1] multicast routing [CEb1-mrib] quit
# Assign an IP address to VLAN-interface 20, and enable PIM-SM on the interface.
[CEb1] interface vlan-interface 20 [CEb1-Vlan-interface20] ip address 10.11.6.1 24 [CEb1-Vlan-interface20] pim sm [CEb1-Vlan-interface20] quit
# Assign an IP address to VLAN-interface 12, and enable PIM-SM on the interface.
[CEb1] interface vlan-interface 12 [CEb1-Vlan-interface12] ip address 10.11.2.2 24 [CEb1-Vlan-interface12] pim sm [CEb1-Vlan-interface12] quit
# Configure OSPF.
[CEb1] ospf 1 [CEb1-ospf-1] area 0.0.0.0 [CEb1-ospf-1-area-0.0.0.0] network 10.11.2.0 0.0.0.255 [CEb1-ospf-1-area-0.0.0.0] network 10.11.6.0 0.0.0.255 [CEb1-ospf-1-area-0.0.0.0] quit [CEb1-ospf-1] quit
Configure CE a2:
# Enable IP multicast routing.
<CEa2> system-view [CEa2] multicast routing [CEa2-mrib] quit
# Assign an IP address to VLAN-interface 30, and enable IGMP on the interface.
[CEa2] interface vlan-interface 30 [CEa2-Vlan-interface30] ip address 10.11.7.1 24 [CEa2-Vlan-interface30] igmp enable [CEa2-Vlan-interface30] quit
# Assign an IP address to VLAN-interface 13, and enable PIM-SM on the interface.
[CEa2] interface vlan-interface 13 [CEa2-Vlan-interface13] ip address 10.11.3.2 24 [CEa2-Vlan-interface13] pim sm [CEa2-Vlan-interface13] quit
# Configure OSPF.
[CEa2] ospf 1 [CEa2-ospf-1] area 0.0.0.0 [CEa2-ospf-1-area-0.0.0.0] network 10.11.3.0 0.0.0.255 [CEa2-ospf-1-area-0.0.0.0] network 10.11.7.0 0.0.0.255 [CEa2-ospf-1-area-0.0.0.0] quit [CEa2-ospf-1] quit
Configure CE b2:
# Enable IP multicast routing.
<CEb2> system-view [CEb2] multicast routing [CEb2-mrib] quit
# Assign an IP address to VLAN-interface 40, and enable IGMP on the interface.
[CEb2] interface vlan-interface 40 [CEb2-Vlan-interface40] ip address 10.11.8.1 24 [CEb2-Vlan-interface40] igmp enable [CEb2-Vlan-interface40] quit
# Assign an IP address to VLAN-interface 14, and enable PIM-SM on the interface.
[CEb2] interface vlan-interface 14 [CEb2-Vlan-interface14] ip address 10.11.4.2 24 [CEb2-Vlan-interface14] pim sm [CEb2-Vlan-interface14] quit
# Assign an IP address to Loopback 1, and enable PIM-SM on the interface.
[CEb2] interface loopback 1 [CEb2-LoopBack1] ip address 3.3.3.3 32 [CEb2-LoopBack1] pim sm [CEb2-LoopBack1] quit
# Configure Loopback 1 as a C-BSR and a C-RP.
[CEb2] pim [CEb2-pim] c-bsr 3.3.3.3 [CEb2-pim] c-rp 3.3.3.3 [CEb2-pim] quit
# Configure OSPF.
[CEb2] ospf 1 [CEb2-ospf-1] area 0.0.0.0 [CEb2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0 [CEb2-ospf-1-area-0.0.0.0] network 10.11.4.0 0.0.0.255 [CEb2-ospf-1-area-0.0.0.0] network 10.11.8.0 0.0.0.255 [CEb2-ospf-1-area-0.0.0.0] quit [CEb2-ospf-1] quit
Verifying the configuration
# Display information about the local default-group for IPv4 multicast transmission in each VPN instance on PE 1.
[PE1] display multicast-mvpn default-group local MVPN local default-group information: Group address Source address Interface VPN instance 239.1.1.1 1.1.1.1 MTunnel0 a 239.4.4.4 1.1.1.1 MTunnel1 b
# Display information about the local default-group for IPv4 multicast transmission in each VPN instance on PE 4.
[PE4] display multicast-mvpn default-group local MVPN local default-group information: Group address Source address Interface VPN instance 239.1.1.1 1.1.1.4 MTunnel0 a 239.4.4.4 1.1.1.4 MTunnel1 b