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

Configuration Guide - VPN 01

NE05E and NE08E V300R003C10SPC500

This is NE05E and NE08E V300R003C10SPC500 Configuration Guide - VPN
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 IPv6 GRE Static Routes

Example for Configuring IPv6 GRE Static Routes

This section provides an example for configuring IPv6 GRE static routes. The configuration allows traffic between users to be transmitted over IPv6 GRE tunnels. Static routes are required between a device and its connected clients.

Networking Requirements

As shown in Figure 4-2, Device A, Device B, and Device C are on the VPN backbone network. OSPFv3 runs among them.

It is required that a static route be established between Device A and Device C. To meet such a requirement, configure an IPv6 GRE tunnel between Device A and Device C and specify the tunnel interface as the outbound interface of a static route so that PC1 and PC2 can communicate.

Device A and Device C are specified as the default gateways of PC1 and PC2, respectively.

Figure 4-2 Configuring IPv6 GRE static routes
NOTE:

Interface 1 and Interface 3 in this example stand for GE 0/1/0, GE 0/2/0, Tunnel 1, respectively.



Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure the NE to run a dynamic routing protocol to ensure IP connectivity.

  2. Create a tunnel interface on Device A and Device C. Specify the source and destination addresses of the tunnel. The source address is the IP address of the interface sending packets, and the destination address is the IP address of the interface receiving packets.

  3. To enable the tunnel to support routes, configure a network address for the tunnel interface.

  4. To enable traffic between PC1 and PC2 to be transmitted over an IPv6 GRE tunnel, configure static routes to the PCs connected to Device A and Device C with the outbound interface being the local tunnel interface.

Data Preparation

To complete the configuration, you need the following data:

  • Data for OSPFv3

  • IPv6 GRE tunnel's source and destination addresses and tunnel interface address

