eNSP 静态路由


㊀ 构建拓扑图

在这里插入图片描述

㊁ 配置PCipv4地址

pc1

在这里插入图片描述

pc2

在这里插入图片描述

㊂ 配置路由器

静态路由简介

/系统视图下,配置R1到不同网段的静态路由

[R1]ip route-static 192.168.20.0 24 172.16.16.2

                /目的网段、子网掩码、下一跳地址

注:结合拓扑图思考,思路更清晰。

AR1

配置端口IP地址

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.10.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 172.16.16.1 24

静态路由

[R1]ip route-static 192.168.20.0 24 172.16.16.2
[R1]quit
save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait…
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated

AR2

配置端口IP地址

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.20.1 24
[R2-GigabitEthernet0/0/0]quit
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 172.16.16.2 24

静态路由

[R2]ip route-static 192.168.10.0 24 172.16.16.1
[R2]quit
save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait…
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated

㊃ 查看路由表

ping操作

pc1 ping pc2

在这里插入图片描述

pc2 ping pc1

在这里插入图片描述

㊄ 路由追踪

pc2 追踪 pc1

在这里插入图片描述

㊅ 总结

pc网关一定要配置,静态路由的三个关键一定不要混淆,目的网段、子网掩码和下一跳地址。多结合拓扑图思考,思路理清晰,效果更好。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

梁辰兴

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值