No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CLI-based Configuration Guide - VPN

AR650, AR1600, and AR6100 V300R003

This document describes VPN features on the device and provides configuration procedures and configuration examples.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring a GRE Tunnel to Implement Interworking Between IPv6 Networks

Example for Configuring a GRE Tunnel to Implement Interworking Between IPv6 Networks

Networking Requirements

As shown in Figure 2-13, RouterA and RouterC on IPv6 networks connect to RouterB on an IPv4 network. PC1 and PC2 on the two IPv6 networks need to communicate with each other.

PC1 and PC2 use RouterA and RouterC as their default gateways respectively.

Figure 2-13  Configuring a GRE tunnel to implement interworking between IPv6 networks

Configuration Roadmap

To allow PC1 and PC2 on the IPv6 networks to communicate with each other, you can configure a direct link between RouterA and RouterC to set up a GRE tunnel and configure a static route to forward packets through tunnel interfaces to the peer.

The configuration roadmap is as follows:

  1. Configure IP addresses for physical interfaces and configure an IPv4 static route to implement interworking over the IPv4 network.

  2. Create tunnel interfaces on RouterA and RouterC to set up a GRE tunnel, and configure an IPv6 static route passing through tunnel interfaces on RouterA and RouterC, so that traffic between PC1 and PC2 can be transmitted over the GRE tunnel.

Procedure

  1. Configure an IP address for each physical interface.

    # Configure RouterA.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 20.1.1.1 255.255.255.0
    [RouterA-GigabitEthernet1/0/0] quit
    [RouterA] ipv6
    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] ipv6 enable
    [RouterA-GigabitEthernet2/0/0] ipv6 address FC01::1 64
    [RouterA-GigabitEthernet2/0/0] quit

    # Configure RouterB.

    <Huawei> system-view
    [Huawei] sysname RouterB
    [RouterB] interface gigabitethernet 1/0/0
    [RouterB-GigabitEthernet1/0/0] ip address 20.1.1.2 255.255.255.0
    [RouterB-GigabitEthernet1/0/0] quit
    [RouterB] interface gigabitethernet 2/0/0
    [RouterB-GigabitEthernet2/0/0] ip address 30.1.1.1 255.255.255.0
    [RouterB-GigabitEthernet2/0/0] quit

    # Configure RouterC.

    <Huawei> system-view
    [Huawei] sysname RouterC
    [RouterC] interface gigabitethernet 1/0/0
    [RouterC-GigabitEthernet1/0/0] ip address 30.1.1.2 255.255.255.0
    [RouterC-GigabitEthernet1/0/0] quit
    [RouterC] ipv6
    [RouterC] interface gigabitethernet 2/0/0
    [RouterC-GigabitEthernet2/0/0] ipv6 enable
    [RouterC-GigabitEthernet2/0/0] ipv6 address FC21::1 64
    [RouterC-GigabitEthernet2/0/0] quit

  2. Configure an IPv4 static route.

    # Configure RouterA.

    [RouterA] ip route-static 30.1.1.2 255.255.255.0 20.1.1.2

    # Configure RouterC.

    [RouterC] ip route-static 20.1.1.1 255.255.255.0 30.1.1.1

  3. Configure a tunnel interface.

    # Configure RouterA.

    [RouterA] interface tunnel 0/0/1
    [RouterA-Tunnel0/0/1] tunnel-protocol gre
    [RouterA-Tunnel0/0/1] ipv6 enable
    [RouterA-Tunnel0/0/1] ipv6 address FC11::1 64
    [RouterA-Tunnel0/0/1] source 20.1.1.1
    [RouterA-Tunnel0/0/1] destination 30.1.1.2
    [RouterA-Tunnel0/0/1] quit

    # Configure RouterC.

    [RouterC] interface tunnel 0/0/1
    [RouterC-Tunnel0/0/1] tunnel-protocol gre
    [RouterC-Tunnel0/0/1] ipv6 enable
    [RouterC-Tunnel0/0/1] ipv6 address FC11::2 64
    [RouterC-Tunnel0/0/1] source 30.1.1.2
    [RouterC-Tunnel0/0/1] destination 20.1.1.1
    [RouterC-Tunnel0/0/1] quit

  4. Configure a static tunnel route.

    # Configure RouterA.

    [RouterA] ipv6 route-static FC21::1 64 tunnel 0/0/1

    # Configure RouterC.

    [RouterC] ipv6 route-static FC01::1 64 tunnel 0/0/1

  5. Verify the configuration.

    # Ping the IPv4 address of RouterA from RouerC. RouterC can receive a Reply packet from RouterA.

    [RouterC] ping 20.1.1.1
      PING 20.1.1.1: 56  data bytes, press CTRL_C to break
        Reply from 20.1.1.1: bytes=56 Sequence=1 ttl=255 time=84 ms
        Reply from 20.1.1.1: bytes=56 Sequence=2 ttl=255 time=27 ms
        Reply from 20.1.1.1: bytes=56 Sequence=3 ttl=255 time=25 ms
        Reply from 20.1.1.1: bytes=56 Sequence=4 ttl=255 time=3 ms
        Reply from 20.1.1.1: bytes=56 Sequence=5 ttl=255 time=24 ms
    
      --- 20.1.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 3/32/84 ms

    # Ping the IPv6 address of RouterA from RouerC. RouterC can receive a Reply packet from RouterA.

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

Configuration Files

  • Configuration file of RouterA

    #
     sysname RouterA
    #
    ipv6
    #
    interface GigabitEthernet1/0/0
     ip address 20.1.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ipv6 enable
     ipv6 address FC01::1/64
    #
    interface Tunnel0/0/1
     ipv6 enable
     ipv6 address FC11::1/64
     tunnel-protocol gre
     source 20.1.1.1
     destination 30.1.1.2
    #
    ip route-static 30.1.1.0 255.255.255.0 20.1.1.2
    #                                                                               
    ipv6 route-static FC21:: 64 Tunnel0/0/1 
    #
    return
  • Configuration file of RouterB

    #
     sysname RouterB
    #
    interface GigabitEthernet1/0/0
     ip address 20.1.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 30.1.1.1 255.255.255.0
    #
    return
  • Configuration file of RouterC

    #
     sysname RouterC
    #
    ipv6
    #
    interface GigabitEthernet1/0/0
     ip address 30.1.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ipv6 enable
     ipv6 address FC21::1/64
    #
    interface Tunnel0/0/1
     ipv6 enable
     ipv6 address FC11::2/64
     tunnel-protocol gre
     source 30.1.1.2
     destination 20.1.1.1
    #
    ip route-static 20.1.1.0 255.255.255.0 30.1.1.1
    #                                                                               
    ipv6 route-static FC01:: 64 Tunnel0/0/1 
    #
    return
Download
Updated: 2019-04-12

Document ID: EDOC1100041799

Views: 31584

Downloads: 45

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next