Example: Configuring intra-AS M6VPE

Network configuration

As shown in Figure 79, configure intra-AS M6VPE to meet the following requirements:

Item

Network configuration

Multicast sources and receivers

  • In VPN instance a, S 1 is an IPv6 multicast source, and R 1, R 2, and R 3 are receivers.

  • In VPN instance b, S 2 is an IPv6 multicast source, and R 4 is a receiver.

  • For VPN instance a, the default-group is 239.1.1.1, and the data-group range is 225.2.2.0 to 225.2.2.15.

  • For VPN instance b, the default-group is 239.2.2.2, and the data-group range is 225.4.4.0 to 225.4.4.15.

VPN instances to which PE interfaces belong

  • PE 1: VLAN-interface 11 and VLAN-interface 20 belong to VPN instance a. VLAN-interface 12 and Loopback 1 belong to the public network.

  • PE 2: VLAN-interface 13 belongs to VPN instance b. VLAN-interface 14 belongs to VPN instance a. VLAN-interface 15 and Loopback 1 belong to the public network.

  • PE 3: VLAN-interface 17 belongs to VPN instance a. VLAN-interface 18 and Loopback 2 belongs to VPN instance b. VLAN-interface 19 and Loopback 1 belong to the public network.

Unicast routing protocols and MPLS

  • Configure OSPF on the public network, and configure OSPFv3 between the PEs and the CEs.

  • Establish BGP peer connections between PE 1, PE 2, and PE 3 on their respective Loopback 1.

  • Configure MPLS on the public network.

IP multicast routing and IPv6 multicast routing

  • Enable IP multicast routing on P.

  • Enable IP multicast routing for the public network on PE 1, PE 2, and PE 3.

  • Enable IPv6 multicast routing for VPN instance a on PE 1, PE 2, and PE 3.

  • Enable IPv6 multicast routing for VPN instance b on PE 2 and PE 3.

  • Enable IPv6 multicast routing on CE a1, CE a2, CE a3, CE b1, and CE b2.

MLDv1

  • Enable MLDv1 on VLAN-interface 20 of PE 1.

  • Enable MLDv1 on VLAN-interface 40 of CE a2.

  • Enable MLDv1 on VLAN-interface 50 of CE a3.

  • Enable MLDv1 on VLAN-interface 60 of CE b2.

PIM and IPv6 PIM

Enable PIM-SM on the public network and IPv6 PIM-SM for VPN instances a and b:

  • Enable PIM-SM on all interfaces of P.

  • Enable PIM-SM on all public network interfaces and IPv6 PIM-SM on private network interfaces of PE 1, PE 2, and PE 3.

  • Enable IPv6 PIM-SM on all interfaces that do not have attached receivers on CE a1, CE a2, CE a3, CE b1, and CE b2.

  • Configure Loopback 1 of P as a C-BSR and a C-RP for the public network to provide services for all IPv4 multicast groups.

  • Configure Loopback 1 of CE a2 as a C-BSR and a C-RP for VPN instance a to provide services for all IPv6 multicast groups.

  • Configure Loopback 2 of PE 3 as a C-BSR and a C-RP for VPN instance b to provide services for all IPv6 multicast groups.

Figure 79: Network diagram

Table 19: Interface and IP address assignment

Device

Interface

IPv4/IPv6 address

Device

Interface

IPv4/IPv6 address

S 1

10:110:7::2/64

PE 3

Vlan-int19

192.168.8.1/24

S 2

10:110:8::2/64

PE 3

Vlan-int17

10:110:5::1/64

R 1

10:110:1::2/64

PE 3

Vlan-int18

10:110:6::1/64

R 2

10:110:9::2/64

PE 3

Loop1

1.1.1.3/32

R 3

10:110:10::2/64

PE 3

Loop2

33:33:33::33/128

R 4

10:110:11::2/64

CE a1

Vlan-int10

10:110:7::1/64

P

Vlan-int12

192.168.6.2/24

CE a1

Vlan-int11

10:110:2::2/64

P

Vlan-int15

192.168.7.2/24

CE a2

Vlan-int40

10:110:9::1/64

P

Vlan-int19

192.168.8.2/24

CE a2

Vlan-int14

10:110:4::2/64

P

Loop1

2.2.2.2/32

CE a2

Vlan-int16

10:110:12::1/64

PE 1

Vlan-int12

192.168.6.1/24

CE a2

