R1上操作

The device is running!
##########
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy R1
[R1]undo in	
[R1]undo info-center en	
[R1]undo info-center enable 
Info: Information center is disabled.


[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 24 配置ip
[R1-GigabitEthernet0/0/0]undo sh	
[R1-GigabitEthernet0/0/0]undo shutdown 激活接口
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]dis th	
[R1-GigabitEthernet0/0/0]dis thi	
[R1-GigabitEthernet0/0/0]di	
[R1-GigabitEthernet0/0/0]di	
[R1-GigabitEthernet0/0/0]direct-route
[R1-GigabitEthernet0/0/0]discard
[R1-GigabitEthernet0/0/0]display th	
[R1-GigabitEthernet0/0/0]display this 查看刚才的配置内容
[V200R003C00]
#
interface GigabitEthernet0/0/0
 ip address 12.1.1.1 255.255.255.0 
#
return
[R1-GigabitEthernet0/0/0]q
[R1]ping 12.1.1.2
  PING 12.1.1.2: 56  data bytes, press CTRL_C to break
    Reply from 12.1.1.2: bytes=56 Sequence=1 ttl=255 time=70 ms
    Reply from 12.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 12.1.1.2: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 12.1.1.2: bytes=56 Sequence=4 ttl=255 time=40 ms
    Reply from 12.1.1.2: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 12.1.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/32/70 ms

[R1]dis	
[R1]display ip 	
[R1]display ip ro	
[R1]display ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 7        Routes : 7        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       12.1.1.0/24  Direct  0    0           D   12.1.1.1        GigabitEthernet
0/0/0
       12.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
     12.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/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

[R1]ip ro	
[R1]ip route-	
[R1]ip route-static 
[R1]ip route-static 23.1.1.0 24
                                ^
Error:Incomplete command found at '^' position.
[R1]ip route-static 23.1.1.0 24 12.1.1.2 ?
  description   Add or delete description of unicast static route
  inherit-cost  Inherit the cost of the iterated route
  permanent     Specifies route permanent
  preference    Specifies route preference
  tag           Specifies route tag
  track         Specify track object
  <cr>          Please press ENTER to execute command 
[R1]ip route-static 23.1.1.0 24 12.1.1.2 
[R1]dis ip ro	
[R1]dis 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

       12.1.1.0/24  Direct  0    0           D   12.1.1.1        GigabitEthernet
0/0/0
       12.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
     12.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
       23.1.1.0/24  Static  60   0          RD   12.1.1.2        GigabitEthernet
0/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

[R1]ping 23.1.1.2
  PING 23.1.1.2: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Request time out
    Request time out
    Request time out

  --- 23.1.1.2 ping statistics ---
    5 packet(s) transmitted
    0 packet(s) received
    100.00% packet loss

[R1]ping 23.1.1.2
  PING 23.1.1.2: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Request time out
    Request time out
    Request time out

  --- 23.1.1.2 ping statistics ---
    5 packet(s) transmitted
    0 packet(s) received
    100.00% packet loss

[R1]ping 12.1.1.2
  PING 12.1.1.2: 56  data bytes, press CTRL_C to break
    Reply from 12.1.1.2: bytes=56 Sequence=1 ttl=255 time=20 ms
    Reply from 12.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 12.1.1.2: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 12.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 12.1.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 12.1.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/22/30 ms

[R1]ping 23.1.1.2
  PING 23.1.1.2: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Request time out
    Request time out
    Request time out

  --- 23.1.1.2 ping statistics ---
    5 packet(s) transmitted
    0 packet(s) received
    100.00% packet loss

[R1]ping 23.1.1.2
  PING 23.1.1.2: 56  data bytes, press CTRL_C to break
    Reply from 23.1.1.2: bytes=56 Sequence=1 ttl=254 time=20 ms
    Reply from 23.1.1.2: bytes=56 Sequence=2 ttl=254 time=20 ms
    Reply from 23.1.1.2: bytes=56 Sequence=3 ttl=254 time=20 ms
    Reply from 23.1.1.2: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 23.1.1.2: bytes=56 Sequence=5 ttl=254 time=20 ms

  --- 23.1.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/20/20 ms

在R2上操作

undo info-center enable 主要是这个关闭回显信息,可关可 不关,看个人情况呢
The device is running!
############################################################
<Huawei>
<Huawei>
<Huawei>
<Huawei>
<Huawei>
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]undo in	
[Huawei]undo info-center en	
[Huawei]undo info-center enable 
Info: Information center is disabled.
[Huawei]sy R3
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 12.1.1.2 24
[R3-GigabitEthernet0/0/1]undo shu	
[R3-GigabitEthernet0/0/1]undo shutdown 
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R3-GigabitEthernet0/0/1]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 23.1.1.1 24
[R3-GigabitEthernet0/0/0]undo sh	
[R3-GigabitEthernet0/0/0]undo shutdown 
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R3-GigabitEthernet0/0/0]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

在R3上操作

主要是下面个一条命令,查看路由表,

[Huawei]dis 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

       12.1.1.0/24  Static  60   0          RD   23.1.1.1        GigabitEthernet
0/0/1
       23.1.1.0/24  Direct  0    0           D   23.1.1.2        GigabitEthernet
0/0/1
       23.1.1.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
     23.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/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
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
##############
<Huawei>
Aug 11 2025 06:46:48-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEt
hernet0/0/1 has turned into UP state.
<Huawei>
<Huawei>
<Huawei>
<Huawei>
<Huawei>
<Huawei>
<Huawei>
<Huawei>
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]un	
[Huawei]undo in	
[Huawei]undo info-center en	
[Huawei]undo info-center enable 
Info: Information center is disabled.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 23.1.1.2 24
[Huawei-GigabitEthernet0/0/1]undo 	
[Huawei-GigabitEthernet0/0/1]undo shu	
[Huawei-GigabitEthernet0/0/1]undo shutdown 
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[Huawei-GigabitEthernet0/0/1]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]ip ro	
[Huawei]ip route-s	
[Huawei]ip route-static 12.1.1.0 24 23.1.1.1
[Huawei]dis ip ro	
[Huawei]dis 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

       12.1.1.0/24  Static  60   0          RD   23.1.1.1        GigabitEthernet
0/0/1
       23.1.1.0/24  Direct  0    0           D   23.1.1.2        GigabitEthernet
0/0/1
       23.1.1.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
     23.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/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
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

[Huawei]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on