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 examples to explain how to configure the primary IP address, secondary IP addresses, and IP unnumbered on an interface.

Example for Configuring Primary and Secondary IP Addresses for an Interface

Networking Requirements

As shown in Figure 6-5, the Switch has only one idle interface 10GE1/17/1 to connect to a LAN. The hosts on the LAN are located on two network segments: 172.16.1.0/24 and 172.16.2.0/24. The interface must be configured with a primary IP address and a secondary IP address to provide access for hosts on the two network segments.

Figure 6-5 Network diagram for configuring IP addresses

Configuration Roadmap

The configuration roadmap is as follows:

Configure a primary IP address and a secondary IP address for the interface so that the interface can connect to two different network segments.

Procedure

  1. Add 10GE1/17/1 to VLAN 100, and configure a primary IP address and a secondary IP address for VLANIF 100.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch
    [*HUAWEI] commit
    [~Switch] vlan batch 100
    [*Switch] interface 10ge 1/17/1
    [*Switch-10GE1/17/1] port default vlan 100
    [*Switch-10GE1/17/1] quit
    [*Switch] interface vlanif 100
    [*Switch-Vlanif100] ip address 172.16.1.1 24
    [*Switch-Vlanif100] ip address 172.16.2.1 24 sub
    [*Switch-Vlanif100] quit
    [*Switch] commit
    [~Switch] quit
    

  2. Verify the configuration.

    # Ping a host on network segment 172.16.1.0 from the Switch. The ping operation succeeds.

    <Switch> ping 172.16.1.2
      PING 172.16.1.2: 56  data bytes, press CTRL_C to break    
        Reply from 172.16.1.2: bytes=56 Sequence=1 ttl=254 time=1 ms
        Reply from 172.16.1.2: bytes=56 Sequence=2 ttl=254 time=1 ms
        Reply from 172.16.1.2: bytes=56 Sequence=3 ttl=254 time=1 ms
        Reply from 172.16.1.2: bytes=56 Sequence=4 ttl=254 time=1 ms
        Reply from 172.16.1.2: bytes=56 Sequence=5 ttl=254 time=1 ms
                                                                    
      --- 172.16.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                           
        

    # Ping a host on network segment 172.16.2.0 from the Switch. The ping operation succeeds.

    <Switch> ping 172.16.2.2
      PING 172.16.2.2: 56  data bytes, press CTRL_C to break        
        Reply from 172.16.2.2: bytes=56 Sequence=1 ttl=254 time=1 ms
        Reply from 172.16.2.2: bytes=56 Sequence=2 ttl=254 time=1 ms
        Reply from 172.16.2.2: bytes=56 Sequence=3 ttl=254 time=1 ms
        Reply from 172.16.2.2: bytes=56 Sequence=4 ttl=254 time=1 ms
        Reply from 172.16.2.2: bytes=56 Sequence=5 ttl=254 time=1 ms
                                                                    
      --- 172.16.2.2 ping statistics ---                            
        5 packet(s) transmitted                                     
        5 packet(s) received                                        
        0.00% packet loss                                           
        round-trip min/avg/max = 1/1/1 ms                           
         

Configuration File

Configuration file of the Switch

#
sysname Switch
#
vlan batch 100
#
interface Vlanif100
 ip address 172.16.1.1 255.255.255.0
 ip address 172.16.2.1 255.255.255.0 sub
#
interface 10GE1/17/1
 port default vlan 100
#
return

Example for Configuring an IP Unnumbered Interface

Networking Requirements

As shown in Figure 6-6, Tunnel interfaces (Tunnel1) of SwitchA and SwitchC are seldom used, so they have no IP address configured. The tunnel interfaces need to borrow the IP address of the loopback interface so that the two switches can communicate through the tunnel.

Figure 6-6 Network diagram for IP unnumbered interface configuration

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure IP addresses for interfaces on SwitchA, SwitchB, and SwitchC.
  2. Configure OSPF routes to ensure that there are reachable IPv4 routes between SwitchA and SwitchC.
  3. Create tunnel interfaces on SwitchA and SwitchC, set up a GRE tunnel between them, and specify the source and destination addresses of the tunnel interfaces.
  4. On SwitchA and SwitchC, configure the tunnel interface to borrow the IP address from a loopback interface.
  5. On SwitchA and SwitchC, configure tunnel routes using static routing.