Loop1

22:22:22::22/128

PE 1

Vlan-int20

10:110:1::1/64

CE a3

Vlan-int50

10:110:10::1/64

PE 1

Vlan-int11

10:110:2::1/64

CE a3

Vlan-int17

10:110:5::2/64

PE 1

Loop1

1.1.1.1/32

CE a3

Vlan-int16

10:110:12::2/64

PE 2

Vlan-int15

192.168.7.1/24

CE b1

Vlan-int30

10:110:8::1/64

PE 2

Vlan-int13

10:110:3::1/64

CE b1

Vlan-int13

10:110:3::2/64

PE 2

Vlan-int14

10:110:4::1/64

CE b2

Vlan-int60

10:110:11::1/64

PE 2

Loop1

1.1.1.2/32

CE b2

Vlan-int18

10:110:6::2/64

Procedure

  1. 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 11, VLAN 12, or VLAN 20.

    [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 the 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 IPv6 multicast routing for VPN instance a.

    [PE1] ipv6 multicast routing vpn-instance a
    [PE1-mrib6-a] quit
    

    # Create an MDT-based MVPN for VPN instance a.

    [PE1] multicast-mvpn vpn-instance a mode mdt
    

    # Create an MVPN IPv6 address family for VPN instance a.

    [PE1-mvpn-a] address-family ipv6
    

    # Specify the default group, the MVPN source interface, and the data-group range for VPN instance a.

    [PE1-mvpn-a-ipv6] default-group 239.1.1.1
    [PE1-mvpn-a-ipv6] source loopback 1
    [PE1-mvpn-a-ipv6] data-group 225.2.2.0 28
    [PE1-mvpn-a-ipv6] quit
    [PE1-mvpn-a] quit
    

    # Assign an IP address to VLAN-interface 12.

    [PE1] interface vlan-interface 12
    [PE1-Vlan-interface12] ip address 192.168.6.1 24
    

    # Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 12.

    [PE1-Vlan-interface12] pim sm
    [PE1-Vlan-interface12] mpls enable
    [PE1-Vlan-interface12] mpls ldp enable
    [PE1-Vlan-interface12] quit
    

    # Associate VLAN-interface 20 with VPN instance a, and assign an IPv6 address to the interface.

    [PE1] interface vlan-interface 20
    [PE1-Vlan-interface20] ip binding vpn-instance a
    [PE1-Vlan-interface20] ipv6 address 10:110:1::1 64
    

    # Configure VLAN-interface 20 to run OSPFv3 process 2 in Area 0, and enable MLD on the interface.

    [PE1-Vlan-interface20] ospfv3 2 area 0.0.0.0
    [PE1-Vlan-interface20] mld enable
    [PE1-Vlan-interface20] quit
    

    # Associate VLAN-interface 11 with VPN instance a, and assign an IPv6 address to the interface.

    [PE1] interface vlan-interface 11
    [PE1-Vlan-interface11] ip binding vpn-instance a
    [PE1-Vlan-interface11] ipv6 address 10:110:2::1 64
    

    # Configure VLAN-interface 11 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [PE1-Vlan-interface11] ospfv3 2 area 0.0.0.0
    [PE1-Vlan-interface11] ipv6 pim sm
    [PE1-Vlan-interface11] 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 vpn-g internal
    [PE1-bgp-default] peer vpn-g connect-interface loopback 1
    [PE1-bgp-default] peer 1.1.1.2 group vpn-g
    [PE1-bgp-default] peer 1.1.1.3 group vpn-g
    [PE1–bgp-default] ip vpn-instance a
    [PE1-bgp-default-a] address-family ipv6
    [PE1-bgp-default-ipv6-a] import-route ospfv3 2
    [PE1-bgp-default-ipv6-a] import-route direct
    [PE1-bgp-default-ipv6-a] quit
    [PE1-bgp-default-a] quit
    [PE1–bgp-default] address-family vpnv6
    [PE1–bgp-default-vpnv6] peer vpn-g enable
    [PE1–bgp-default-vpnv6] 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 192.168.6.0 0.0.0.255
    [PE1-ospf-1-area-0.0.0.0] quit
    [PE1-ospf-1] quit
    

    # Configure OSPFv3.

    [PE1] ospfv3 2 vpn-instance a
    [PE1-ospfv3-2] router-id 1.1.1.1
    [PE1-ospfv3-2] import-route bgp4+
    [PE1-ospfv3-2] import-route direct
    [PE1-ospfv3-2] area 0
    [PE1-ospfv3-2-area-0.0.0.0] return
    
  2. Configure PE 2:

    # Configure a global RD, 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
    

    # Create service loopback group 1, and specify the multicast tunnel service for the group.

    [PE2] service-loopback group 1 type multicast-tunnel
    

    # Assign HundredGigE 1/0/4 to service loopback group 1. The interface does not belong to VLAN 13, VLAN 14, or VLAN 15.

    [PE2] interface hundredgige 1/0/4
    [PE2-HundredGigE1/0/4] port service-loopback group 1
    [PE2-HundredGigE1/0/4] quit
    

    # Configure an LSR ID, and enable LDP globally.

    [PE2] mpls lsr-id 1.1.1.2
    [PE2] mpls ldp
    [PE2-ldp] quit
    

    # Create a VPN instance named b, and configure the RD and route targets for the VPN instance.

    [PE2] ip vpn-instance b
    [PE2-vpn-instance-b] route-distinguisher 200:1
    [PE2-vpn-instance-b] vpn-target 200:1 export-extcommunity
    [PE2-vpn-instance-b] vpn-target 200:1 import-extcommunity
    [PE2-vpn-instance-b] quit
    

    # Enable IPv6 multicast routing for VPN instance b.

    [PE2] ipv6 multicast routing vpn-instance b
    [PE2-mrib6-b] quit
    

    # Create an MDT-based MVPN for VPN instance b.

    [PE2] multicast-mvpn vpn-instance b mode mdt
    

    # Create an MVPN IPv6 address family for VPN instance b.

    [PE2-mvpn-b] address-family ipv6
    

    # Specify the default-group, the MVPN source interface, and the data-group range for VPN instance b.

    [PE2-mvpn-b-ipv6] default-group 239.2.2.2
    [PE2-mvpn-b-ipv6] source loopback 1
    [PE2-mvpn-b-ipv6] data-group 225.4.4.0 28
    [PE2-mvpn-b-ipv6] quit
    [PE2-mvpn-b] quit
    

    # Create a VPN instance named a, and configure the RD and route targets for the VPN instance.

    [PE2] ip vpn-instance a
    [PE2-vpn-instance-a] route-distinguisher 100:1
    [PE2-vpn-instance-a] vpn-target 100:1 export-extcommunity
    [PE2-vpn-instance-a] vpn-target 100:1 import-extcommunity
    [PE2-vpn-instance-a] quit
    

    # Enable IPv6 multicast routing for VPN instance a.

    [PE2] ipv6 multicast routing vpn-instance a
    [PE2-mrib6-a] quit
    

    # Create an MDT-based MVPN for VPN instance a.

    [PE2] multicast-mvpn vpn-instance a mode mdt
    

    # Create an MVPN IPv6 address family for VPN instance a.

    [PE2-mvpn-a] address-family ipv6
    

    # Specify the default-group, the MVPN source interface, and the data-group range for VPN instance a.

    [PE2-mvpn-a-ipv6] default-group 239.1.1.1
    [PE2-mvpn-a-ipv6] source loopback 1
    [PE2-mvpn-a-ipv6] data-group 225.2.2.0 28
    [PE2-mvpn-a-ipv6] quit
    [PE2-mvpn-a] quit
    

    # Assign an IP address to VLAN-interface 15.

    [PE2] interface vlan-interface 15
    [PE2-Vlan-interface15] ip address 192.168.7.1 24
    

    # Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 15.

    [PE2-Vlan-interface15] pim sm
    [PE2-Vlan-interface15] mpls enable
    [PE2-Vlan-interface15] mpls ldp enable
    [PE2-Vlan-interface15] quit
    

    # Associate VLAN-interface 13 with VPN instance b, and assign an IPv6 address to the interface.

    [PE2] interface vlan-interface 13
    [PE2-Vlan-interface13] ip binding vpn-instance b
    [PE2-Vlan-interface13] ipv6 address 10:110:3::1 64
    

    # Configure VLAN-interface 13 to run OSPFv3 process 3 in Area 0, and enable IPv6 PIM-SM on the interface.

    [PE2-Vlan-interface13] ospfv3 3 area 0.0.0.0
    [PE2-Vlan-interface13] ipv6 pim sm
    [PE2-Vlan-interface13] quit
    

    # Associate VLAN-interface 14 with VPN instance a, and assign an IPv6 address to the interface.

    [PE2] interface vlan-interface 14
    [PE2-Vlan-interface14] ip binding vpn-instance a
    [PE2-Vlan-interface14] ipv6 address 10:110::4::1 64
    

    # Configure VLAN-interface 14 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [PE2-Vlan-interface14] ospfv3 2 area 0.0.0.0
    [PE2-Vlan-interface14] ipv6 pim sm
    [PE2-Vlan-interface14] 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
    

    # Configure BGP.

    [PE2] bgp 100
    [PE2-bgp-default] group vpn-g internal
    [PE2-bgp-default] peer vpn-g connect-interface loopback 1
    [PE2-bgp-default] peer 1.1.1.1 group vpn-g
    [PE2-bgp-default] peer 1.1.1.3 group vpn-g
    [PE2–bgp-default] ip vpn-instance a
    [PE2-bgp-default-a] address-family ipv6
    [PE2-bgp-default-ipv6-a] import-route ospfv3 2
    [PE2-bgp-default-ipv6-a] import-route direct
    [PE2-bgp-default-ipv6-a] quit
    [PE2-bgp-default-a] quit
    [PE2–bgp-default] ip vpn-instance b
    [PE2-bgp-default-b] address-family ipv6
    [PE2-bgp-default-ipv6-b] import-route ospfv3 3
    [PE2-bgp-default-ipv6-b] import-route direct
    [PE2-bgp-default-ipv6-b] quit
    [PE2-bgp-default-b] quit
    [PE2–bgp-default] address-family vpnv6
    [PE2–bgp-default-vpnv6] peer vpn-g enable
    [PE2–bgp-default-vpnv6] 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 192.168.7.0 0.0.0.255
    [PE2-ospf-1-area-0.0.0.0] quit
    [PE2-ospf-1] quit
    

    # Configure OSPFv3.

    [PE2] ospfv3 2 vpn-instance a
    [PE2-ospfv3-2] router-id 2.2.2.2
    [PE2-ospfv3-2] import-route bgp4+
    [PE2-ospfv3-2] import-route direct
    [PE2-ospfv3-2] area 0
    [PE2-ospfv3-2-area-0.0.0.0] quit
    [PE2] ospfv3 3 vpn-instance b
    [PE2-ospfv3-3] router-id 3.3.3.3
    [PE2-ospfv3-3] import-route bgp4+
    [PE2-ospfv3-3] import-route direct
    [PE2-ospfv3-3] area 0
    
  3. Configure PE 3:

    # Configure a global RD, 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
    

    # Create service loopback group 1, and specify the multicast tunnel service for the group.

    [PE3] service-loopback group 1 type multicast-tunnel
    

    # Assign HundredGigE 1/0/4 to service loopback group 1. The interface does not belong to VLAN 17, VLAN 18, or VLAN 19.

    [PE3] interface hundredgige 1/0/4
    [PE3-HundredGigE1/0/4] port service-loopback group 1
    [PE3-HundredGigE1/0/4] quit
    

    # Configure an LSR ID, and enable LDP globally.

    [PE3] mpls lsr-id 1.1.1.3
    [PE3] mpls ldp
    [PE3-ldp] quit
    

    # Create a VPN instance named a, and configure the RD and route targets for the VPN instance.

    [PE3] ip vpn-instance a
    [PE3-vpn-instance-a] route-distinguisher 100:1
    [PE3-vpn-instance-a] vpn-target 100:1 export-extcommunity
    [PE3-vpn-instance-a] vpn-target 100:1 import-extcommunity
    [PE3-vpn-instance-a] quit
    

    # Enable IPv6 multicast routing for VPN instance a.

    [PE3] ipv6 multicast routing vpn-instance a
    [PE3-mrib6-a] quit
    

    # Create an MDT-based MVPN for VPN instance a.

    [PE3] multicast-mvpn vpn-instance a mode mdt
    

    # Create an MVPN IPv6 address family for VPN instance a.

    [PE3-mvpn-a] address-family ipv6
    

    # Specify the default-group, the MVPN source interface, and the data-group range for VPN instance a.

    [PE3-mvpn-a-ipv6] default-group 239.1.1.1
    [PE3-mvpn-a-ipv6] source loopback 1
    [PE3-mvpn-a-ipv6] data-group 225.2.2.0 28
    [PE3-mvpn-a-ipv6] quit
    [PE3-mvpn-a] quit
    

    # Create a VPN instance named b, and configure the RD and route targets for the VPN instance.

    [PE3] ip vpn-instance b
    [PE3-vpn-instance-b] route-distinguisher 200:1
    [PE3-vpn-instance-b] vpn-target 200:1 export-extcommunity
    [PE3-vpn-instance-b] vpn-target 200:1 import-extcommunity
    [PE3-vpn-instance-b] quit
    

    # Enable IPv6 multicast routing for VPN instance b.

    [PE3] ipv6 multicast routing vpn-instance b
    [PE3-mrib6-b] quit
    

    # Create an MDT-based MVPN for VPN instance b.

    [PE3] multicast-mvpn vpn-instance b mode mdt
    

    # Create an MVPN IPv6 address family for VPN instance a.

    [PE3-mvpn-b] address-family ipv6
    

    # Specify the default-group, the MVPN source interface, and the data-group range for VPN instance b.

    [PE3-mvpn-b-ipv6] default-group 239.2.2.2
    [PE3-mvpn-b-ipv6] source loopback 1
    [PE3-mvpn-b-ipv6] data-group 225.4.4.0 28
    [PE3-mvpn-b-ipv6] quit
    [PE3-mvpn-b] quit
    

    # Assign an IP address to VLAN-interface 19.

    [PE3] interface vlan-interface 19
    [PE3-Vlan-interface19] ip address 192.168.8.1 24
    

    # Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 19.

    [PE3-Vlan-interface19] pim sm
    [PE3-Vlan-interface19] mpls enable
    [PE3-Vlan-interface19] mpls ldp enable
    [PE3-Vlan-interface19] quit
    

    # Associate VLAN-interface 17 with VPN instance a, and assign an IPv6 address to the interface.

    [PE3] interface vlan-interface 17
    [PE3-Vlan-interface17] ip binding vpn-instance a
    [PE3-Vlan-interface17] ipv6 address 10:110:5::1 64
    

    # Configure VLAN-interface 17 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [PE3-Vlan-interface17] ospfv3 2 area 0.0.0.0
    [PE3-Vlan-interface17] ipv6 pim sm
    [PE3-Vlan-interface17] quit
    

    # Associate VLAN-interface 18 with VPN instance b, and assign an IPv6 address to the interface.

    [PE3] interface vlan-interface 18
    [PE3-Vlan-interface18] ip binding vpn-instance b
    [PE3-Vlan-interface18] ipv6 address 10:110:6::1 64
    

    # Configure VLAN-interface 18 to run OSPFv3 process 3 in Area 0, and enable IPv6 PIM-SM on the interface.

    [PE3-Vlan-interface18] ospfv3 3 area 0.0.0.0
    [PE3-Vlan-interface18] ipv6 pim sm
    [PE3-Vlan-interface18] 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
    

    # Associate Loopback 2 with VPN instance b, and assign an IPv6 address to the interface.

    [PE3] interface loopback 2
    [PE3-LoopBack2] ip binding vpn-instance b
    [PE3-LoopBack2] ipv6 address 33:33:33::33 128
    

    # Configure Loopback 2 to run OSPFv3 process 3 in Area 0, and enable IPv6 PIM-SM on the interface.

    [PE3-LoopBack2] ospfv3 3 area 0.0.0.0
    [PE3-LoopBack2] ipv6 pim sm
    [PE3-LoopBack2] quit
    

    # Configure Loopback 2 as a C-BSR and a C-RP.

    [PE3] ipv6 pim vpn-instance b
    [PE3-pim6-b] c-bsr 33:33:33::33
    [PE3-pim6-b] c-rp 33:33:33::33
    [PE3-pim6-b] quit
    

    # Configure BGP.

    [PE3] bgp 100
    [PE3-bgp-default] group vpn-g internal
    [PE3-bgp-default] peer vpn-g connect-interface loopback 1
    [PE3-bgp-default] peer 1.1.1.1 group vpn-g
    [PE3-bgp-default] peer 1.1.1.2 group vpn-g
    [PE3–bgp-default] ip vpn-instance a
    [PE3-bgp-default-a] address-family ipv6
    [PE3-bgp-default-ipv6-a] import-route ospfv3 2
    [PE3-bgp-default-ipv6-a] import-route direct
    [PE3-bgp-default-ipv6-a] quit
    [PE3-bgp-default-a] quit
    [PE3–bgp-default] ip vpn-instance b
    [PE3-bgp-default-b] address-family ipv6
    [PE3-bgp-default-ipv6-b] import-route ospfv3 3
    [PE3-bgp-default-ipv6-b] import-route direct
    [PE3-bgp-default-ipv6-b] quit
    [PE3-bgp-default-b] quit
    [PE3–bgp-default] address-family vpnv6
    [PE3–bgp-default-vpnv6] peer vpn-g enable
    [PE3–bgp-default-vpnv6] 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 192.168.8.0 0.0.0.255
    [PE3-ospf-1-area-0.0.0.0] quit
    [PE3-ospf-1] quit
    

    # Configure OSPFv3.

    [PE3] ospfv3 2 vpn-instance a
    [PE3-ospfv3-2] router-id 4.4.4.4
    [PE3-ospfv3-2] import-route bgp4+
    [PE3-ospfv3-2] import-route direct
    [PE3-ospfv3-2]  area 0
    [PE3-ospfv3-2-area-0.0.0.0] quit
    [PE3] ospfv3 3 vpn-instance b
    [PE3-ospfv3-3] router-id 5.5.5.5
    [PE3-ospfv3-3] import-route bgp4+
    [PE3-ospfv3-3] import-route direct
    [PE3-ospfv3-3]  area 0
    
  4. Configure P:

    # Enable IP multicast routing on the public network.

    <P> system-view
    [P] multicast routing
    [P-mrib] quit
    

    # Configure an LSR ID, and enable LDP globally.

    [P] mpls lsr-id 2.2.2.2
    [P] mpls ldp
    [P-ldp] quit
    

    # Assign an IP address to VLAN-interface 12.

    [P] interface vlan-interface 12
    [P-Vlan-interface12] ip address 192.168.6.2 24
    

    # Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 12.

    [P-Vlan-interface12] pim sm
    [P-Vlan-interface12] mpls enable
    [P-Vlan-interface12] mpls ldp enable
    [P-Vlan-interface12] quit
    

    # Assign an IP address to VLAN-interface 15.

    [P] interface vlan-interface 15
    [P-Vlan-interface15] ip address 192.168.7.2 24
    

    # Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 15.

    [P-Vlan-interface15] pim sm
    [P-Vlan-interface15] mpls enable
    [P-Vlan-interface15] mpls ldp enable
    [P-Vlan-interface15] quit
    

    # Assign an IP address to VLAN-interface 19.

    [P] interface vlan-interface 19
    [P-Vlan-interface19] ip address 192.168.8.2 24
    

    # Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 19.

    [P-Vlan-interface19] pim sm
    [P-Vlan-interface19] mpls enable
    [P-Vlan-interface19] mpls ldp enable
    [P-Vlan-interface19] quit
    

    # Assign an IP address to Loopback 1, and enable PIM-SM on the interface.

    [P] interface loopback 1
    [P-LoopBack1] ip address 2.2.2.2 32
    [P-LoopBack1] pim sm
    [P-LoopBack1] quit
    

    # Configure Loopback 1 as a C-BSR and a C-RP.

    [P] pim
    [P-pim] c-bsr 2.2.2.2
    [P-pim] c-rp 2.2.2.2
    [P-pim] quit
    

    # Configure OSPF.

    [P] ospf 1
    [P-ospf-1] area 0.0.0.0
    [P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
    [P-ospf-1-area-0.0.0.0] network 192.168.6.0 0.0.0.255
    [P-ospf-1-area-0.0.0.0] network 192.168.7.0 0.0.0.255
    [P-ospf-1-area-0.0.0.0] network 192.168.8.0 0.0.0.255
    
  5. Configure CE a1:

    # Enable IPv6 multicast routing.

    <CEa1> system-view
    [CEa1] ipv6 multicast routing
    [CEa1-mrib6] quit
    

    # Assign an IPv6 address to VLAN-interface 10.

    [CEa1] interface vlan-interface 10
    [CEa1-Vlan-interface10] ipv6 address 10:110:7::1 64
    

    # Configure VLAN-interface 10 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEa1-Vlan-interface10] ospfv3 2 area 0.0.0.0
    [CEa1-Vlan-interface10] ipv6 pim sm
    [CEa1-Vlan-interface10] quit
    

    # Assign an IPv6 address to VLAN-interface 11.

    [CEa1] interface vlan-interface 11
    [CEa1-Vlan-interface11] ipv6 address 10:110:2::2 64
    

    # Configure VLAN-interface 11 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEa1-Vlan-interface11] ospfv3 2 area 0.0.0.0
    [CEa1-Vlan-interface11] ipv6 pim sm
    [CEa1-Vlan-interface11] quit
    

    # Configure OSPFv3.

    [CEa1] ospfv3 2
    [CEa1-ospfv3-2] router-id 6.6.6.6
    [CEa1-ospfv3-2] area 0
    [CEa1-ospfv3-2-area-0.0.0.0] quit
    
  6. Configure CE b1:

    # Enable IPv6 multicast routing.

    <CEb1> system-view
    [CEb1] ipv6 multicast routing
    [CEb1-mrib6] quit
    

    # Assign an IPv6 address to VLAN-interface 30.

    [[CEb1] interface vlan-interface 30
    [CEb1-Vlan-interface30] ipv6 address 10:110:8::1 64
    

    # Configure VLAN-interface 30 to run OSPFv3 process 3 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEb1-Vlan-interface30] ospfv3 3 area 0.0.0.0
    [CEb1-Vlan-interface30] ipv6 pim sm
    [CEb1-Vlan-interface30] quit
    

    # Assign an IPv6 address to VLAN-interface 13.

    [CEb1] interface vlan-interface 13
    [CEb1-Vlan-interface13] ipv6 address 10:110:3::2 24
    

    # Configure VLAN-interface 13 to run OSPFv3 process 3 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEb1-Vlan-interface13] ospfv3 3 area 0.0.0.0
    [CEb1-Vlan-interface13] ipv6 pim sm
    [CEb1-Vlan-interface13] quit
    

    # Configure OSPFv3.

    [CEb1] ospfv3 3
    [CEb1-ospfv3-3] router-id 7.7.7.7
    [CEb1-ospfv3-3] area 0
    [CEb1-ospfv3-3-area-0.0.0.0] quit
    
  7. Configure CE a2:

    # Enable IPv6 multicast routing.

    <CEa2> system-view
    [CEa2] ipv6 multicast routing
    [CEa2-mrib6] quit
    

    # Assign an IPv6 address to VLAN-interface 40.

    [CEa2] interface vlan-interface 40
    [CEa2-Vlan-interface40] ipv6 address 10:110:9::1 64
    

    # Configure VLAN-interface 40 to run OSPFv3 process 2 in Area 0, and enable MLD on the interface.

    [CEa2-Vlan-interface40] ospfv3 2 area 0.0.0.0
    [CEa2-Vlan-interface40] mld enable
    [CEa2-Vlan-interface40] quit
    

    # Assign an IPv6 address to VLAN-interface 14.

    [CEa2] interface vlan-interface 14
    [CEa2-Vlan-interface14] ipv6 address 10:110:4::2 64
    

    # Configure VLAN-interface 14 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEa2-Vlan-interface14] ospfv3 2 area 0.0.0.0
    [CEa2-Vlan-interface14] ipv6 pim sm
    [CEa2-Vlan-interface14] quit
    

    # Assign an IPv6 address to VLAN-interface 16.

    [CEa2] interface vlan-interface 16
    [CEa2-Vlan-interface16] ipv6 address 10:110:12::1 64
    

    # Configure VLAN-interface 16 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEa2-Vlan-interface16] ospfv3 2 area 0.0.0.0
    [CEa2-Vlan-interface16] ipv6 pim sm
    [CEa2-Vlan-interface16] quit
    

    # Assign an IPv6 address to Loopback 1.

    [CEa2] interface loopback 1
    [CEa2-LoopBack1] ipv6 address 22:22:22::22 128
    

    # Configure Loopback 1 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEa2-LoopBack1] ospfv3 2 area 0.0.0.0
    [CEa2-LoopBack1] ipv6 pim sm
    [CEa2-LoopBack1] quit
    

    # Configure Loopback 1 as a C-BSR and a C-RP.

    [CEa2] pim6
    [CEa2-pim6] c-bsr 22:22:22::22
    [CEa2-pim6] c-rp 22:22:22::22
    [CEa2-pim6] quit
    

    # Configure OSPFv3.

    [CEa2] ospfv3 2
    [CEa2-ospfv3-2] router-id 8.8.8.8
    [CEa2-ospfv3-2] area 0
    [CEa2-ospfv3-2-area-0.0.0.0] quit
    
  8. Configure CE a3:

    # Enable IPv6 multicast routing.

    <CEa3> system-view
    [CEa3] ipv6 multicast routing
    [CEa3-mrib6] quit
    

    # Assign an IPv6 address to VLAN-interface 50.

    [CEa3] interface vlan-interface 50
    [CEa3-Vlan-interface50] ipv6 address 10:110:10::1 64
    

    # Configure VLAN-interface 50 to run OSPFv3 process 2 in Area 0, and enable MLD on the interface.

    [CEa3-Vlan-interface50] ospfv3 2 area 0.0.0.0
    [CEa3-Vlan-interface50] mld enable
    [CEa3-Vlan-interface50] quit
    

    # Assign an IPv6 address to VLAN-interface 17.

    [CEa3] interface vlan-interface 17
    [CEa3-Vlan-interface17] ipv6 address 10:110:5::2 64
    

    # Configure VLAN-interface 17 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEa3-Vlan-interface17] ospfv3 2 area 0.0.0.0
    [CEa3-Vlan-interface17] ipv6 pim sm
    [CEa3-Vlan-interface17] quit
    

    # Assign an IPv6 address to VLAN-interface 16.

    [CEa3] interface vlan-interface 16
    [CEa3-Vlan-interface16] ipv6 address 10:110:12::2 64
    

    # Configure VLAN-interface 16 to run OSPFv3 process 2 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEa3-Vlan-interface16] ospfv3 2 area 0.0.0.0
    [CEa3-Vlan-interface16] ipv6 pim sm
    [CEa3-Vlan-interface16] quit
    

    # Configure OSPFv3.

    [CEa3] ospfv3 2
    [CEa3-ospfv3-2] router-id 9.9.9.9
    [CEa3-ospfv3-2] area 0
    [CEa3-ospfv3-2-area-0.0.0.0] quit
    
  9. Configure CE b2:

    # Enable IPv6 multicast routing.

    <CEb2> system-view
    [CEb2] multicast routing
    [CEb2-mrib] quit
    

    # Assign an IPv6 address to VLAN-interface 60.

    [CEb2] interface vlan-interface 60
    [CEb2-Vlan-interface60] ipv6 address 10:110:11::1 64
    

    # Configure VLAN-interface 60 to run OSPFv3 process 3 in Area 0, and enable MLD on the interface.

    [CEb2-Vlan-interface60] ospfv3 3 area 0.0.0.0
    [CEb2-Vlan-interface60] mld enable
    [CEb2-Vlan-interface60] quit
    

    # Assign an IPv6 address to VLAN-interface 18.

    [CEb2] interface vlan-interface 18
    [CEb2-Vlan-interface18] ipv6 address 10:110:6::2 64
    

    # Configure VLAN-interface 18 to run OSPFv3 process 3 in Area 0, and enable IPv6 PIM-SM on the interface.

    [CEb2-Vlan-interface18] ospfv3 3 area 0.0.0.0
    [CEb2-Vlan-interface18] ipv6 pim sm
    [CEb2-Vlan-interface18] quit
    

    # Configure OSPFv3.

    [CEb2] ospfv3 3
    [CEb2-ospfv3-3] router-id 10.10.10.10
    [CEb2-ospfv3-3] area 0
    [CEb2-ospfv3-3-area-0.0.0.0] quit
    

Verifying the configuration

# Display information about the local default-group for IPv6 multicast transmission in each VPN instance on PE 1.

[PE1] display multicast-mvpn default-group ipv6 local
MVPN local default-group information:
Group address    Source address   Interface     VPN instance
239.1.1.1        1.1.1.1          MTunnel0      a

# Display information about the local default-group for IPv6 multicast transmission in each VPN instance on PE 2.

[PE2] display multicast-mvpn default-group ipv6 local
MVPN local default-group information:
Group address    Source address   Interface     VPN instance
239.1.1.1        1.1.1.2          MTunnel0      a
239.1.1.1        1.1.1.2          MTunnel1      b

# Display information about the local default-group for IPv6 multicast transmission in each VPN instance on PE 3.

[PE3] display multicast-mvpn default-group ipv6 local
MVPN local default-group information:
Group address    Source address   Interface     VPN instance
239.1.1.1        1.1.1.3          MTunnel0      a
239.2.2.2        1.1.1.3          MTunnel1      b