Configuration procedure

Assume that the system name of the MCE device is MCE, the system names of the edge devices of VPN 1 and VPN 2 are VR1 and VR2, and the system name of PE 1 is PE1.

  1. Configure the VPN instances on the MCE and PE 1:

    # On the MCE, configure VPN instances vpn1 and vpn2, and specify an RD and route targets for each VPN instance.

    <MCE> system-view
    [MCE] ip vpn-instance vpn1
    [MCE-vpn-instance-vpn1] route-distinguisher 10:1
    [MCE-vpn-instance-vpn1] vpn-target 10:1
    [MCE-vpn-instance-vpn1] quit
    [MCE] ip vpn-instance vpn2
    [MCE-vpn-instance-vpn2] route-distinguisher 20:1
    [MCE-vpn-instance-vpn2] vpn-target 20:1
    [MCE-vpn-instance-vpn2] quit
    

    # Bind VLAN-interface 10 to VPN instance vpn1, and configure an IPv6 address for the VLAN interface.

    [MCE] interface vlan-interface 10
    [MCE-Vlan-interface10] ip binding vpn-instance vpn1
    [MCE-Vlan-interface10] ipv6 address 2001:1::1 64
    [MCE-Vlan-interface10] quit
    

    # Bind VLAN-interface 20 to VPN instance vpn2, and configure an IPv6 address for the VLAN interface.

    [MCE] interface vlan-interface 20
    [MCE-Vlan-interface20] ip binding vpn-instance vpn2
    [MCE-Vlan-interface20] ipv6 address 2002:1::1 64
    [MCE-Vlan-interface20] quit
    

    # On PE 1, configure VPN instances vpn1 and vpn2, and specify an RD and route targets for each VPN instance.

    <PE1> system-view
    [PE1] ip vpn-instance vpn1
    [PE1-vpn-instance-vpn1] route-distinguisher 10:1
    [PE1-vpn-instance-vpn1] vpn-target 10:1
    [PE1-vpn-instance-vpn1] quit
    [PE1] ip vpn-instance vpn2
    [PE1-vpn-instance-vpn2] route-distinguisher 20:1
    [PE1-vpn-instance-vpn2] vpn-target 20:1
    [PE1-vpn-instance-vpn2] quit
    
  2. Configure routing between the MCE and VPN sites:

    The MCE is connected to VPN 1 directly, and no routing protocol is enabled in VPN 1. Therefore, you can configure IPv6 static routes.

    # On VR 1, assign IPv6 address 2001:1::2/64 to the interface connected to the MCE and 2012:1::2/64 to the interface connected to VPN 1. Add ports to VLANs. (Details not shown.)

    # On VR 1, configure a default route with the next hop being 2001:1::1.

    <VR1> system-view
    [VR1] ipv6 route-static :: 0 2001:1::1
    

    # On the MCE, configure an IPv6 static route to 2012:1::/64 with the next hop 2001:1::2. Bind the static route to VPN instance vpn1.

    [MCE] ipv6 route-static vpn-instance vpn1 2012:1:: 64 2001:1::2 
    

    # Run RIPng in VPN 2. Configure RIPng process 20 for VPN instance vpn2 on the MCE, so that the MCE can learn the routes of VPN 2 and add them to the routing table of VPN instance vpn2.

    [MCE] ripng 20 vpn-instance vpn2
    

    # Advertise subnet 2002:1::/64 through RIPng.

    [MCE] interface vlan-interface 20
    [MCE-Vlan-interface20] ripng 20 enable 
    [MCE-Vlan-interface20] quit
    

    # On VR 2, assign IPv6 address 2002:1::2/64 to the interface connected to the MCE and 2012::2/64 to the interface connected to VPN 2. (Details not shown.)

    # Configure RIPng, and advertise subnets 2012::/64 and 2002:1::/64.

    <VR2> system-view
    [VR2] ripng 20
    [VR2-ripng-20] quit
    [VR2] interface vlan-interface 20
    [VR2-Vlan-interface20] ripng 20 enable
    [VR2-Vlan-interface20] quit
    [VR2] interface vlan-interface 21
    [VR2-Vlan-interface21] ripng 20 enable
    [VR2-Vlan-interface21] quit
    

    # On the MCE, display the routing tables of VPN instances vpn1 and vpn2.

    [MCE] display ipv6 routing-table vpn-instance vpn1
    
    Destinations : 6 Routes : 6
    
    Destination: ::1/128                                     Protocol  : Direct
    NextHop    : ::1                                         Preference: 0
    Interface  : InLoop0                                     Cost      : 0
    
    Destination: 2001:1::/64                                 Protocol  : Direct
    NextHop    : ::                                          Preference: 0
    Interface  : Vlan10                                      Cost      : 0
    
    Destination: 2001:1::1/128                               Protocol  : Direct
    NextHop    : ::1                                         Preference: 0
    Interface  : InLoop0                                     Cost      : 0
    
    Destination: 2012:1::/64                                 Protocol  : Static
    NextHop    : 2001:1::2                                   Preference: 60
    Interface  : Vlan10                                      Cost      : 0
    
    Destination: FE80::/10                                   Protocol  : Direct
    NextHop    : ::                                          Preference: 0
    Interface  : NULL0                                       Cost      : 0
    
    Destination: FF00::/8                                    Protocol  : Direct
    NextHop    : ::                                          Preference: 0
    Interface  : NULL0                                       Cost      : 0
    [MCE] display ipv6 routing-table vpn-instance vpn2
    
    Destinations : 6 Routes : 6
    
    Destination: ::1/128                                     Protocol  : Direct
    NextHop    : ::1                                         Preference: 0
    Interface  : InLoop0                                     Cost      : 0
    
    Destination: 2002:1::/64                                 Protocol  : Direct
    NextHop    : ::                                          Preference: 0
    Interface  : Vlan20                                      Cost      : 0
    
    Destination: 2002:1::1/128                               Protocol  : Direct
    NextHop    : ::1                                         Preference: 0
    Interface  : InLoop0                                     Cost      : 0
    
    Destination: 2012::/64                                   Protocol  : RIPng
    NextHop    : FE80::20C:29FF:FE40:701                     Preference: 100
    Interface  : Vlan20                                      Cost      : 1
    
    Destination: FE80::/10                                   Protocol  : Direct
    NextHop    : ::                                          Preference: 0
    Interface  : NULL0                                       Cost      : 0
    
    Destination: FF00::/8                                    Protocol  : Direct
    NextHop    : ::                                          Preference: 0
    Interface  : NULL0                                       Cost      : 0
    

    The output shows that the MCE has learned the private route of VPN 2. The MCE maintains the routes of VPN 1 and VPN 2 in two different routing tables. In this way, routes from different VPNs are separated.

  3. Configure routing between the MCE and PE 1:

    # On the MCE, bind VLAN-interface 30 to VPN instance vpn1, and configure an IPv6 address for the VLAN interface.

    [MCE] interface vlan-interface 30
    [MCE-Vlan-interface30] ip binding vpn-instance vpn1
    [MCE-Vlan-interface30] ipv6 address 30::1 64
    [MCE-Vlan-interface30] quit
    

    # Bind VLAN-interface 40 to VPN instance vpn2, and configure an IPv6 address for the VLAN interface.

    [MCE] interface vlan-interface 40
    [MCE-Vlan-interface40] ip binding vpn-instance vpn2
    [MCE-Vlan-interface40] ipv6 address 40::1 64
    [MCE-Vlan-interface40] quit
    

    # On PE 1, bind VLAN-interface 30 to VPN instance vpn1, and configure an IPv6 address for the VLAN interface.

    [PE1] interface vlan-interface 30
    [PE1-Vlan-interface30] ip binding vpn-instance vpn1
    [PE1-Vlan-interface30] ipv6 address 30::2 64
    [PE1-Vlan-interface30] quit
    

    # Bind VLAN-interface 40 to VPN instance vpn2, and configure an IPv6 address for the VLAN interface.

    [PE1] interface vlan-interface 40
    [PE1-Vlan-interface40] ip binding vpn-instance vpn2
    [PE1-Vlan-interface40] ipv6 address 40::2 64
    [PE1-Vlan-interface40] quit
    

    # Configure the IP address of the interface Loopback 0 as 101.101.10.1 for the MCE and as 100.100.10.1 for PE 1. Specify the loopback interface address as the router ID for the MCE and PE 1. (Details not shown.)

    # Enable OSPFv3 process 10 on the MCE, and bind the process to VPN instance vpn1.

    [MCE] ospfv3 10 vpn-instance vpn1
    

    # Redistribute the IPv6 static route of VPN 1.

    [MCE-ospf-10] router-id 101.101.10.1
    [MCE-ospf-10] import-route static
    [MCE-ospf-10] quit
    

    # Enable OSPFv3 on VLAN-interface 30.

    [MCE] interface vlan-interface 30
    [MCE-Vlan-interface30] ospfv3 10 area 0.0.0.0
    [MCE-Vlan-interface30] quit
    

    # On PE 1, enable OSPFv3 process 10 and bind the process to VPN instance vpn1.

    [PE1] ospfv3 10 vpn-instance vpn1
    [PE1-ospf-10] router-id 100.100.10.1
    [PE1-ospf-10] quit
    

    # Enable OSPFv3 on VLAN-interface 30.

    [PE1] interface vlan-interface 30
    [PE1-Vlan-interface30] ospfv3 10 area 0.0.0.0
    [PE1-Vlan-interface30] quit
    

    # Configure OSPFv3 process 20 between the MCE and PE 1. (Details not shown.)

    # Redistribute VPN 2's routes from RIPng process 20 into the OSPFv3 routing table of the MCE. (Details not shown.)