Procedure

  1. Assign IP addresses to interfaces

    # Configure SwitchA.

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

    # Configure SwitchB.

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

    # Configure SwitchC.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchC
    [*HUAWEI] commit
    [~SwitchC] vlan batch 20
    [*SwitchC] interface 10ge 1/17/1
    [*SwitchC-10GE1/17/1] port link-type trunk
    [*SwitchC-10GE1/17/1] port trunk allow-pass vlan 20
    [*SwitchC-10GE1/17/1] quit
    [*SwitchC] interface vlanif 20
    [*SwitchC-Vlanif20] ip address 30.1.1.2 24
    [*SwitchC-Vlanif20] quit
    [*SwitchC] interface loopback 0
    [*SwitchC-LoopBack0] ip address 9.9.9.1 24
    [*SwitchC-LoopBack0] quit
    [*SwitchC] commit

  2. Configure OSPF on the devices

    # Configure SwitchA.

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

    # Configure SwitchB.

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

    # Configure SwitchC.

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

  3. Configure Tunnel1 to borrow the IP address from Loopback0 and configure the gre tunnel.

    # Configure SwitchA.

    [~SwitchA] interface eth-trunk 1
    [*SwitchA-Eth-Trunk1] service type tunnel
    [*SwitchA-Eth-Trunk1] quit
    [*SwitchA] interface 10ge 1/17/2
    [*SwitchA-10GE1/17/2] eth-trunk 1
    [*SwitchA-10GE1/17/2] quit
    [*SwitchA] commit
    [~SwitchA] interface tunnel 1
    [*SwitchA-Tunnel1] tunnel-protocol gre
    [*SwitchA-Tunnel1] binding interface eth-trunk 1
    [*SwitchA-Tunnel1] ip address unnumbered interface loopback 0
    [*SwitchA-Tunnel1] source 20.1.1.1
    [*SwitchA-Tunnel1] destination 30.1.1.2
    [*SwitchA-Tunnel1] quit
    [*SwitchA] commit

    # Configure SwitchC.

    [~SwitchC] interface eth-trunk 1
    [*SwitchC-Eth-Trunk1] service type tunnel
    [*SwitchC-Eth-Trunk1] quit
    [*SwitchC] interface 10ge 1/17/2
    [*SwitchC-10GE1/17/2] eth-trunk 1
    [*SwitchC-10GE1/17/2] quit
    [*SwitchC] commit
    [~SwitchC] interface tunnel 1
    [*SwitchC-Tunnel1] tunnel-protocol gre
    [*SwitchC-Tunnel1] binding interface eth-trunk 1
    [*SwitchC-Tunnel1] ip address unnumbered interface loopback 0
    [*SwitchC-Tunnel1] source 30.1.1.2
    [*SwitchC-Tunnel1] destination 20.1.1.1
    [*SwitchC-Tunnel1] quit
    [*SwitchC] commit

  4. Configure static routes.

    # Configure SwitchA.

    [~SwitchA] ip route-static 9.9.9.0 255.255.255.0 tunnel 1
    [*SwitchA] commit

    # Configure SwitchC.

    [~SwitchC] ip route-static 116.116.116.0 255.255.255.0 tunnel 1
    [*SwitchC] commit

  5. Verify the configuration.

    # Ping 9.9.9.1 from SwitchA. The ping operation succeeds.

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

Configuration Files
  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    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/2
     eth-trunk 1
    #
    interface LoopBack0
     ip address 116.116.116.1 255.255.225.0
    #
    interface Tunnel1
     ip address unnumbered interface LoopBack0
     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 9.9.9.0 255.255.255.0 Tunnel1
    #
    return
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    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 SwitchC

    #
    sysname SwitchC
    #
    vlan batch 20
    #
    interface Vlanif20
     ip address 30.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 20
    #
    interface 10GE1/17/2
     eth-trunk 1
    #
    interface LoopBack0
     ip address 9.9.9.1 255.255.225.0
    #
    interface Tunnel1
     ip address unnumbered interface LoopBack0
     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 116.116.116.0 255.255.255.0 Tunnel1
    #
    return
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 58919

Downloads: 3621

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