静态路由练习

1、​​​​​​拓扑图

  2、需求分析

网络设备在启动之后,当设备的接口处于UP状态时,设备能够自己去发现去往与自己接口直连相 连的网络的路由。

3、所有配置内容

路由器操作如下:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR1
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.1.100 24
Apr 22 2023 19:16:16-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR1-GigabitEthernet0/0/0]q
[AR1]interface GigabitEthernet 0/0/1
[AR1-GigabitEthernet0/0/1]ip address 12.1.1.1 30
Apr 22 2023 19:16:55-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR1-GigabitEthernet0/0/1]q
[AR1]ip route-static 23.1.1.0 30 12.1.1.2
[AR1]ip route-static 192.168.2.0 24 12.1.1.2
[AR1]ip route-static 192.168.3.0 24 12.1.1.2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR2
[AR2]interface GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]ip address 192.168.2.100 24
Apr 22 2023 19:18:56-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]q
[AR2]interface GigabitEthernet 0/0/1
[AR2-GigabitEthernet0/0/1]ip address 12.1.1.2 30
Apr 22 2023 19:19:32-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]q
[AR2]interface GigabitEthernet 0/0/2
[AR2-GigabitEthernet0/0/2]ip address 23.1.1.1 30
Apr 22 2023 19:20:08-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
 on the interface GigabitEthernet0/0/2 has entered the UP state. 
[AR2-GigabitEthernet0/0/2]q
[AR2]ip route-static 192.168.1.0 24 12.1.1.1
[AR2]ip route-static 192.168.3.0 24 23.1.1.2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR3
[AR3]interface GigabitEthernet 0/0/0
[AR3-GigabitEthernet0/0/0]ip address 192.168.3.100 24
Apr 22 2023 19:21:37-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR3-GigabitEthernet0/0/0]q
[AR3]interface GigabitEthernet 0/0/1
[AR3-GigabitEthernet0/0/1]ip address 23.1.1.2 30
Apr 22 2023 19:22:12-08:00 AR3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[AR3-GigabitEthernet0/0/1]q
[AR3]ip route-static 192.168.1.0 24 23.1.1.1
[AR3]ip route-static 192.168.2.0 24 23.1.1.1
[AR3]ip route-static 12.1.1.0 30 23.1.1.1

客户端操作如下:

 

 

 4、测试结果

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值