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

18 篇文章 13 订阅
12 篇文章 0 订阅
该文展示了对四台华为路由器(AR1,AR2,AR3,AR4)的配置过程,包括进入系统视图,设置接口IP地址,以及配置静态路由。AR1和AR2分别连接了172.16.10.0/24和172.16.20.0/24的子网,而AR3和AR4则用于连接不同子网并建立路由。在配置过程中,AR3遇到了无效下一跳地址的错误。
摘要由CSDN通过智能技术生成

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

测试结果:

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值