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 a Dynamic Routing Protocol for GRE

Example for Configuring a Dynamic Routing Protocol for GRE

This section provides an example for configuring a dynamic route for GRE. In this networking scheme, traffic between users is transmitted through a GRE tunnel; a dynamic route is configured between the device and its connected user.

Networking Requirements

In Figure 3-5, Device A, Device B, and Device C belong to the VPN backbone network and OSPF runs between them.

GRE is enabled between Device A and Device C for the interworking between PC1 and PC2.

OSPF is enabled on the tunnel interface. OSPF process 1 is used for the VPN backbone network, and OSPF process 2 is used for user access.

PC1 takes Device A as its default gateway, and PC2 takes Device C as its default gateway.

Figure 3-5 Networking diagram of configuring a dynamic routing protocol for GRE
NOTE:

Interfaces 1 and 3 in this example are GE 0/1/0, GE 0/2/0, and Tunnel 1, respectively



Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure IGP on each NE in the backbone network to realize the interworking between these devices. Here OSPF process 1 is used.

  2. Create the GRE tunnel between NEs that are connected to PCs.Then NEs can communicate through the GRE tunnel.

  3. Configure the dynamic routing protocol on the network segments through which PCs access the backbone network. Here OSPF process 2 is used.

Data Preparation

To complete the configuration, you need the following data:

  • Source address and destination address of the GRE tunnel

  • IP addresses of the interfaces on both ends of the GRE tunnel

Procedure

  1. Assign an IP address to each interface.

    Assign an IP address to each interface as shown in Figure 3-5. The specific configuration is not mentioned here.

  2. Configure IGP for the VPN backbone network.

    The specific configuration procedures are the same as those in Example for Configuring a Static Route for GRE and are not mentioned here.

  3. Configuring the tunnel interfaces

    The specific configuration procedures are the same as those in Example for Configuring a Static Route for GRE and are not mentioned here.

  4. Configure OSPF on the tunnel interfaces.

    # Configure Device A.

    [~DeviceA] ospf 2
    [*DeviceA-ospf-2] area 0
    [*DeviceA-ospf-2-area-0.0.0.0] network 40.1.1.0 0.0.0.255
    [*DeviceA-ospf-2-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*DeviceA-ospf-2-area-0.0.0.0] quit
    [*DeviceA-ospf-2] quit
    [*DeviceA] commit

    # Configure Device C.

    [~DeviceC] ospf 2
    [*DeviceC-ospf-2] area 0
    [*DeviceC-ospf-2-area-0.0.0.0] network 40.1.1.0 0.0.0.255
    [*DeviceC-ospf-2-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [*DeviceC-ospf-2-area-0.0.0.0] quit
    [*DeviceC-ospf-2] quit
    [*DeviceC] commit

  5. Verify the configuration.

    After the configuration, run the display ip routing-table command on Device A and Device C. The command output shows the OSPF route to the network segment of the remote user end through the tunnel interface. Moreover, the next hop to the destination physical address (30.1.1.0/24) of the tunnel is not the tunnel interface.

    Take Device A as an example:

    [~DeviceA] display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ------------------------------------------------------------------------------
    Routing Table : _public_
             Destinations : 15       Routes : 15
    
    Destination/Mask    Proto   Pre  Cost        Flags NextHop         Interface
    
            1.1.1.9/32  Direct  0    0             D  127.0.0.1       InLoopBack0
            2.2.2.9/24  OSPF    10   2             D  20.1.1.2        Vlanif10
           10.1.1.0/24  Direct  0    0             D  10.1.1.2        Vlanif20
           10.1.1.2/32  Direct  0    0             D  127.0.0.1       Vlanif20
         10.1.1.255/32  Direct  0    0             D  127.0.0.1       Vlanif20
          10.2.1.0/24  OSPF   10  2             D  40.1.1.2       Tunnel1
           20.1.1.0/24  Direct  0    0             D  20.1.1.1        Vlanif10
           20.1.1.1/32  Direct  0    0             D  127.0.0.1       Vlanif10
         20.1.1.255/32  Direct  0    0             D  127.0.0.1       Vlanif10
          30.1.1.0/24  OSPF   10  2             D  20.1.1.2       Vlanif10
           40.1.1.0/24  Direct  0    0             D  40.1.1.1        Tunnel1
           40.1.1.1/32  Direct  0    0             D  127.0.0.1       Tunnel1
         40.1.1.255/32  Direct  0    0             D  127.0.0.1       Tunnel1
          127.0.0.0/8   Direct  0    0             D  127.0.0.1       InLoopBack0
          127.0.0.1/32  Direct  0    0             D  127.0.0.1       InLoopBack0
    127.255.255.255/32  Direct  0    0             D  127.0.0.1       InLoopBack0
    255.255.255.255/32  Direct  0    0             D  127.0.0.1       InLoopBack0

Configuration Files

  • Configuration file of Device A

    #
    sysname DeviceA
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ip address 20.1.1.1 255.255.255.0
    #
    interface Vlanif20
     ip address 10.1.1.2 255.255.255.0
    #
    interface GigabitEthernet0/1/0
     portswitch
     undo shutdown
     port default vlan 10
    #
    interface GigabitEthernet0/2/0
     portswitch
     undo shutdown
     port default vlan 20
    #
    interface LoopBack1
     ip address 1.1.1.9 255.255.255.255
     binding tunnel gre
    #
    interface Tunnel1
     ip address 40.1.1.1 255.255.255.0
     tunnel-protocol gre
     source 1.1.1.9
     destination 2.2.2.9
    #
    ospf 1
     area 0.0.0.0
      network 1.1.1.9 0.0.0.0
      network 20.1.1.0 0.0.0.255
    #
    ospf 2
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 40.1.1.0 0.0.0.255
    #
    return
  • Configuration file of Device B

    #
    sysname DeviceB
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ip address 20.1.1.2 255.255.255.0
    #
    interface Vlanif20
     ip address 30.1.1.1 255.255.255.0
    #
    interface GigabitEthernet0/1/0
     portswitch
     undo shutdown
     port default vlan 10
    #
    interface GigabitEthernet0/2/0
     portswitch
     undo shutdown
     port default vlan 20
    #
    ospf 1
     area 0.0.0.0
      network 20.1.1.0 0.0.0.255
      network 30.1.1.0 0.0.0.255
    #
    return
  • Configuration file of Device C

    #
    sysname RouterC
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ip address 10.2.1.2 255.255.255.0
    #
    interface Vlanif20
     ip address 30.1.1.2 255.255.255.0
    #
    interface GigabitEthernet0/1/0
     portswitch
     undo shutdown
     port default vlan 20
    #
    interface GigabitEthernet0/2/0
     portswitch
     undo shutdown
     port default vlan 10
    #
    interface LoopBack1
     ip address 2.2.2.9 255.255.255.255
     binding tunnel gre
    #
    interface Tunnel1
     ip address 40.1.1.2 255.255.255.0
     tunnel-protocol gre
     source 2.2.2.9
     destination 1.1.1.9
    #
    ospf 1
     area 0.0.0.0
      network 2.2.2.9 0.0.0.0
      network 30.1.1.0 0.0.0.255
    #
    ospf 2
     area 0.0.0.0
      network 10.2.1.0 0.0.0.255
      network 40.1.1.0 0.0.0.255
    #
    return
Translation
Download
Updated: 2019-01-14

Document ID: EDOC1100058925

Views: 29982

Downloads: 54

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