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

NE40E V800R010C10SPC500 Configuration Guide - IP Routing 01

This is NE40E V800R010C10SPC500 Configuration Guide - IP Routing
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

You can configure IPv4 static routes to interconnect any two devices on an IPv4 network.

Networking Requirements

Figure 3-3 shows the IP addresses and masks of interfaces and hosts. It is required that any two hosts in Figure 3-3 communicate through static routes.

Figure 3-3 Networking for configuring IPv4 static routes
NOTE:

Interfaces 1 through 3 in this example are GE 1/0/0, GE 2/0/0, GE 3/0/0, respectively.



Precautions

When configuring an IPv4 static route, specify a next-hop address if the outbound interface is of the broadcast type.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure IPv4 addresses for interfaces on each router.

  2. Configure an IPv4 static route and a default route on each router.

  3. Configure the IPv4 default gateway on each host so that any two hosts communicate with each other.

Data Preparation

To complete the configuration, you need the following data:

  • Default route with 1.1.4.2 as the next hop on Device A

  • Static route to 1.1.1.0 with 1.1.4.1 as the next hop on Device B

  • Static route to 1.1.3.0 with 1.1.4.6 as the next hop on Device B

  • Default route with 1.1.4.5 as the next hop on Device C

  • Default gateways of PC1, PC2, and PC3

Procedure

  1. Configure an IP address for each interface. For configuration details, see Configuration Files in this section.
  2. Configure static routes.

    # Configure an IPv4 default route on Device A.

    [~DeviceA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2
    [*DeviceA] commit

    # Configure two IPv4 static routes on Device B.

    [~DeviceB] ip route-static 1.1.1.0 255.255.255.0 1.1.4.1
    [*DeviceB] ip route-static 1.1.3.0 255.255.255.0 1.1.4.6
    [*DeviceB] commit

    # Configure an IPv4 default route on Device C.

    [~DeviceC] ip route-static 0.0.0.0 0.0.0.0 1.1.4.5
    [*DeviceC] commit

  3. Configure a default gateway for each host.

    Configure the default gateways of PC1, PC2, and PC3 as 1.1.1.1, 1.1.2.1, and 1.1.3.1 respectively.

  4. Verify the configuration.

    # Check the IP routing table of Device A.

    [~DeviceA] display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 12        Routes : 12
    
    Destination/Mask    Proto  Pre  Cost   Flags    NextHop         Interface
    
            0.0.0.0/0   Static 60   0        RD       1.1.4.2         GigabitEthernet1/0/0
            1.1.1.0/24  Direct 0    0         D       1.1.1.1         GigabitEthernet2/0/0
            1.1.1.1/32  Direct 0    0         D       127.0.0.1       GigabitEthernet2/0/0
          1.1.1.255/32  Direct 0    0         D       127.0.0.1       GigabitEthernet2/0/0
            1.1.4.0/30  Direct 0    0         D       1.1.4.1         GigabitEthernet1/0/0
            1.1.4.1/32  Direct 0    0         D       127.0.0.1       GigabitEthernet1/0/0
            1.1.4.2/32  Direct 0    0         D       1.1.4.2         GigabitEthernet1/0/0
          1.1.4.255/32  Direct 0    0         D       127.0.0.1       GigabitEthernet1/0/0
          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.

    [~DeviceA] ping 1.1.3.1
      PING 1.1.3.1: 56  data bytes, press CTRL_C to break
        Reply from 1.1.3.1: bytes=56 Sequence=1 ttl=254 time=62 ms
        Reply from 1.1.3.1: bytes=56 Sequence=2 ttl=254 time=63 ms
        Reply from 1.1.3.1: bytes=56 Sequence=3 ttl=254 time=63 ms
        Reply from 1.1.3.1: bytes=56 Sequence=4 ttl=254 time=62 ms
        Reply from 1.1.3.1: bytes=56 Sequence=5 ttl=254 time=62 ms
      --- 1.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

    # Run the tracert command to verify the connectivity.

    [~DeviceA] tracert 1.1.3.1
     traceroute to  1.1.3.1(1.1.3.1), max hops: 30 ,packet length: 40
     1 1.1.4.2 31 ms  32 ms  31 ms
     2 1.1.4.6 62 ms  63 ms  62 ms

Configuration Files

  • Device A configuration file

    #
    sysname DeviceA
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 1.1.4.1 255.255.255.252
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 1.1.1.1 255.255.255.0
    #
    ip route-static 0.0.0.0 0.0.0.0 1.1.4.2
    #
    return
  • Device B configuration file

    #
    sysname DeviceB
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 1.1.4.2 255.255.255.252
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 1.1.4.5 255.255.255.252
    #
    interface GigabitEthernet3/0/0
     undo shutdown
     ip address 1.1.2.1 255.255.255.0
    #
    ip route-static 1.1.1.0 255.255.255.0 1.1.4.1
    ip route-static 1.1.3.0 255.255.255.0 1.1.4.6
    #
    return
  • Device C configuration file

    #
    sysname DeviceC
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 1.1.4.6 255.255.255.252
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 1.1.3.1 255.255.255.0
    #
    ip route-static 0.0.0.0 0.0.0.0 1.1.4.5
    #
    return
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055018

Views: 54279

Downloads: 209

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