Huawei ENSP static routing experiment

  1. Static routing refers to routing information manually configured by users or network administrators. When the network topology or link status changes, network administrators need to manually modify the static routing information. Compared with dynamic routing protocols, static routing does not require frequent exchange of their own routing tables and is simple to configure. More suitable for small, simple network environment.

  2. Insert picture description here

  3. First configure the IP
    port. Configure the IP address part. Command = ip add "ip address" "subnet mask"
    The host bit of the IP address is its device number. For example, if the R1 S0/0/0 port is in the 192.168.12.0 network segment, the port is The IP is 192.168.12.1. And so on.
    Here I set the E 0/0/0 port of R2 to 192.168.20.2 /24. Therefore, the gateway address of PC2 is 192.168.20.3/24.
    Here I set E 0/0 of R1 The /0 port is configured as 192.168.10.1/24, so the gateway address of PC1 is 192.168.10.1/24.

Experimental steps

[R1][R1]ip route-static 192.168.20.0 24 10.0.12.2
在R1上配置目的网段为PC-2所在网段的静态路由,地址为
192.168.20.0 子网掩码为255.255.255.0,数据发送到PC-2
需要先发送给R2,所以R2为R1的下一跳路由器,之间的直连链路
上的物理接口的IP地址即为下一跳IP地址,为10.0.12.2.
<R1>display ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 8        Routes : 8        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      10.0.12.0/24  Direct  0    0           D   10.0.12.1       Serial0/0/0
      10.0.12.1/32  Direct  0    0           D   127.0.0.1       Serial0/0/0
      10.0.12.2/32  Direct  0    0           D   10.0.12.2       Serial0/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
   192.168.10.0/24  Direct  0    0           D   192.168.10.1    Ethernet0/0/0
   192.168.10.1/32  Direct  0    0           D   127.0.0.1       Ethernet0/0/0
   192.168.20.0/24  Static  60   0          RD   10.0.12.2       Serial0/0/0
   **(就在上面,我头顶)可以看到R1上有PC-2所在网段的路由信息.**

[R2]ip route-static 192.168.20.0 24 10.0.23.3
**R2上做同样的配置,下一跳为R3的10.0.23.3.**
[R2]display ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 9        Routes : 9        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      10.0.12.0/24  Direct  0    0           D   10.0.12.2       Serial0/0/0
      10.0.12.1/32  Direct  0    0           D   10.0.12.1       Serial0/0/0
      10.0.12.2/32  Direct  0    0           D   127.0.0.1       Serial0/0/0
      10.0.23.0/24  Direct  0    0           D   10.0.23.2       Serial0/0/1
      10.0.23.2/32  Direct  0    0           D   127.0.0.1       Serial0/0/1
      10.0.23.3/32  Direct  0    0           D   10.0.23.3       Serial0/0/1
      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
   192.168.20.0/24  Static  60   0          RD   10.0.23.3       Serial0/0/1
**这里再查看一下,确定有PC-2所在的网段路由信息.**

PC>ping 192.168.20.20

Ping 192.168.20.20: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
Request timeout!

--- 192.168.20.20 ping statistics ---
  5 packet(s) transmitted
  0 packet(s) received
  100.00% packet loss
**这里用PC-1pingPC-2 发现无法建立连接,因为现在的配置
只是PC-1能够发送给PC-2数据,但是PC-2无法传送给PC-1.**
[R3]ip route-static 192.168.10.0 24 10.0.23.2
**在R3上配置去往PC-1网段的静态路由.**
[R2]ip route-static 192.168.10.0 24 10.0.12.1
**在R2上配置去往PC-1网段的静态路由.**
PC>ping 192.168.20.20

Ping 192.168.20.20: 32 data bytes, Press Ctrl_C to break
From 192.168.20.20: bytes=32 seq=1 ttl=125 time=94 ms
From 192.168.20.20: bytes=32 seq=2 ttl=125 time=125 ms
From 192.168.20.20: bytes=32 seq=3 ttl=125 time=125 ms
From 192.168.20.20: bytes=32 seq=4 ttl=125 time=109 ms
From 192.168.20.20: bytes=32 seq=5 ttl=125 time=125 ms

--- 192.168.20.20 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 94/115/125 ms
**最后成功ping通**

New bloggers, with limited qualifications, please feel free to enlighten me if there are any shortcomings.

Guess you like

Origin blog.csdn.net/qq_52857832/article/details/113712844