学习HCIA的第三节------静态路由

1.实验拓扑:

2.实验要求:

 

 

3.实验代码:

AR1:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR1
[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip ad	
[AR1-GigabitEthernet0/0/0]ip address 192.168.12.1 24
Mar 27 2023 15:39:57-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]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip ad	
[AR1-GigabitEthernet0/0/1]ip address 
[AR1-GigabitEthernet0/0/1]ip address 172.16.10.1 24
Mar 27 2023 15:40:38-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR1-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

<AR1>
<AR1>
<AR1>sys
Enter system view, return user view with Ctrl+Z.
[AR1]ip rou	
[AR1]ip route
[AR1]ip route-static 172.16.20.0 24 192.168.12.2
[AR1]ip rou	
[AR1]ip route
[AR1]ip route-static172.16.30.0 24 192.168.12.2
        ^
Error: Unrecognized command found at '^' position.
[AR1]ip route-static 172.16.30.0 24 192.168.12.2
[AR1]
<AR1>

 AR2:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR2
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip ad	
[AR2-GigabitEthernet0/0/0]ip address 192.168.12.2 24
Mar 27 2023 15:41:18-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR2-GigabitEthernet0/0/0]int g0/0/1
[AR2-GigabitEthernet0/0/1]ip ad	
[AR2-GigabitEthernet0/0/1]ip address 192.168.23.2 24
Mar 27 2023 15:41:41-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR2-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

<AR2>
<AR2>
<AR2>
<AR2>sys
Enter system view, return user view with Ctrl+Z.
[AR2]
[AR2]ip 	
[AR2]ip rou	
[AR2]ip route-static 172.16.10.0 24 192.168.23.3
[AR2]ip rou	
[AR2]ip route-static 172.16.10.0 24 192.168.12.1
[AR2]ip rou	
[AR2]ip route-static 172.168.20.0 24 192.168.23.3
[AR2]ip rou	
[AR2]ip route 	
[AR2]ip route-static 172.16.30.0 24 192.168.23.3
[AR2]ip route-static 172.16.20.0 24 192.168.23.3
[AR2]
[AR2]
[AR2]

AR3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR3
[AR3]int g0/0/1
[AR3-GigabitEthernet0/0/1]ip ad	
[AR3-GigabitEthernet0/0/1]ip address 192.168.23.3 24
Mar 27 2023 15:42:24-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]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip ad	
[AR3-GigabitEthernet0/0/0]ip address 192.168.34.3 24
Mar 27 2023 15:42:39-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR3-GigabitEthernet0/0/0]int g0/0/2
[AR3-GigabitEthernet0/0/2]ip ad	
[AR3-GigabitEthernet0/0/2]ip address 172.16.20.3 24
[AR3-GigabitEthernet0/0/2]
Mar 27 2023 15:43:02-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
 on the interface GigabitEthernet0/0/2 has entered the UP state. 
[AR3-GigabitEthernet0/0/2]q
[AR3]

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

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

<AR3>sys
Enter system view, return user view with Ctrl+Z.
[AR3]ip rou	
[AR3]ip route
[AR3]ip route-static 172.16.10.0 24 192.168.23.2
[AR3]ip route-static 172.16.30.0 24 192.168.34.3
Error: The next-hop address is invalid.
[AR3]ip route-static 172.16.30.0 24 192.168.34.4
[AR3]
[AR3]
[AR3]

AR4:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR4
[AR4]int g0/0/0
[AR4-GigabitEthernet0/0/0]ip ad	
[AR4-GigabitEthernet0/0/0]ip address 192.168.34.4 24
Mar 27 2023 15:43:35-08:00 AR4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR4-GigabitEthernet0/0/0]int g0/0/1
[AR4-GigabitEthernet0/0/1]ip ad	
[AR4-GigabitEthernet0/0/1]ip address 172.16.30.4 24
Mar 27 2023 15:43:53-08:00 AR4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR4-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

<AR4>sys
Enter system view, return user view with Ctrl+Z.
[AR4]ip rou	
[AR4]ip route
[AR4]ip route-static 172.16.10.0 24 192.168.34.3
[AR4]ip rou	
[AR4]ip route
[AR4]ip route-static 172.16.20.0 24 192.168.34.3
[AR4]q
<AR4>dis

测试结果:

 

 

猜你喜欢

转载自blog.csdn.net/qq_62466609/article/details/129797230