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 - IP Unicast Routing

CloudEngine 8800, 7800, 6800, and 5800 V200R005C10

This document describes the configurations of IP Unicast Routing, including IP Routing, Static Route, RIP, RIPng, OSPF, OSPFv3, IPv4 IS-IS, IPv6 IS-IS, BGP, Routing Policy, and PBR.
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 IPv4 Static Routes

Example for Configuring IPv4 Static Routes

Networking Requirements

Servers on different network segments are connected using several Switches. Every two servers on different network segments can communicate with each other without using dynamic routing protocols.

Figure 2-7 Networking diagram for configuring IPv4 static routes

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create VLANs, add interfaces to the VLANs, and assign IPv4 addresses to VLANIF interfaces so that directly-connected interfaces can communicate with each other.
  2. Configure the IPv4 default gateway on each server, and configure IPv4 static routes and default routes on each Switch so that servers on different network segments can communicate with each other.

Procedure

  1. Create VLANs and add interfaces to the VLANs.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan 10
    [*SwitchA-vlan10] quit
    [*SwitchA] vlan 30
    [*SwitchA-vlan30] quit
    [*SwitchA] interface 10ge 1/0/1
    [*SwitchA-10GE1/0/1] port link-type trunk
    [*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
    [*SwitchA-10GE1/0/1] quit
    [*SwitchA] interface 10ge 1/0/2
    [*SwitchA-10GE1/0/2] port default vlan 30
    [*SwitchA-10GE1/0/2] quit
    [*SwitchA] commit

    The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not provided here.

  2. Assign IPv4 addresses to the VLANIF interfaces.

    [~SwitchA] interface vlanif 10
    [*SwitchA-Vlanif10] ip address 10.1.4.1 30
    [*SwitchA-Vlanif10] quit
    [*SwitchA] interface vlanif 30
    [*SwitchA-Vlanif30] ip address 10.1.1.1 24
    [*SwitchA-Vlanif30] quit
    [*SwitchA] commit

    The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not provided here.

  3. Configure servers.

    Set the Server1 default gateway to 10.1.1.1, the Server2 default gateway to 10.1.2.1, and the Server3 default gateway to 10.1.3.1.

  4. Configure static routes.

    # Configure an IPv4 default route on SwitchA.

    [~SwitchA] ip route-static 0.0.0.0 0.0.0.0 10.1.4.2
    [*SwitchA] commit

    # Configure two IPv4 static routes on SwitchB.

    [~SwitchB] ip route-static 10.1.1.0 255.255.255.0 10.1.4.1
    [*SwitchB] ip route-static 10.1.3.0 255.255.255.0 10.1.4.6
    [*SwitchB] commit

    # Configure an IPv4 default route on SwitchC.

    [~SwitchC] ip route-static 0.0.0.0 0.0.0.0 10.1.4.5
    [*SwitchC] commit

  5. Verify the configuration.

    # Check the IP routing table on SwitchA.

    [~SwitchA] display ip routing-table
    Proto: Protocol        Pre: Preference
    Route Flags: R - relay, D - download to fib, T - to vpn-instance
    ------------------------------------------------------------------------------
    Routing Table: _public_
             Destinations : 10        Routes : 10
     
    Destination/Mask    Proto  Pre  Cost   Flags   NextHop      Interface
     
            0.0.0.0/0   Static 60   0        RD    10.1.4.2     Vlanif10
           10.1.1.0/24  Direct 0    0        D     10.1.1.1     Vlanif30
           10.1.1.1/32  Direct 0    0        D     127.0.0.1    Vlanif30
           10.1.4.0/30  Direct 0    0        D     10.1.4.1     Vlanif10
           10.1.4.1/32  Direct 0    0        D     127.0.0.1    Vlanif10
           10.1.4.2/32  Direct 0    0        D     10.1.4.2     Vlanif10
          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 

    # Run the ping command to verify the connectivity.

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

Configuration Files

  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    vlan batch 10 30
    #
    interface Vlanif10
     ip address 10.1.4.1 255.255.255.252
    #
    interface Vlanif30
     ip address 10.1.1.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/0/2
     port default vlan 30
    #
    ip route-static 0.0.0.0 0.0.0.0 10.1.4.2
    #
    return
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    vlan batch 10 20 40
    #
    interface Vlanif10
     ip address 10.1.4.2 255.255.255.252
    #
    interface Vlanif20
     ip address 10.1.4.5 255.255.255.252
    #
    interface Vlanif40
     ip address 10.1.2.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface 10GE1/0/3
     port default vlan 40
    #
    ip route-static 10.1.1.0 255.255.255.0 10.1.4.1
    ip route-static 10.1.3.0 255.255.255.0 10.1.4.6
    #
    return
  • Configuration file of SwitchC

    #
    sysname SwitchC
    #
    vlan batch 20 50
    #
    interface Vlanif20
     ip address 10.1.4.6 255.255.255.252
    #
    interface Vlanif50
     ip address 10.1.3.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface 10GE1/0/2
     port default vlan 50
    #
    ip route-static 0.0.0.0 0.0.0.0 10.1.4.5
    #
    return
Translation
Download
Updated: 2019-04-20

Document ID: EDOC1100074760

Views: 57374

Downloads: 62

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