< Home

Example for Configuring 6PE

Networking Requirements

In Figure 1, PE1 and PE2 support 6PE, and CE1 and CE2 support the IPv6 protocol. A carrier's IPv4/MPLS backbone network exists between PE1 and PE2. The IPv4/MPLS backbone network runs OSPF. IPv4 IBGP connections are set up between PEs. CE1 and CE2 are located on two IPv6 networks respectively. PEs and CEs use IPv6 addresses to exchange route information through static routes.

6PE must be configured to connect IPv6 networks through the IPv4/MPLS backbone network.

Figure 1 Networking diagram for configuring 6PE

Configuration Roadmap

The configuration roadmap is as follows:

  1. Enable IPv6 and configure an IPv4/IPv6 dual stack.

  2. Enable MPLS.

  3. Configure a 6PE peer.

  4. Configure IPv6 addresses for CE interfaces and static routes.

Procedure

  1. Enable IPv6 and configure an IPv4/IPv6 dual stack.

    # Enable IPv6 on PE1.

    <HUAWEI> system-view
    [HUAWEI] sysname PE1
    [PE1] ipv6

    # Enable IPv6 on PE2.

    <HUAWEI> system-view
    [HUAWEI] sysname PE2
    [PE2] ipv6

    # Configure an IPv6 address for VLANIF 100 on PE1 and an IP address for Loopback0.

    [PE1] vlan batch 100 200
    [PE1] interface gigabitethernet 0/0/1
    [PE1-GigabitEthernet0/0/1] port link-type hybrid
    [PE1-GigabitEthernet0/0/1] port hybrid pvid vlan 100
    [PE1-GigabitEthernet0/0/1] port hybrid untagged vlan 100
    [PE1-GigabitEthernet0/0/1] quit
    [PE1] interface vlanif 100
    [PE1-Vlanif100] ipv6 enable
    [PE1-Vlanif100] ipv6 address fc00:3::1 64
    [PE1-Vlanif100] quit
    [PE1] interface loopback 0
    [PE1-LoopBack0] ip address 1.1.1.9 255.255.255.255
    [PE1-LoopBack0] quit

    # Configure an IPv6 address for VLANIF 100 on PE2 and an IP address for Loopback0.

    [PE2] vlan batch 100 300
    [PE2] interface gigabitethernet 0/0/1
    [PE2-GigabitEthernet0/0/1] port link-type hybrid
    [PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 100
    [PE2-GigabitEthernet0/0/1] port hybrid untagged vlan 100
    [PE2-GigabitEthernet0/0/1] quit
    [PE2] interface vlanif 100
    [PE2-Vlanif100] ipv6 enable
    [PE2-Vlanif100] ipv6 address fc00:4::1 64
    [PE2-Vlanif100] quit
    [PE2] interface loopback 0
    [PE2-LoopBack0] ip address 2.2.2.9 255.255.255.255
    [PE2-LoopBack0] quit

  2. Enable MPLS.

    # Configure an IP address for VLANIF 200 on PE1 and enable MPLS and LDP.

    [PE1] mpls lsr-id 1.1.1.9
    [PE1] mpls
    [PE1-mpls] lsp-trigger all
    [PE1-mpls] quit
    [PE1] mpls ldp
    [PE1-mpls-ldp] quit
    [PE1] interface gigabitethernet 0/0/2
    [PE1-GigabitEthernet0/0/2] port link-type hybrid
    [PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 200
    [PE1-GigabitEthernet0/0/2] port hybrid untagged vlan 200
    [PE1-GigabitEthernet0/0/2] quit
    [PE1] interface vlanif 200
    [PE1-Vlanif200] ip address 4.3.3.1 255.255.255.0
    [PE1-Vlanif200] mpls
    [PE1-Vlanif200] mpls ldp
    [PE1-Vlanif200] quit

    # Configure an IP address for VLANIF 200 on PE2 and enable MPLS and LDP.

    [PE2] mpls lsr-id 2.2.2.9
    [PE2] mpls
    [PE2-mpls] lsp-trigger all
    [PE2-mpls] quit
    [PE2] mpls ldp
    [PE2-mpls-ldp] quit
    [PE2] interface gigabitethernet 0/0/2
    [PE2-GigabitEthernet0/0/2] port link-type hybrid
    [PE2-GigabitEthernet0/0/2] port hybrid pvid vlan 300
    [PE2-GigabitEthernet0/0/2] port hybrid untagged vlan 300
    [PE2-GigabitEthernet0/0/2] quit
    [PE2] interface vlanif 300
    [PE2-Vlanif300] ip address 4.3.4.2 255.255.255.0
    [PE2-Vlanif300] mpls
    [PE2-Vlanif300] mpls ldp
    [PE2-Vlanif300] quit

    # Configure VLANIF interfaces and an IP address for Loopback0 on P and enable MPLS and LDP.

    <HUAWEI> system-view
    [HUAWEI] sysname P
    [P] interface loopback 0
    [P-LoopBack0] ip address 3.3.3.9 255.255.255.255
    [P-LoopBack0] quit
    [P] mpls lsr-id 3.3.3.9
    [P] mpls
    [P-mpls] lsp-trigger all
    [P-mpls] quit
    [P] mpls ldp
    [P-mpls-ldp] quit
    [P] vlan batch 200 300
    [P] interface gigabitethernet 0/0/1
    [P-GigabitEthernet0/0/1] port link-type hybrid
    [P-GigabitEthernet0/0/1] port hybrid pvid vlan 200
    [P-GigabitEthernet0/0/1] port hybrid untagged vlan 200
    [P-GigabitEthernet0/0/1] quit
    [P] interface gigabitethernet 0/0/2
    [P-GigabitEthernet0/0/2] port link-type hybrid
    [P-GigabitEthernet0/0/2] port hybrid pvid vlan 300
    [P-GigabitEthernet0/0/2] port hybrid untagged vlan 300
    [P-GigabitEthernet0/0/2] quit
    [P] interface vlanif 200
    [P-Vlanif200] ip address 4.3.3.2 255.255.255.0
    [P-Vlanif200] mpls
    [P-Vlanif200] mpls ldp
    [P-Vlanif200] quit
    [P] interface vlanif 300
    [P-Vlanif300] ip address 4.3.4.1 255.255.255.0
    [P-Vlanif300] mpls
    [P-Vlanif300] mpls ldp
    [P-Vlanif300] quit

    # Configure OSPF on PE1 to trigger LSP setup.

    [PE1] ospf router-id 1.1.1.9
    [PE1-ospf-1] area 0
    [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
    [PE1-ospf-1-area-0.0.0.0] network 4.3.3.0 0.0.0.255
    [PE1-ospf-1-area-0.0.0.0] quit
    [PE1-ospf-1] quit

    # Configure OSPF on PE2 to trigger LSP setup.

    [PE2] ospf router-id 2.2.2.9
    [PE2-ospf-1] area 0
    [PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
    [PE2-ospf-1-area-0.0.0.0] network 4.3.4.0 0.0.0.255
    [PE2-ospf-1-area-0.0.0.0] quit
    [PE2-ospf-1] quit

    # Configure OSPF on P to trigger LSP setup.

    [P] ospf router-id 3.3.3.9
    [P-ospf-1] area 0
    [P-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
    [P-ospf-1-area-0.0.0.0] network 4.3.3.0 0.0.0.255
    [P-ospf-1-area-0.0.0.0] network 4.3.4.0 0.0.0.255
    [P-ospf-1-area-0.0.0.0] quit
    [P-ospf-1] quit

  3. Configure a 6PE peer.

    # Configure IBGP on PE1, enable 6PE capability for the peer, and import IPv6 direct routes.

    [PE1] bgp 65100
    [PE1-bgp] router-id 1.1.1.9
    [PE1-bgp] peer 2.2.2.9 as-number 65100
    [PE1-bgp] peer 2.2.2.9 connect-interface loopback 0
    [PE1-bgp] ipv6-family
    [PE1-bgp-af-ipv6] import-route direct
    [PE1-bgp-af-ipv6] peer 2.2.2.9 enable
    [PE1-bgp-af-ipv6] peer 2.2.2.9 label-route-capability
    [PE1-bgp-af-ipv6] quit
    [PE1-bgp] quit

    # Configure IBGP on PE2, enable 6PE capability for the peer, and import IPv6 direct routes.

    [PE2] bgp 65100
    [PE2-bgp] router-id 2.2.2.9
    [PE2-bgp] peer 1.1.1.9 as-number 65100
    [PE2-bgp] peer 1.1.1.9 connect-interface loopback 0
    [PE2-bgp] ipv6-family
    [PE2-bgp-af-ipv6] import-route direct
    [PE2-bgp-af-ipv6] peer 1.1.1.9 enable
    [PE2-bgp-af-ipv6] peer 1.1.1.9 label-route-capability
    [PE2-bgp-af-ipv6] quit
    [PE2-bgp] quit

  4. Configure IPv6 addresses for CE interfaces and static routes.

    # Configure CE1 to set up an IPv6 connection with PE1.

    <HUAWEI> system-view
    [HUAWEI] sysname CE1
    [CE1] ipv6
    [CE1] vlan batch 100
    [CE1] interface gigabitethernet 0/0/1
    [CE1-GigabitEthernet0/0/1] port link-type hybrid
    [CE1-GigabitEthernet0/0/1] port hybrid pvid vlan 100
    [CE1-GigabitEthernet0/0/1] port hybrid untagged vlan 100
    [CE1-GigabitEthernet0/0/1] quit
    [CE1] interface vlanif 100
    [CE1-Vlanif100] ipv6 enable
    [CE1-Vlanif100] ipv6 address fc00:3::2 64
    [CE1-Vlanif100] quit
    [CE1] ipv6 route-static :: 0 fc00:3::1

    # Configure CE2 to set up an IPv6 connection with PE2.

    <HUAWEI> system-view
    [HUAWEI] sysname CE2
    [CE2] ipv6
    [CE2] vlan batch 100
    [CE2] interface gigabitethernet 0/0/1
    [CE2-GigabitEthernet0/0/1] port link-type hybrid
    [CE2-GigabitEthernet0/0/1] port hybrid pvid vlan 100
    [CE2-GigabitEthernet0/0/1] port hybrid untagged vlan 100
    [CE2-GigabitEthernet0/0/1] quit
    [CE2] interface vlanif 100
    [CE2-Vlanif100] ipv6 enable
    [CE2-Vlanif100] ipv6 address fc00:4::2 64
    [CE2-Vlanif100] quit
    [CE2] ipv6 route-static :: 0 fc00:4::1

  5. Verify the configuration.

    # Ping the IPv6 address of CE2 from CE1.

    [CE1] ping ipv6 FC00:4::2
    PING FC00:4::2 : 56  data bytes, press CTRL_C to break
        Reply from FC00:4::2
        bytes=56 Sequence=1 hop limit=63  time = 50 ms
        Reply from FC00:4::2
        bytes=56 Sequence=2 hop limit=63  time = 1 ms
        Reply from FC00:4::2
        bytes=56 Sequence=3 hop limit=63  time = 1 ms
        Reply from FC00:4::2
        bytes=56 Sequence=4 hop limit=63  time = 1 ms
        Reply from FC00:4::2
        bytes=56 Sequence=5 hop limit=63  time = 1 ms
    
      --- FC00:4::2 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 1/10/50 ms 

Configuration Files

  • PE1 configuration file

    #
    sysname PE1
    #
    ipv6
    #
    vlan batch 100 200
    #
    mpls lsr-id 1.1.1.9
    mpls
     lsp-trigger all
    #
    mpls ldp
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address FC00:3::1/64
    #
    interface Vlanif200
     ip address 4.3.3.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
    #
    interface LoopBack0
     ip address 1.1.1.9 255.255.255.255
    #
    bgp 65100
     router-id 1.1.1.9
     peer 2.2.2.9 as-number 65100
     peer 2.2.2.9 connect-interface LoopBack0
     #
     ipv4-family unicast
      undo synchronization
      peer 2.2.2.9 enable
     #
     ipv6-family unicast
      undo synchronization
      import-route direct
      peer 2.2.2.9 enable
      peer 2.2.2.9 label-route-capability
    #
    ospf 1 router-id 1.1.1.9
     area 0.0.0.0
      network 1.1.1.9 0.0.0.0
      network 4.3.3.0 0.0.0.255
    #
    return
  • PE2 configuration file

    #
    sysname PE2
    #
    ipv6
    #
    vlan batch 100 300
    #
    mpls lsr-id 2.2.2.9
    mpls
     lsp-trigger all
    #
    mpls ldp
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address FC00:4::1/64
    #
    interface Vlanif300
     ip address 4.3.4.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 300
     port hybrid untagged vlan 300
    #
    interface LoopBack0
     ip address 2.2.2.9 255.255.255.255
    #
    bgp 65100
     router-id 2.2.2.9
     peer 1.1.1.9 as-number 65100
     peer 1.1.1.9 connect-interface LoopBack0
     #
     ipv4-family unicast
      undo synchronization
      peer 1.1.1.9 enable
     #
     ipv6-family unicast
      undo synchronization
      import-route direct
      peer 1.1.1.9 enable
      peer 1.1.1.9 label-route-capability
    #
    ospf 1 router-id 2.2.2.9
     area 0.0.0.0
      network 2.2.2.9 0.0.0.0
      network 4.3.4.0 0.0.0.255
    #
    return
  • P configuration file

    #
    sysname P
    #
    vlan batch 200 300
    #
    mpls lsr-id 3.3.3.9
    mpls
     lsp-trigger all
    #
    mpls ldp
    #
    interface Vlanif200
     ip address 4.3.3.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface Vlanif300
     ip address 4.3.4.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
    #
    interface GigabitEthernet0/0/2
     port link-type hybrid
     port hybrid pvid vlan 300
     port hybrid untagged vlan 300
    #
    interface LoopBack0
     ip address 3.3.3.9 255.255.255.255
    #
    ospf 1 router-id 3.3.3.9
     area 0.0.0.0
      network 3.3.3.9 0.0.0.0
      network 4.3.3.0 0.0.0.255
      network 4.3.4.0 0.0.0.255
    #
    return
  • CE1 configuration file

    #
    sysname CE1
    #
    ipv6
    #
    vlan batch 100
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address FC00:3::2/64
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    ipv6 route-static :: 0 FC00:3::1
    #
    return
  • CE2 configuration file

    #
    sysname CE2
    #
    ipv6
    #
    vlan batch 100
    #
    interface Vlanif100
     ipv6 enable
     ipv6 address FC00:4::2/64
    #
    interface GigabitEthernet0/0/1
     port link-type hybrid
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    ipv6 route-static :: 0 FC00:4::1
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic