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

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 12

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
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).
Configuration Examples

Configuration Examples

This section provides GRE configuration examples, including networking requirements, configuration roadmap, and configuration procedure.

Example for Configuring a Static Route for GRE to Implement Interworking Between IPv4 Networks

Networking Requirements
As shown in Figure 9-11:
  • Switch ModuleA, Switch ModuleB, and Switch ModuleC communicate with each other through a public network. (The OSPF protocol is used in this example.)
  • PC1 and PC2 run the IPv4 proprietary protocol and communicate with each other over the public network.
  • PC1 and PC2 use Switch ModuleA and Switch ModuleC as their default gateways respectively.

Figure 9-11 Configuring a static route for GRE

Configuration Roadmap

To allow PC1 to communicate with PC2, you can configure a direct link between Switch ModuleA and Switch ModuleC 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. Run OSPF on the devices to implement interworking among them.

  2. Create tunnel interfaces on Switch ModuleA and Switch ModuleC to set up a GRE tunnel, and configure a static route passing through tunnel interfaces on Switch ModuleA and Switch ModuleC, 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 Switch ModuleA.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 10 30
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 30
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 10
    [*Switch ModuleA-Vlanif10] ip address 20.1.1.1 24
    [*Switch ModuleA-Vlanif10] quit
    [*Switch ModuleA] interface vlanif 30
    [*Switch ModuleA-Vlanif30] ip address 10.1.1.2 24
    [*Switch ModuleA-Vlanif30] quit
    [*Switch ModuleA] commit
    

    # Configure Switch ModuleB.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleB
    [*HUAWEI] commit
    [~Switch ModuleB] vlan batch 10 20
    [*Switch ModuleB] interface 10ge 1/17/1
    [*Switch ModuleB-10GE1/17/1] port link-type trunk
    [*Switch ModuleB-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleB-10GE1/17/1] quit
    [*Switch ModuleB] interface 10ge 1/17/2
    [*Switch ModuleB-10GE1/17/2] port link-type trunk
    [*Switch ModuleB-10GE1/17/2] port trunk allow-pass vlan 20
    [*Switch ModuleB-10GE1/17/2] quit
    [*Switch ModuleB] interface vlanif 10
    [*Switch ModuleB-Vlanif10] ip address 20.1.1.2 24
    [*Switch ModuleB-Vlanif10] quit
    [*Switch ModuleB] interface vlanif 20
    [*Switch ModuleB-Vlanif20] ip address 30.1.1.1 24
    [*Switch ModuleB-Vlanif20] quit
    [*Switch ModuleB] commit

    # Configure Switch ModuleC.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleC
    [*HUAWEI] commit
    [~Switch ModuleC] vlan batch 20 30
    [*Switch ModuleC] interface 10ge 1/17/1
    [*Switch ModuleC-10GE1/17/1] port link-type trunk
    [*Switch ModuleC-10GE1/17/1] port trunk allow-pass vlan 20
    [*Switch ModuleC-10GE1/17/1] quit
    [*Switch ModuleC] interface 10ge 1/17/2
    [*Switch ModuleC-10GE1/17/2] port link-type trunk
    [*Switch ModuleC-10GE1/17/2] port trunk allow-pass vlan 30
    [*Switch ModuleC-10GE1/17/2] quit
    [*Switch ModuleC] interface vlanif 20
    [*Switch ModuleC-Vlanif20] ip address 30.1.1.2 24
    [*Switch ModuleC-Vlanif20] quit
    [*Switch ModuleC] interface vlanif 30
    [*Switch ModuleC-Vlanif30] ip address 10.2.1.2 24
    [*Switch ModuleC-Vlanif30] quit
    [*Switch ModuleC] commit

  2. Configure OSPF on the devices.

    # Configure Switch ModuleA.

    [~Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleA-ospf-1] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleB.

    [~Switch ModuleB] ospf 1
    [*Switch ModuleB-ospf-1] area 0
    [*Switch ModuleB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
    [*Switch ModuleB-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
    [*Switch ModuleB-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleB-ospf-1] quit
    [*Switch ModuleB] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] ospf 1
    [*Switch ModuleC-ospf-1] area 0
    [*Switch ModuleC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
    [*Switch ModuleC-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleC-ospf-1] quit
    [*Switch ModuleC] commit

    # After the configuration is complete, run the display ip routing-table command on Switch ModuleA and Switch ModuleC. The command output shows that they have learned the OSPF route destined for the network segment of the peer.

  3. Configure a tunnel interface.

    # Configure Switch ModuleA.

    [~Switch ModuleA] interface eth-trunk 1
    [*Switch ModuleA-Eth-Trunk1] service type tunnel
    [*Switch ModuleA-Eth-Trunk1] quit
    [*Switch ModuleA] interface 10ge 1/17/3
    [*Switch ModuleA-10GE1/17/3] eth-trunk 1
    [*Switch ModuleA-10GE1/17/3] quit
    [*Switch ModuleA] interface tunnel 1
    [*Switch ModuleA-Tunnel1] tunnel-protocol gre
    [*Switch ModuleA-Tunnel1] binding interface eth-trunk 1
    [*Switch ModuleA-Tunnel1] ip address 40.1.1.1 255.255.255.0
    [*Switch ModuleA-Tunnel1] source 20.1.1.1
    [*Switch ModuleA-Tunnel1] destination 30.1.1.2
    [*Switch ModuleA-Tunnel1] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] interface eth-trunk 1
    [*Switch ModuleC-Eth-Trunk1] service type tunnel
    [*Switch ModuleC-Eth-Trunk1] quit
    [*Switch ModuleC] interface 10ge 1/17/3
    [*Switch ModuleC-10GE1/17/3] eth-trunk 1
    [*Switch ModuleC-10GE1/17/3] quit
    [*Switch ModuleC] interface tunnel 1
    [*Switch ModuleC-Tunnel1] tunnel-protocol gre
    [*Switch ModuleC-Tunnel1] binding interface eth-trunk 1
    [*Switch ModuleC-Tunnel1] ip address 40.1.1.2 255.255.255.0
    [*Switch ModuleC-Tunnel1] source 30.1.1.2
    [*Switch ModuleC-Tunnel1] destination 20.1.1.1
    [*Switch ModuleC-Tunnel1] quit
    [*Switch ModuleC] commit

    # After the configuration is complete, the tunnel interfaces turn Up and can ping each other. This indicates that a direct tunnel has been set up.

    # The command output on Switch ModuleA is used as an example.

    [~Switch ModuleA] ping -a 40.1.1.1 40.1.1.2
      PING 40.1.1.2: 56  data bytes, press CTRL_C to break
        Reply from 40.1.1.2: bytes=56 Sequence=1 ttl=255 time=1 ms
        Reply from 40.1.1.2: bytes=56 Sequence=2 ttl=255 time=1 ms
        Reply from 40.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms
        Reply from 40.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms
        Reply from 40.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms
    
      --- 40.1.1.2 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 1/1/1 ms
    

  4. Configure a static route.

    # Configure Switch ModuleA.

    [~Switch ModuleA] ip route-static 10.2.1.0 255.255.255.0 tunnel 1
    [*Switch ModuleA] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] ip route-static 10.1.1.0 255.255.255.0 tunnel 1
    [*Switch ModuleC] commit

    # After the configuration is complete, run the display ip routing-table command on Switch ModuleA and Switch ModuleC. The command output shows the static route from the tunnel interface to the user-side network segment.

    # The command output on Switch ModuleA is used as an example.

    [~Switch ModuleA] display ip routing-table 10.2.1.0
    Route Flags: R - relay, D - download to fib                                     
    ------------------------------------------------------------------------------  
    Routing Table : _public_                                                        
    Summary Count : 1                                                               
                                                                                    
    Destination/Mask    Proto   Pre  Cost        Flags NextHop         Interface    
                                                                                    
           10.2.1.0/24  Static  60   0             D  0.0.0.0         Tunnel1       

    PC1 and PC2 can ping each other.

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    vlan batch 10 30
    #
    interface Vlanif10
     ip address 20.1.1.1 255.255.255.0
    #
    interface Vlanif30
     ip address 10.1.1.2 255.255.255.0
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/17/3
     eth-trunk 1
    #
    interface Tunnel1
     ip address 40.1.1.1 255.255.255.0
     tunnel-protocol gre
     source 20.1.1.1
     destination 30.1.1.2
     binding interface Eth-Trunk1
    #
    ospf 1
     area 0.0.0.0
      network 20.1.1.0 0.0.0.255
    #
    ip route-static 10.2.1.0 255.255.255.0 Tunnel1
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    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 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass 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 Switch ModuleC

    #
    sysname Switch ModuleC
    #
    vlan batch 20 30
    #
    interface Vlanif20
     ip address 30.1.1.2 255.255.255.0
    #
    interface Vlanif30
     ip address 10.2.1.2 255.255.255.0
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/17/3
     eth-trunk 1
    #
    interface Tunnel1
     ip address 40.1.1.2 255.255.255.0
     tunnel-protocol gre
     source 30.1.1.2
     destination 20.1.1.1
     binding interface Eth-Trunk1
    #
    ospf 1
     area 0.0.0.0
      network 30.1.1.0 0.0.0.255
    #
    ip route-static 10.1.1.0 255.255.255.0 Tunnel1
    #
    return

Example for Configuring OSPF for GRE to Implement Interworking Between IPv4 Networks

Networking Requirements
As shown in Figure 9-12:
  • Switch ModuleA, Switch ModuleB, and Switch ModuleC communicate with each other through a public network. (The OSPF protocol is used in this example.)
  • PC1 and PC2 run the IPv4 proprietary protocol and communicate with each other over the public network. Transmission of private data must be reliable.
  • PC1 and PC2 use Switch ModuleA and Switch ModuleC as their default gateways respectively.

Figure 9-12 Configuring a dynamic routing protocol for GRE

Configuration Roadmap

You can set up a directly connected GRE tunnel between Switch ModuleA and Switch ModuleC and configure OSPF on tunnel interfaces and interfaces connected to the private networks to allow PC1 to communicate with PC2. To monitor the tunnel link status, enable Keepalive detection on tunnel interfaces on both ends of the GRE tunnel.

The configuration roadmap is as follows:

  1. Configure an IGP (OSPF process 1 in this example) to implement interworking among the devices.

  2. Set up a GRE tunnel between devices connected to the PCs, enable Keepalive detection, and run an IGP (OSPF process 2 in this example) on the network segments connected to the PCs to transmit traffic between PC1 and PC2 over the GRE tunnel.

Procedure

  1. Configure an IP address for each physical interface.

    # Configure Switch ModuleA.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 10 30
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 30
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 10
    [*Switch ModuleA-Vlanif10] ip address 20.1.1.1 24
    [*Switch ModuleA-Vlanif10] quit
    [*Switch ModuleA] interface vlanif 30
    [*Switch ModuleA-Vlanif30] ip address 10.1.1.2 24
    [*Switch ModuleA-Vlanif30] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleB.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleB
    [*HUAWEI] commit
    [~Switch ModuleB] vlan batch 10 20
    [*Switch ModuleB] interface 10ge 1/17/1
    [*Switch ModuleB-10GE1/17/1] port link-type trunk
    [*Switch ModuleB-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleB-10GE1/17/1] quit
    [*Switch ModuleB] interface 10ge 1/17/2
    [*Switch ModuleB-10GE1/17/2] port link-type trunk
    [*Switch ModuleB-10GE1/17/2] port trunk allow-pass vlan 20
    [*Switch ModuleB-10GE1/17/2] quit
    [*Switch ModuleB] interface vlanif 10
    [*Switch ModuleB-Vlanif10] ip address 20.1.1.2 24
    [*Switch ModuleB-Vlanif10] quit
    [*Switch ModuleB] interface vlanif 20
    [*Switch ModuleB-Vlanif20] ip address 30.1.1.1 24
    [*Switch ModuleB-Vlanif20] quit
    [*Switch ModuleB] commit

    # Configure Switch ModuleC.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleC
    [*HUAWEI] commit
    [~Switch ModuleC] vlan batch 20 30
    [*Switch ModuleC] interface 10ge 1/17/1
    [*Switch ModuleC-10GE1/17/1] port link-type trunk
    [*Switch ModuleC-10GE1/17/1] port trunk allow-pass vlan 20
    [*Switch ModuleC-10GE1/17/1] quit
    [*Switch ModuleC] interface 10ge 1/17/2
    [*Switch ModuleC-10GE1/17/2] port link-type trunk
    [*Switch ModuleC-10GE1/17/2] port trunk allow-pass vlan 30
    [*Switch ModuleC-10GE1/17/2] quit
    [*Switch ModuleC] interface vlanif 20
    [*Switch ModuleC-Vlanif20] ip address 30.1.1.2 24
    [*Switch ModuleC-Vlanif20] quit
    [*Switch ModuleC] interface vlanif 30
    [*Switch ModuleC-Vlanif30] ip address 10.2.1.2 24
    [*Switch ModuleC-Vlanif30] quit
    [*Switch ModuleC] commit

  2. Configure OSPF on the devices.

    # Configure Switch ModuleA.

    [~Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleA-ospf-1] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleB.

    [~Switch ModuleB] ospf 1
    [*Switch ModuleB-ospf-1] area 0
    [*Switch ModuleB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
    [*Switch ModuleB-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
    [*Switch ModuleB-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleB-ospf-1] quit
    [*Switch ModuleB] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] ospf 1
    [*Switch ModuleC-ospf-1] area 0
    [*Switch ModuleC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
    [*Switch ModuleC-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleC-ospf-1] quit
    [*Switch ModuleC] commit

    # After the configuration is complete, run the display ip routing-table command on Switch ModuleA and Switch ModuleC. The command output shows that they have learned the OSPF route destined for the network segment of the peer.

  3. Configure a tunnel interface.

    # Configure Switch ModuleA.

    [~Switch ModuleA] interface eth-trunk 1
    [*Switch ModuleA-Eth-Trunk1] service type tunnel
    [*Switch ModuleA-Eth-Trunk1] stp disable
    [*Switch ModuleA-Eth-Trunk1] quit
    [*Switch ModuleA] interface 10ge 1/17/3
    [*Switch ModuleA-10GE1/17/3] eth-trunk 1
    [*Switch ModuleA-10GE1/17/3] quit
    [*Switch ModuleA] interface tunnel 1
    [*Switch ModuleA-Tunnel1] tunnel-protocol gre
    [*Switch ModuleA-Tunnel1] binding interface eth-trunk 1
    [*Switch ModuleA-Tunnel1] ip address 40.1.1.1 255.255.255.0
    [*Switch ModuleA-Tunnel1] source 20.1.1.1
    [*Switch ModuleA-Tunnel1] destination 30.1.1.2
    [*Switch ModuleA-Tunnel1] keepalive
    [*Switch ModuleA-Tunnel1] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] interface eth-trunk 1
    [*Switch ModuleC-Eth-Trunk1] service type tunnel
    [*Switch ModuleC-Eth-Trunk1] stp disable
    [*Switch ModuleC-Eth-Trunk1] quit
    [*Switch ModuleC] interface 10ge 1/17/3
    [*Switch ModuleC-10GE1/17/3] eth-trunk 1
    [*Switch ModuleC-10GE1/17/3] quit
    [*Switch ModuleC] interface tunnel 1
    [*Switch ModuleC-Tunnel1] tunnel-protocol gre
    [*Switch ModuleC-Tunnel1] binding interface eth-trunk 1
    [*Switch ModuleC-Tunnel1] ip address 40.1.1.2 255.255.255.0
    [*Switch ModuleC-Tunnel1] source 30.1.1.2
    [*Switch ModuleC-Tunnel1] destination 20.1.1.1
    [*Switch ModuleC-Tunnel1] keepalive
    [*Switch ModuleC-Tunnel1] quit
    [*Switch ModuleC] commit

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

    # The command output on Switch ModuleA is used as an example.

    [~Switch ModuleA] ping -a 40.1.1.1 40.1.1.2
      PING 40.1.1.2: 56  data bytes, press CTRL_C to break
        Reply from 40.1.1.2: bytes=56 Sequence=1 ttl=255 time=1 ms
        Reply from 40.1.1.2: bytes=56 Sequence=2 ttl=255 time=1 ms
        Reply from 40.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms
        Reply from 40.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms
        Reply from 40.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms
    
      --- 40.1.1.2 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 1/1/1 ms
    

    # Run the display keepalive packets count command to check the statistics on Keepalive packets.

    # The command output on Switch ModuleA is used as an example.

    [~Switch ModuleA] interface tunnel 1
    [~Switch ModuleA-Tunnel1] display keepalive packets count
    Send 10 keepalive packets to peers, Receive 10 keepalive response packets from peers
    Receive 8 keepalive packets from peers, Send 8 keepalive response packets to peers.

  4. Configure OSPF on tunnel interfaces.

    # Configure Switch ModuleA.

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

    # Configure Switch ModuleC.

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

  5. Verify the configuration.

    # After the configuration is complete, run the display ip routing-table command on Switch ModuleA and Switch ModuleC. The routing table of each router contains the OSPF route from the tunnel interface to the user-side network segment of the peer. In addition, the next hop of the route to the destination physical interface (30.1.1.0/24) of the tunnel is not a tunnel interface.

    # The command output on Switch ModuleA is used as an example.

    [~Switch ModuleA] display ip routing-table 10.2.1.0
    Route Flags: R - relay, D - download to fib                                     
    ------------------------------------------------------------------------------  
    Routing Table : _public_                                                        
    Summary Count : 1                                                               
                                                                                    
    Destination/Mask    Proto   Pre  Cost        Flags NextHop         Interface    
                                                                                    
           10.2.1.0/24  OSPF    10   2             D  40.1.1.2        Tunnel1    

    # PC1 and PC2 can ping each other.

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    vlan batch 10 30
    #
    interface Vlanif10
     ip address 20.1.1.1 255.255.255.0
    #
    interface Vlanif30
     ip address 10.1.1.2 255.255.255.0
    #
    interface Eth-Trunk1
     stp disable
     service type tunnel
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/17/3
     eth-trunk 1
    #
    interface Tunnel1
     ip address 40.1.1.1 255.255.255.0
     tunnel-protocol gre
     keepalive
     source 20.1.1.1
     destination 30.1.1.2
     binding interface Eth-Trunk1
    #
    ospf 1
     area 0.0.0.0
      network 20.1.1.0 0.0.0.255
    #
    ospf 2
     area 0.0.0.0
     network 40.1.1.0 0.0.0.255
      network 10.1.1.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    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 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass 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 Switch ModuleC

    #
    sysname Switch ModuleC
    #
    vlan batch 20 30
    #
    interface Vlanif20
     ip address 30.1.1.2 255.255.255.0
    #
    interface Vlanif30
     ip address 10.2.1.2 255.255.255.0
    #
    interface Eth-Trunk1
     stp disable
     service type tunnel
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/17/3
     eth-trunk 1
    #
    interface Tunnel1
     ip address 40.1.1.2 255.255.255.0
     tunnel-protocol gre
     keepalive
     source 30.1.1.2
     destination 20.1.1.1
     binding interface Eth-Trunk1
    #
    ospf 1
     area 0.0.0.0
      network 30.1.1.0 0.0.0.255
    #
    ospf 2
     area 0.0.0.0
      network 40.1.1.0 0.0.0.255
      network 10.2.1.0 0.0.0.255
    #
    return

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

Networking Requirements

As shown in Figure 9-13, Switch ModuleA and Switch ModuleC on IPv6 networks connect to Switch ModuleB on an IPv4 network. PC1 and PC2 on the two IPv6 networks need to communicate with each other.

PC1 and PC2 use Switch ModuleA and Switch ModuleC as their default gateways respectively.

Figure 9-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 across an IPv4 network, you can configure a direct link between Switch ModuleA and Switch ModuleC 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 Switch ModuleA and Switch ModuleC to set up a GRE tunnel, and configure an IPv6 static route passing through tunnel interfaces on Switch ModuleA and Switch ModuleC, 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 Switch ModuleA.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 10 30
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface 10ge 1/17/2
    [*Switch ModuleA-10GE1/17/2] port link-type trunk
    [*Switch ModuleA-10GE1/17/2] port trunk allow-pass vlan 30
    [*Switch ModuleA-10GE1/17/2] quit
    [*Switch ModuleA] interface vlanif 10
    [*Switch ModuleA-Vlanif10] ip address 20.1.1.1 24
    [*Switch ModuleA-Vlanif10] quit
    [*Switch ModuleA] interface vlanif 30
    [*Switch ModuleA-Vlanif30] ipv6 enable
    [*Switch ModuleA-Vlanif30] ipv6 address 2001::1 64
    [*Switch ModuleA-Vlanif30] quit
    [*Switch ModuleA] commit
    

    # Configure Switch ModuleB.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleB
    [*HUAWEI] commit
    [~Switch ModuleB] vlan batch 10 20
    [*Switch ModuleB] interface 10ge 1/17/1
    [*Switch ModuleB-10GE1/17/1] port link-type trunk
    [*Switch ModuleB-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleB-10GE1/17/1] quit
    [*Switch ModuleB] interface 10ge 1/17/2
    [*Switch ModuleB-10GE1/17/2] port link-type trunk
    [*Switch ModuleB-10GE1/17/2] port trunk allow-pass vlan 20
    [*Switch ModuleB-10GE1/17/2] quit
    [*Switch ModuleB] interface vlanif 10
    [*Switch ModuleB-Vlanif10] ip address 20.1.1.2 24
    [*Switch ModuleB-Vlanif10] quit
    [*Switch ModuleB] interface vlanif 20
    [*Switch ModuleB-Vlanif20] ip address 30.1.1.1 24
    [*Switch ModuleB-Vlanif20] quit
    [*Switch ModuleB] commit

    # Configure Switch ModuleC.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleC
    [*HUAWEI] commit
    [~Switch ModuleC] vlan batch 20 30
    [*Switch ModuleC] interface 10ge 1/17/1
    [*Switch ModuleC-10GE1/17/1] port link-type trunk
    [*Switch ModuleC-10GE1/17/1] port trunk allow-pass vlan 20
    [*Switch ModuleC-10GE1/17/1] quit
    [*Switch ModuleC] interface 10ge 1/17/2
    [*Switch ModuleC-10GE1/17/2] port link-type trunk
    [*Switch ModuleC-10GE1/17/2] port trunk allow-pass vlan 30
    [*Switch ModuleC-10GE1/17/2] quit
    [*Switch ModuleC] interface vlanif 20
    [*Switch ModuleC-Vlanif20] ip address 30.1.1.2 24
    [*Switch ModuleC-Vlanif20] quit
    [*Switch ModuleC] interface vlanif 30
    [*Switch ModuleC-Vlanif30] ipv6 enable
    [*Switch ModuleC-Vlanif30] ipv6 address 4001::1 64
    [*Switch ModuleC-Vlanif30] quit
    [*Switch ModuleC] commit

  2. Configure an IPv4 static route.

    # Configure Switch ModuleA.

    [~Switch ModuleA] ip route-static 30.1.1.0 255.255.255.0 20.1.1.2
    [*Switch ModuleA] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] ip route-static 20.1.1.0 255.255.255.0 30.1.1.1
    [*Switch ModuleC] commit

  3. Configure a tunnel interface.

    # Configure Switch ModuleA.

    [~Switch ModuleA] interface eth-trunk 1
    [*Switch ModuleA-Eth-Trunk1] service type tunnel
    [*Switch ModuleA-Eth-Trunk1] quit
    [*Switch ModuleA] interface 10ge 1/17/3
    [*Switch ModuleA-10GE1/17/3] eth-trunk 1
    [*Switch ModuleA-10GE1/17/3] quit
    [*Switch ModuleA] interface tunnel 1
    [*Switch ModuleA-Tunnel1] tunnel-protocol gre
    [*Switch ModuleA-Tunnel1] binding interface eth-trunk 1
    [*Switch ModuleA-Tunnel1] ipv6 enable
    [*Switch ModuleA-Tunnel1] ipv6 address 3001::1 64
    [*Switch ModuleA-Tunnel1] source 20.1.1.1
    [*Switch ModuleA-Tunnel1] destination 30.1.1.2
    [*Switch ModuleA-Tunnel1] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] interface eth-trunk 1
    [*Switch ModuleC-Eth-Trunk1] service type tunnel
    [*Switch ModuleC-Eth-Trunk1] quit
    [*Switch ModuleC] interface 10ge 1/17/3
    [*Switch ModuleC-10GE1/17/3] eth-trunk 1
    [*Switch ModuleC-10GE1/17/3] quit
    [*Switch ModuleC] interface tunnel 1
    [*Switch ModuleC-Tunnel1] tunnel-protocol gre
    [*Switch ModuleC-Tunnel1] binding interface eth-trunk 1
    [*Switch ModuleC-Tunnel1] ipv6 enable
    [*Switch ModuleC-Tunnel1] ipv6 address 3001::2 64
    [*Switch ModuleC-Tunnel1] source 30.1.1.2
    [*Switch ModuleC-Tunnel1] destination 20.1.1.1
    [*Switch ModuleC-Tunnel1] quit
    [*Switch ModuleC] commit

  4. Configure a static tunnel route.

    # Configure Switch ModuleA.

    [~Switch ModuleA] ipv6 route-static 4001:: 64 tunnel 1
    [*Switch ModuleA] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] ipv6 route-static 2001:: 64 tunnel 1
    [*Switch ModuleC] commit

  5. Verify the configuration.

    # Ping the IPv4 address of Switch ModuleA from Switch ModuleC. Switch ModuleC can receive a Reply packet from Switch ModuleA.

    [~Switch ModuleC] 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=254 time=84 ms
        Reply from 20.1.1.1: bytes=56 Sequence=2 ttl=254 time=27 ms
        Reply from 20.1.1.1: bytes=56 Sequence=3 ttl=254 time=25 ms
        Reply from 20.1.1.1: bytes=56 Sequence=4 ttl=254 time=3 ms
        Reply from 20.1.1.1: bytes=56 Sequence=5 ttl=254 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 Switch ModuleA from Switch ModuleC. Switch ModuleC can receive a Reply packet from Switch ModuleA.

    [~Switch ModuleC] ping ipv6 2001::1
      PING 2001::1 : 56  data bytes, press CTRL_C to break
        Reply from 2001::1
        bytes=56 Sequence=1 hop limit=64  time = 28 ms
        Reply from 2001::1
        bytes=56 Sequence=2 hop limit=64  time = 27 ms
        Reply from 2001::1
        bytes=56 Sequence=3 hop limit=64  time = 26 ms
        Reply from 2001::1
        bytes=56 Sequence=4 hop limit=64  time = 27 ms
        Reply from 2001::1
        bytes=56 Sequence=5 hop limit=64  time = 26 ms
    
      --- 2001::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 Switch ModuleA

    #
    sysname Switch ModuleA
    #  
    vlan batch 10 30
    #
    interface Vlanif10
     ip address 20.1.1.1 255.255.255.0
    #
    interface Vlanif30
     ipv6 enable
     ipv6 address 2001::1/64
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/17/3
     eth-trunk 1
    #
    interface Tunnel1
     ipv6 enable
     ipv6 address 3001::1/64
     tunnel-protocol gre
     source 20.1.1.1
     destination 30.1.1.2
     binding interface Eth-Trunk1
    #
    ip route-static 30.1.1.0 255.255.255.0 20.1.1.2
    #                                                                               
    ipv6 route-static 4001:: 64 Tunnel1 
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    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 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    return
  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    vlan batch 20 30
    #
    interface Vlanif20
     ip address 30.1.1.2 255.255.255.0
    #
    interface Vlanif30
     ipv6 enable
     ipv6 address 4001::1/64
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/17/3
     eth-trunk 1
    #
    interface Tunnel1
     ipv6 enable
     ipv6 address 3001::2/64
     tunnel-protocol gre
     source 30.1.1.2
     destination 20.1.1.1
     binding interface Eth-Trunk1
    #
    ip route-static 20.1.1.0 255.255.255.0 30.1.1.1
    #                                                                               
    ipv6 route-static 2001:: 64 Tunnel1 
    #
    return

