Huawei static routing configuration experiment (super detailed explanation + detailed command line)

Series Article Directory

Huawei Datacom Learning (7)


foreword

1. Static routing configuration

Second, the network address configuration

Configuration of AR1:

Configuration of AR2:

Configuration of AR3:

Third, test whether it is connected

Configuration of AR1:

explain:

Configuration of AR2:

explain:

4. Configure the loopback ip address on AR3

explain:

Five, configure the static routing table

Configuration of AR1:

explain:

Configuration of AR2:

Configuration of AR3:

6. Test whether the loopback address can communicate

Configuration of AR1:

explain:

Configuration of AR3:

explain:

8. Enable AR1 to ping the loopback address of AR3

explain:

Nine, the configuration and testing of silent routing

Clear configured static routes:

Check whether AR1 has a static routing table

write a static route

The ping loopback route can pass

View the static routing table of AR1

test passed

clear configuration

The test fails

Ten, the configuration of the routing table of all routers

Summarize


foreword

With the continuous development of Huawei, the technology of data communication is becoming more and more important. Many people have started learning data communication. This article introduces the static routing configuration experiment. Huawei’s ENSP software is used in this article).


1. Static routing configuration

Second, the network address configuration

Configuration of AR1:

Network address configuration:

<ar1>sys

Enter system view, return user view with Ctrl+Z.

[ar1]interface GigabitEthernet 0/0/0

[ar1-GigabitEthernet0/0/0]ip address 10.1.12.1 24

[ar1-GigabitEthernet0/0/0]

Aug 30 2023 19:32:27-08:00 ar1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.

[ar1-GigabitEthernet0/0/0]q

Configuration of AR2:

Network address configuration:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]sys

[Huawei]sysname ar2

[ar2]interface GigabitEthernet 0/0/0

[ar2-GigabitEthernet0/0/0]ip address 10.1.12.2 24

[ar2-GigabitEthernet0/0/0]int g 0/0/1

[ar2-GigabitEthernet0/0/1]ip address 10.1.23.2 24

Configuration of AR3:

Network address configuration:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]sys

[Huawei]sysname ar3

[ar3]interface GigabitEthernet 0/0/1

[ar3-GigabitEthernet0/0/1]ip address 10.1.23.3 24

[ar3-GigabitEthernet0/0/1]

Aug 30 2023 19:36:50-08:00 ar3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.

[ar3-GigabitEthernet0/0/1]q

Third, test whether it is connected

Configuration of AR1:

[ar1]ping 10.1.23.2

  PING 10.1.23.2: 56  data bytes, press CTRL_C to break

    Request time out

    Request time out

    Request time out

    Request time out

    Request time out

  --- 10.1.23.2 ping statistics ---

    5 packet(s) transmitted

    0 packet(s) received

    100.00% packet loss

explain:

The failure is because AR1 and AR3 are in the same network segment

Configuration of AR2:

[ar2-GigabitEthernet0/0/0]ping 10.1.12.1

  PING 10.1.12.1: 56  data bytes, press CTRL_C to break

    Reply from 10.1.12.1: bytes=56 Sequence=1 ttl=255 time=260 ms

    Reply from 10.1.12.1: bytes=56 Sequence=2 ttl=255 time=20 ms

    Reply from 10.1.12.1: bytes=56 Sequence=3 ttl=255 time=30 ms

    Reply from 10.1.12.1: bytes=56 Sequence=4 ttl=255 time=20 ms

    Reply from 10.1.12.1: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 10.1.12.1 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 20/70/260 ms

explain:

AR2 can ping AR1 through because it is a direct route

4. Configure the loopback ip address on AR3

[ar3]interface LoopBack 1

[ar3-LoopBack1]ip address 1.1.1.1 32

[ar3-LoopBack1]interface LoopBack 2

[ar3-LoopBack2]ip address 2.2.2.2 32

[ar3-LoopBack2]interface LoopBack 3

[ar3-LoopBack3]ip address 3.3.3.3 32

explain:

Any AR3 accessing the loopback address will reply.

Five, configure the static routing table

Configuration of AR1:

[ar1]display ip routing-table 3.3.3.3

[ar1]ip route-static 3.3.3.3 32 GigabitEthernet 0/0/0 10.1.12.2

[ar1]display ip routing-table 3.3.3.3                          

Route Flags: R - relay, D - download to fib

------------------------------------------------------------------------------

Routing Table : Public

Summary Count : 1

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        3.3.3.3/32  Static  60   0           D   10.1.12.2       GigabitEthernet0/0/0

explain:

It can be seen that a routing table with the destination IP address 3.3.3.3 32 , the access port GigabitEthernet 0/0/0, and the next-hop IP address 10.1.12.2 is written in AR1

Configuration of AR2:

add a route

[ar2]ip route-static 3.3.3.3 32 GigabitEthernet 0/0/1 10.1.23.3

View added routes

[ar2]display current-configuration | include ip rou

ip route-static 3.3.3.3 255.255.255.255 GigabitEthernet0/0/1 10.1.23.3

Configuration of AR3:

Routes added and viewed

[ar3]ip route-static 10.1.12.0 24 GigabitEthernet 0/0/1 10.1.23.2

[ar3]display ip routing-table 10.1.12.1

Route Flags: R - relay, D - download to fib

------------------------------------------------------------------------------

Routing Table : Public

Summary Count : 1

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      10.1.12.0/24  Static  60   0           D   10.1.23.2       GigabitEthernet0/0/1