Procedure

  1. Configure the interface IP addresses.

    # Configure Device A.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] interface GigabitEthernet 0/1/0
    [~DeviceA-GigabitEthernet0/1/0] undo shutdown
    [~DeviceA-GigabitEthernet0/1/0] ipv6 enable
    [*DeviceA-GigabitEthernet0/1/0] ipv6 address 2001:db8:1::1/64
    [*DeviceA-GigabitEthernet0/1/0] quit
    [*DeviceA] commit
    [~DeviceA] interface GigabitEthernet 0/2/0
    [~DeviceA-GigabitEthernet0/2/0] undo shutdown
    [~DeviceA-GigabitEthernet0/2/0] ipv6 enable
    [*DeviceA-GigabitEthernet0/2/0] ipv6 address 2001:db8:3::1/64
    [*DeviceA-GigabitEthernet0/2/0] quit
    [*DeviceA] commit

    # Configure Device B.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceB
    [*HUAWEI] commit
    [~DeviceB] interface GigabitEthernet 0/1/0
    [~DeviceB-GigabitEthernet0/1/0] undo shutdown
    [~DeviceB-GigabitEthernet0/1/0] ipv6 enable
    [*DeviceB-GigabitEthernet0/1/0] ipv6 address 2001:db8:1::2/64
    [*DeviceB-GigabitEthernet0/1/0] quit
    [*DeviceB] commit
    [~DeviceB] interface GigabitEthernet 0/2/0
    [~DeviceB-GigabitEthernet0/2/0] undo shutdown
    [~DeviceB-GigabitEthernet0/2/0] ipv6 enable
    [*DeviceB-GigabitEthernet0/2/0] ipv6 address 2001:db8:2::2/64
    [*DeviceB-GigabitEthernet0/2/0] quit
    [*DeviceB] commit

    # Configure Device C.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceC
    [*HUAWEI] commit
    [~DeviceC] interface GigabitEthernet 0/1/0
    [~DeviceC-GigabitEthernet0/1/0] undo shutdown
    [~DeviceC-GigabitEthernet0/1/0] ipv6 enable
    [*DeviceC-GigabitEthernet0/1/0] ipv6 address 2001:db8:2::1/64
    [*DeviceC-GigabitEthernet0/1/0] quit
    [*DeviceC] commit
    [~DeviceC] interface GigabitEthernet 0/2/0
    [~DeviceC-GigabitEthernet0/2/0] undo shutdown
    [~DeviceC-GigabitEthernet0/2/0] ipv6 enable
    [*DeviceC-GigabitEthernet0/2/0] ipv6 address 2001:db8:4::1/64
    [*DeviceC-GigabitEthernet0/2/0] quit
    [*DeviceC] commit

  2. Configure an IGP on the VPN backbone network.

    # Configure Device A.

    [~DeviceA] ospfv3 1
    [*DeviceA-ospfv3-1] router-id 1.1.1.1
    [*DeviceA-ospfv3-1] area 0.0.0.0
    [*DeviceA-ospfv3-1-area-0.0.0.0] quit
    [*DeviceA-ospfv3-1] quit
    [*DeviceA] commit
    [~DeviceA] interface GigabitEthernet 0/1/0
    [*DeviceA-GigabitEthernet0/1/0] ospfv3 1 area 0.0.0.0
    [*DeviceA-GigabitEthernet0/1/0] quit
    [*DeviceA] commit

    # Configure Device B.

    [~DeviceB] ospfv3 1
    [*DeviceB-ospfv3-1] router-id 2.2.2.2
    [*DeviceB-ospfv3-1] area 0.0.0.0
    [*DeviceB-ospfv3-1-area-0.0.0.0] quit
    [*DeviceB-ospfv3-1] quit
    [*DeviceB] commit
    [~DeviceB] interface GigabitEthernet 0/1/0
    [*DeviceB-GigabitEthernet0/1/0] ospfv3 1 area 0.0.0.0
    [~DeviceB-GigabitEthernet0/1/0] quit
    [*DeviceB] commit
    [~DeviceB] interface GigabitEthernet 0/2/0
    [*DeviceB-GigabitEthernet0/2/0] ospfv3 1 area 0.0.0.0
    [*DeviceB-GigabitEthernet0/2/0] quit
    [*DeviceB] commit

    # Configure Device C.

    [~DeviceC] ospfv3 1
    [*DeviceC-ospfv3-1] router-id 3.3.3.3
    [*DeviceC-ospfv3-1] area 0.0.0.0
    [*DeviceC-ospfv3-1-area-0.0.0.0] quit
    [*DeviceC-ospfv3-1] quit
    [*DeviceC] commit
    [~DeviceC] interface GigabitEthernet 0/1/0
    [*DeviceC-GigabitEthernet0/1/0] ospfv3 1 area 0.0.0.0
    [*DeviceC-GigabitEthernet0/1/0] quit
    [*DeviceC] commit

    After the configuration is complete, run the display ipv6 routing-table command on Device A and Device C. The command output shows that they have learned the OSPFv3 routes destined for each other.

    The following example uses the command output on Device A.

    [~DeviceA] display ipv6 routing-table
    Routing Table : _public_
             Destinations : 9        Routes : 9
    
    Destination  : ::1                                     PrefixLength : 128
    NextHop      : ::1                                     Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : InLoopBack0                             Flags        : D
    
    Destination  : ::FFFF:127.0.0.0                        PrefixLength : 104
    NextHop      : ::FFFF:127.0.0.1                        Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : InLoopBack0                             Flags        : D
    
    Destination  : ::FFFF:127.0.0.1                        PrefixLength : 128
    NextHop      : ::1                                     Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : InLoopBack0                             Flags        : D
    
    Destination  : 2001:DB8:1::                            PrefixLength : 64
    NextHop      : 2001:DB8:1::1                           Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/1/0                    Flags        : D
    
    Destination  : 2001:DB8:1::1                           PrefixLength : 128
    NextHop      : ::1                                     Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/1/0                    Flags        : D
    
    Destination  : 2001:DB8:2::                            PrefixLength : 64
    NextHop      : FE80::3A00:10FF:FE03:0                  Preference   : 10
    Cost         : 2                                       Protocol     : OSPFv3
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/1/0                    Flags        : D
    
    Destination  : 2001:DB8:3::                            PrefixLength : 64
    NextHop      : 2001:DB8:3::1                           Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/2/0                    Flags        : D
    
    Destination  : 2001:DB8:3::1                           PrefixLength : 128
    NextHop      : ::1                                     Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/2/0                    Flags        : D
    
    Destination  : FE80::                                  PrefixLength : 10
    NextHop      : ::                                      Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : NULL0                                   Flags        : D      

  3. Configure tunnel interfaces.

    # Configure Device A.

    [~DeviceA] interface GigabitEthernet 0/1/0
    [*DeviceA-GigabitEthernet0/1/0] binding tunnel gre
    [*DeviceA-GigabitEthernet0/1/0] quit
    [*DeviceA] commit
    [~DeviceA] interface tunnel 1
    [*DeviceA-Tunnel1] tunnel-protocol gre ipv6
    [*DeviceA-Tunnel1] ipv6 enable
    [*DeviceA-Tunnel1] ipv6 address 2001:db8:5::1/64
    [*DeviceA-Tunnel1] source 2001:db8:1::1
    [*DeviceA-Tunnel1] destination 2001:db8:2::1
    [*DeviceA-Tunnel1] quit
    [*DeviceA] commit

    # Configure Device C.

    [~DeviceC] interface GigabitEthernet 0/1/0
    [*DeviceC-GigabitEthernet0/1/0] binding tunnel gre
    [*DeviceC-GigabitEthernet0/1/0] quit
    [*DeviceC] commit
    [~DeviceC] interface tunnel 1
    [*DeviceC-Tunnel1] tunnel-protocol gre ipv6
    [*DeviceC-Tunnel1] ipv6 enable
    [*DeviceC-Tunnel1] ipv6 address 2001:db8:5::2/64
    [*DeviceC-Tunnel1] source 2001:db8:2::1
    [*DeviceC-Tunnel1] destination 2001:db8:1::1
    [*DeviceC-Tunnel1] quit
    [*DeviceC] commit

    After the configuration is complete, the tunnel interfaces turn Up and can ping each other.

    The following example uses the command output on Device A.

    [~DeviceA] display ipv6 interface Tunnel1
    Tunnel1 current state : UP
    IPv6 protocol current state : UP
    IPv6 is enabled, link-local address is FE80::200:174:A191:F872
      Global unicast address(es):
        2001:DB8:5::1, subnet is 2001:DB8:5::/64
      Joined group address(es):
        FF02::1:FF00:1
        FF02::1:FF91:F872
        FF02::2
        FF02::1
      MTU is 1448 bytes
      ND DAD is enabled, number of DAD attempts: 1
      ND reachable time is 1200000 milliseconds
      ND retransmit interval is 1000 milliseconds
      Hosts use stateless autoconfig for addresses
    [~DeviceA] ping ipv6 -a 2001:db8:5::1 2001:db8:5::2
      PING 2001:DB8:5::2 : 56  data bytes, press CTRL_C to break
        Reply from 2001:DB8:5::2
        bytes=56 Sequence=1 hop limit=64 time=6 ms
        Reply from 2001:DB8:5::2
        bytes=56 Sequence=2 hop limit=64 time=5 ms
        Reply from 2001:DB8:5::2
        bytes=56 Sequence=3 hop limit=64 time=5 ms
        Reply from 2001:DB8:5::2
        bytes=56 Sequence=4 hop limit=64 time=6 ms
        Reply from 2001:DB8:5::2
        bytes=56 Sequence=5 hop limit=64 time=4 ms
    
      --- 2001:DB8:5::2 ping statistics---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max=4/5/6 ms 

  4. Configure IPv6 static routes.

    # Configure Device A.

    [~DeviceA] ipv6 route-static 2001:db8:4:: 64 tunnel1
    [*DeviceA] commit

    # Configure Device C.

    [~DeviceC] ipv6 route-static 2001:db8:3:: 64 tunnel1
    [*DeviceC] commit

  5. Verify the configuration.

    After the configuration is complete, run the display ipv6 routing-table command on Device A and Device C. The command output shows a static route from the tunnel interface to the use-side network segment.

    The following example uses the command output on Device A.

    [~DeviceA] display ipv6 routing-table
    Routing Table : _public_
             Destinations : 12       Routes : 12
    
    Destination  : ::1                                     PrefixLength : 128
    NextHop      : ::1                                     Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : InLoopBack0                             Flags        : D
    
    Destination  : ::FFFF:127.0.0.0                        PrefixLength : 104
    NextHop      : ::FFFF:127.0.0.1                        Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : InLoopBack0                             Flags        : D
    
    Destination  : ::FFFF:127.0.0.1                        PrefixLength : 128
    NextHop      : ::1                                     Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : InLoopBack0                             Flags        : D
    
    Destination  : 2001:DB8:1::                            PrefixLength : 64
    NextHop      : 2001:DB8:1::1                           Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/1/0                    Flags        : D
    
    Destination  : 2001:DB8:1::1                           PrefixLength : 128
    NextHop      : ::1                                     Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/1/0                    Flags        : D
    
    Destination  : 2001:DB8:2::                            PrefixLength : 64
    NextHop      : FE80::3A00:10FF:FE03:0                  Preference   : 10
    Cost         : 2                                       Protocol     : OSPFv3
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/1/0                    Flags        : D
    
    Destination  : 2001:DB8:3::                            PrefixLength : 64
    NextHop      : 2001:DB8:3::1                           Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/2/0                    Flags        : D
    
    Destination  : 2001:DB8:3::1                           PrefixLength : 128
    NextHop      : ::1                                     Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : GigabitEthernet0/2/0                    Flags        : D
    
    Destination  : 2001:DB8:4::                            PrefixLength : 64
    NextHop      : 2001:DB8:5::1                           Preference   : 60
    Cost         : 0                                       Protocol     : Static
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : Tunnel1                                 Flags        : D
    
    Destination  : 2001:DB8:5::                            PrefixLength : 64
    NextHop      : 2001:DB8:5::1                           Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : Tunnel101                                 Flags        : D
    
    Destination  : 2001:DB8:5::1                           PrefixLength : 128
    NextHop      : ::1                                     Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : Tunnel1                                 Flags        : D
    
    Destination  : FE80::                                  PrefixLength : 10
    NextHop      : ::                                      Preference   : 0
    Cost         : 0                                       Protocol     : Direct
    RelayNextHop : ::                                      TunnelID     : 0x0
    Interface    : NULL0                                   Flags        : D       