Example for Enlarging the Operation Scope of a Network with a Hop Limit

Networking Requirements

As shown in Figure 9-14, Switch ModuleA, Switch ModuleB, Switch ModuleC, and Switch ModuleD run RIP to implement interworking. Data sent from Switch ModuleA to Switch ModuleD must pass through only one hop. That is, the route cost is 1. RIP is deployed without changing the network topology. There are two hops between Switch ModuleA and Switch ModuleD. To reduce a hop, you need to set up a GRE tunnel between Switch ModuleA and Switch ModuleC. Although the logical hop count is 1, there are two devices on the path from Switch ModuleA to Switch ModuleD. Therefore, the hop count allowed on a RIP network is increased.

Figure 9-14 Enlarging the operation scope of a network with a hop limit

Configuration Roadmap

The configuration roadmap is as follows:

  1. Run RIP process 1 on Switch ModuleA, Switch ModuleB, and Switch ModuleC to implement interworking among them.

  2. Set up a GRE tunnel between Switch ModuleA and Switch ModuleC to hide Switch ModuleB.

  3. Run RIP process 2 on Switch ModuleA, Switch ModuleC, and Switch ModuleD to forward packets over the GRE tunnel. The actual hop counts allowed on a RIP network is increased.

Procedure

  1. Configure an IP address for each physical interface.

    # Configure Switch ModuleA.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan batch 10
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface vlanif 10
    [*Switch ModuleA-Vlanif10] ip address 20.1.1.1 24
    [*Switch ModuleA-Vlanif10] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleB.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleB
    [*HUAWEI] commit
    [~Switch ModuleB] vlan batch 10 20
    [*Switch ModuleB] interface 10ge 1/17/1
    [*Switch ModuleB-10GE1/17/1] port link-type trunk
    [*Switch ModuleB-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleB-10GE1/17/1] quit
    [*Switch ModuleB] interface 10ge 1/17/2
    [*Switch ModuleB-10GE1/17/2] port link-type trunk
    [*Switch ModuleB-10GE1/17/2] port trunk allow-pass vlan 20
    [*Switch ModuleB-10GE1/17/2] quit
    [*Switch ModuleB] interface vlanif 10
    [*Switch ModuleB-Vlanif10] ip address 20.1.1.2 24
    [*Switch ModuleB-Vlanif10] quit
    [*Switch ModuleB] interface vlanif 20
    [*Switch ModuleB-Vlanif20] ip address 30.1.1.1 24
    [*Switch ModuleB-Vlanif20] quit
    [*Switch ModuleB] commit

    # Configure Switch ModuleC.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleC
    [*HUAWEI] commit
    [~Switch ModuleC] vlan batch 20 30
    [*Switch ModuleC] interface 10ge 1/17/1
    [*Switch ModuleC-10GE1/17/1] port link-type trunk
    [*Switch ModuleC-10GE1/17/1] port trunk allow-pass vlan 20
    [*Switch ModuleC-10GE1/17/1] quit
    [*Switch ModuleC] interface 10ge 1/17/2
    [*Switch ModuleC-10GE1/17/2] port link-type trunk
    [*Switch ModuleC-10GE1/17/2] port trunk allow-pass vlan 30
    [*Switch ModuleC-10GE1/17/2] quit
    [*Switch ModuleC] interface vlanif 20
    [*Switch ModuleC-Vlanif20] ip address 30.1.1.2 24
    [*Switch ModuleC-Vlanif20] quit
    [*Switch ModuleC] interface vlanif 30
    [*Switch ModuleC-Vlanif30] ip address 40.1.1.1 24
    [*Switch ModuleC-Vlanif30] quit
    [*Switch ModuleC] commit

    # Configure Switch ModuleD.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleD
    [*HUAWEI] commit
    [~Switch ModuleD] vlan batch 30
    [*Switch ModuleD] interface 10ge 1/17/1
    [*Switch ModuleD-10GE1/17/1] port link-type trunk
    [*Switch ModuleD-10GE1/17/1] port trunk allow-pass vlan 30
    [*Switch ModuleD-10GE1/17/1] quit
    [*Switch ModuleD] interface vlanif 30
    [*Switch ModuleD-Vlanif30] ip address 40.1.1.2 24
    [*Switch ModuleD-Vlanif30] quit
    [*Switch ModuleD] commit

  2. Run RIP process 1 on devices.

    # Configure Switch ModuleA.

    [~Switch ModuleA] rip 1
    [*Switch ModuleA-rip-1] version 2
    [*Switch ModuleA-rip-1] network 20.0.0.0 
    [*Switch ModuleA-rip-1] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleB.

    [~Switch ModuleB] rip 1
    [*Switch ModuleB-rip-1] version 2
    [*Switch ModuleB-rip-1] network 20.0.0.0
    [*Switch ModuleB-rip-1] network 30.0.0.0
    [*Switch ModuleB-rip-1] quit
    [*Switch ModuleB] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] rip 1
    [*Switch ModuleC-rip-1] version 2
    [*Switch ModuleC-rip-1] network 30.0.0.0
    [*Switch ModuleC-rip-1] quit
    [*Switch ModuleC] commit

    # After the configuration is complete, run the display ip routing-table command on Switch ModuleA and Switch ModuleC. The command output shows that they have learned the RIP route destined for the network segment of the peer.

  3. Configure a tunnel interface.

    # Configure Switch ModuleA.

    [~Switch ModuleA] interface eth-trunk 1
    [*Switch ModuleA-Eth-Trunk1] service type tunnel
    [*Switch ModuleA-Eth-Trunk1] quit
    [*Switch ModuleA] interface 10ge 1/17/3
    [*Switch ModuleA-10GE1/17/3] eth-trunk 1
    [*Switch ModuleA-10GE1/17/3] quit
    [*Switch ModuleA] interface tunnel 1
    [*Switch ModuleA-Tunnel1] tunnel-protocol gre
    [*Switch ModuleA-Tunnel1] binding interface eth-trunk 1
    [*Switch ModuleA-Tunnel1] ip address 50.1.1.1 255.255.255.0
    [*Switch ModuleA-Tunnel1] source 20.1.1.1
    [*Switch ModuleA-Tunnel1] destination 30.1.1.2
    [*Switch ModuleA-Tunnel1] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] interface eth-trunk 1
    [*Switch ModuleC-Eth-Trunk1] service type tunnel
    [*Switch ModuleC-Eth-Trunk1] quit
    [*Switch ModuleC] interface 10ge 1/17/3
    [*Switch ModuleC-10GE1/17/3] eth-trunk 1
    [*Switch ModuleC-10GE1/17/3] quit
    [*Switch ModuleC] interface tunnel 1
    [*Switch ModuleC-Tunnel1] tunnel-protocol gre
    [*Switch ModuleC-Tunnel1] binding interface eth-trunk 1
    [*Switch ModuleC-Tunnel1] ip address 50.1.1.2 255.255.255.0
    [*Switch ModuleC-Tunnel1] source 30.1.1.2
    [*Switch ModuleC-Tunnel1] destination 20.1.1.1
    [*Switch ModuleC-Tunnel1] quit
    [*Switch ModuleC] commit

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

    # The command output on Switch ModuleA is used as an example.

    [~Switch ModuleA] ping -a 50.1.1.1 50.1.1.2
      PING 50.1.1.2: 56  data bytes, press CTRL_C to break
        Reply from 50.1.1.2: bytes=56 Sequence=1 ttl=255 time=1 ms
        Reply from 50.1.1.2: bytes=56 Sequence=2 ttl=255 time=1 ms
        Reply from 50.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms
        Reply from 50.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms
        Reply from 50.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms
    
      --- 50.1.1.2 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 1/1/1 ms
    

  4. Run RIP process 2 on tunnel interfaces.

    # Configure Switch ModuleA.

    [~Switch ModuleA] rip 2
    [*Switch ModuleA-rip-2] version 2
    [*Switch ModuleA-rip-2] network 50.0.0.0
    [*Switch ModuleA-rip-2] quit
    [*Switch ModuleA] commit

    # Configure Switch ModuleC.

    [~Switch ModuleC] rip 2
    [*Switch ModuleC-rip-2] version 2
    [*Switch ModuleC-rip-2] network 50.0.0.0
    [*Switch ModuleC-rip-2] network 40.0.0.0
    [*Switch ModuleC-rip-2] quit
    [*Switch ModuleC] commit

    # Configure Switch ModuleD.

    [~Switch ModuleD] rip 2
    [*Switch ModuleD-rip-2] version 2
    [*Switch ModuleD-rip-2] network 40.0.0.0
    [*Switch ModuleD-rip-2] quit
    [*Switch ModuleD] commit

  5. Verify the configuration.

    # After the configuration is complete, run the display ip routing-table command on Switch ModuleA and Switch ModuleD. The command output shows that the cost of the route to the destination address of the peer device is 1.

    # The command output on Switch ModuleA is used as an example.

    [~Switch ModuleA] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Table : _public_
             Destinations : 12       Routes : 12        
    
    Destination/Mask    Proto   Pre  Cost        Flags NextHop         Interface
    
           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  RIP     100  1             D  20.1.1.2        Vlanif10
           40.1.1.0/24  RIP     100  1             D  50.1.1.2        Tunnel1
           50.1.1.0/24  Direct  0    0             D  50.1.1.1        Tunnel1
           50.1.1.1/32  Direct  0    0             D  127.0.0.1       Tunnel1
         50.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 Switch ModuleA

    #
    sysname Switch ModuleA
    #
    vlan batch 10
    #
    
    interface Vlanif10
     ip address 20.1.1.1 255.255.255.0
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/17/3
     eth-trunk 1
    #
    interface Tunnel1
     ip address 50.1.1.1 255.255.255.0
     tunnel-protocol gre
     source 20.1.1.1
     destination 30.1.1.2
     binding interface Eth-Trunk1
    #
    rip 1
     version 2
     network 20.0.0.0
    #
    rip 2
     version 2
     network 50.0.0.0
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    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 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    rip 1
     version 2
     network 20.0.0.0
     network 30.0.0.0
    #
    return
  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    vlan batch 20 30
    #
    
    interface Vlanif20
     ip address 30.1.1.2 255.255.255.0
    #
    interface Vlanif30
     ip address 40.1.1.1 255.255.255.0
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/17/3
     eth-trunk 1
    #
    interface Tunnel1
     ip address 50.1.1.2 255.255.255.0
     tunnel-protocol gre
     source 30.1.1.2
     destination 20.1.1.1
     binding interface Eth-Trunk1
    #
    rip 1
     version 2
     network 30.0.0.0
    #
    rip 2
     version 2
     network 40.0.0.0
     network 50.0.0.0
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname Switch ModuleD
    #
    vlan batch 30
    #
    interface Vlanif30
     ip address 40.1.1.2 255.255.255.0
    #
    interface 10GE1/17/1 port link-type trunk
     port trunk allow-pass vlan 30
    #
    rip 2
     version 2
     network 40.0.0.0
    #
    return
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 59614

Downloads: 3623

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