View the total number of routes:

[ar3]display current-configuration | include ip rou

ip route-static 10.1.12.0 255.255.255.0 GigabitEthernet0/0/1 10.1.23.2

6. Test whether the loopback address can communicate

Configuration of AR1:

[ar1]ping 3.3.3.3

  PING 3.3.3.3: 56  data bytes, press CTRL_C to break

    Request time out

    Request time out

    Request time out

    Request time out

    Request time out

  --- 3.3.3.3 ping statistics ---

    5 packet(s) transmitted

    0 packet(s) received

    100.00% packet loss

explain:

It doesn't work because there is no return packet

Configuration of AR3:

<ar3>ping 1.1.1.1

  PING 1.1.1.1: 56  data bytes, press CTRL_C to break

    Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=255 time=20 ms

    Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=255 time=1 ms

    Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=255 time=1 ms

    Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=255 time=1 ms

    Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 1.1.1.1 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 1/4/20 ms

explain:

Prove that the loopback address is normal

8. Enable AR1 to ping the loopback address of AR3

[ar1]ip route-static 10.1.23.0 24 GigabitEthernet 0/0/0 10.1.12.2

[ar1]ip route-static 1.1.1.1 32 GigabitEthernet 0/0/0 10.1.12.2

[ar1]ip route-static 2.2.2.2 32 GigabitEthernet 0/0/0 10.1.12.2

explain:

Configure three routes for AR1 so that AR1 can ping the loopback address of AR3

ping passed

[ar1]ping 1.1.1.1

  PING 1.1.1.1: 56  data bytes, press CTRL_C to break

    Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=254 time=40 ms

    Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=254 time=30 ms

    Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=254 time=20 ms

    Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=254 time=40 ms

    Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 1.1.1.1 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 20/32/40 ms

Nine, the configuration and testing of silent routing

Clear configured static routes:

[ar1]undo ip route-static all

Warning: This operation may lead to the deletion of all the public IPv4 static routes and their configurations. Continue? [Y/N]:y

Check whether AR1 has a static routing table

[ar1]dis ip routing-table protocol static

write a static route

[ar1]ip route-static 0.0.0.0 0 GigabitEthernet 0/0/0 10.1.12.2

The ping loopback route can pass

[ar1]ping 1.1.1.1

  PING 1.1.1.1: 56  data bytes, press CTRL_C to break

    Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=254 time=40 ms

    Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=254 time=30 ms

    Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=254 time=40 ms

    Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=254 time=20 ms

    Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 1.1.1.1 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 20/32/40 ms

View the static routing table of AR1

[ar1]display ip routing-table protocol static

Route Flags: R - relay, D - download to fib

------------------------------------------------------------------------------

Public routing table : Static

         Destinations : 1        Routes : 1        Configured Routes : 1

Static routing table status : <Active>

         Destinations : 1        Routes : 1

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0           D   10.1.12.2       GigabitEthernet0/0/0

Static routing table status : <Inactive>

         Destinations : 0        Routes : 0

test passed

[ar1]ping -c 1 1.1.1.1

  PING 1.1.1.1: 56  data bytes, press CTRL_C to break

    Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=254 time=30 ms

  --- 1.1.1.1 ping statistics ---

    1 packet(s) transmitted

    1 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 30/30/30 ms

clear configuration

[ar1]undo ip route-static all  

Warning: This operation may lead to the deletion of all the public IPv4 static routes and their configurations. Continue? [Y/N]:y

Aug 30 2023 20:48:15-08:00 ar1 %%01RM/4/IPV4_DEFT_RT_CHG(l)[0]:IPV4 default Route is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=GigabitEthernet0/0/0, Nexthop=10.1.12.2, Neighbour=0.0.0.0, Preference=1006632960, Label=NULL, Metric=0)

The test fails

[ar1]ping -c 1 3.3.3.3       

  PING 3.3.3.3: 56  data bytes, press CTRL_C to break

    Request time out

  --- 3.3.3.3 ping statistics ---

    1 packet(s) transmitted

    0 packet(s) received

    100.00% packet loss

[ar1]ping -c 1 1.1.1.1       

  PING 1.1.1.1: 56  data bytes, press CTRL_C to break

    Request time out

  --- 1.1.1.1 ping statistics ---

    1 packet(s) transmitted

    0 packet(s) received

    100.00% packet loss

Ten, the configuration of the routing table of all routers

Route written by AR1

ip route-static 3.3.3.3 255.255.255.255 GigabitEthernet0/0/0 10.1.12.2

ip route-static 10.1.23.0 24 GigabitEthernet 0/0/0 10.1.12.2

ip route-static 1.1.1.1 32 GigabitEthernet 0/0/0 10.1.12.2

ip route-static 2.2.2.2 32 GigabitEthernet 0/0/0 10.1.12.2

Route written by AR2

ip route-static 3.3.3.3 255.255.255.255 GigabitEthernet0/0/1 10.1.23.3

ip route-static 2.2.2.2 32 GigabitEthernet 0/0/1 10.1.23.3

ip route-static 1.1.1.1 32 GigabitEthernet 0/0/1 10.1.23.3

Route written by AR3

ip route-static 10.1.12.0 255.255.255.0 GigabitEthernet0/0/1 10.1.23.2


Summarize

Congratulations, you have passed the static routing configuration experiment in this chapter. Huawei Datacom still has many treasures waiting for you to explore, come on! Just to become a better version of myself.

Guess you like

Origin blog.csdn.net/weixin_73466540/article/details/132590684