Configuration Files

  • Device A configuration file

    #
    sysname DeviceA
    #
    ospfv3 1
     router-id 1.1.1.1
     area 0.0.0.0  
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:1::1/64
     ospfv3 1 area 0.0.0.0
     binding tunnel gre 
    #
    interface GigabitEthernet0/2/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:3::1/64
    #
    interface Tunnel1
     ipv6 enable
     ipv6 address 2001:DB8:5::1/64
     tunnel-protocol gre ipv6
     source 2001:DB8:1::1
     destination 2001:DB8:2::1    
    #
    ipv6 route-static 2001:DB8:4:: 64 Tunnel1 
    #
    return
    
  • Device B configuration file

    #
    sysname DeviceB
    #
    ospfv3 1
     router-id 2.2.2.2
     area 0.0.0.0  
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:1::2/64
     ospfv3 1 area 0.0.0.0 
    #
    interface GigabitEthernet0/2/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:2::2/64
     ospfv3 1 area 0.0.0.0
    #
    return
  • Device C configuration file

    #
    sysname DeviceC
    #
    ospfv3 1
     router-id 3.3.3.3
     area 0.0.0.0   
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:2::1/64
     ospfv3 1 area 0.0.0.0
     binding tunnel gre
    #
    interface GigabitEthernet0/2/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:4::1/64 
    #
    interface Tunnel1
     ipv6 enable
     ipv6 address 2001:DB8:5::2/64
     tunnel-protocol gre ipv6
     source 2001:DB8:2::1
     destination 2001:DB8:1::1   
    #
    ipv6 route-static 2001:DB8:3:: 64 Tunnel1 
    #
    return
Translation
Download
Updated: 2019-01-14

Document ID: EDOC1100058925

Views: 32184

Downloads: 59

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