IT评测·应用市场-qidao123.com
标题:
hcia华为路由器静态路由实验配置
[打印本页]
作者:
来自云龙湖轮廓分明的月亮
时间:
2025-3-14 15:59
标题:
hcia华为路由器静态路由实验配置
目次
一、网络拓扑分析
二、华为路由器配置(分设备)
1. R1 配置
2. R2 配置
3. R3 配置
三、验证测试
拓扑图
一、网络拓扑分析
IP 地址规划
:
R1:E0/0/0(12.1.1.1/24)、E0/0/1(192.168.1.1/24)
R2:E0/0/0(12.1.1.2/24)、E0/0/1(23.1.1.2/24)
R3:E0/0/0(23.1.1.3/24)、E0/0/1(192.168.2.1/24)
PC1:192.168.1.2/24,网关 192.168.1.1
PC2:192.168.2.2/24,网关 192.168.2.1
二、华为路由器配置(分设备)
1. R1 配置
system-view
[R1] sysname R1 # 设备命名
[R1] interface Ethernet0/0/0
[R1-Ethernet0/0/0] ip address 12.1.1.1 24
[R1-Ethernet0/0/0] quit
[R1] interface Ethernet0/0/1
[R1-Ethernet0/0/1] ip address 192.168.1.1 24
[R1-Ethernet0/0/1] quit
# 配置静态路由(到达 R2、R3 网段)
[R1] ip route-static 23.1.1.0 24 12.1.1.2 # 到 R2 右侧网段的下一跳
[R1] ip route-static 192.168.2.0 24 12.1.1.2 # 到 PC2 网段的下一跳
复制代码
2. R2 配置
system-view
[R2] sysname R2
[R2] interface Ethernet0/0/0
[R2-Ethernet0/0/0] ip address 12.1.1.2 24
[R2-Ethernet0/0/0] quit
[R2] interface Ethernet0/0/1
[R2-Ethernet0/0/1] ip address 23.1.1.2 24
[R2-Ethernet0/0/1] quit
# 配置静态路由(双向互通)
[R2] ip route-static 192.168.1.0 24 12.1.1.1 # 到 PC1 网段的下一跳
[R2] ip route-static 192.168.2.0 24 23.1.1.3 # 到 PC2 网段的下一跳
[R2] ip route-static 12.1.1.0 24 12.1.1.1 # 回程路由(可选,视网络需求)
复制代码
3. R3 配置
system-view
[R3] sysname R3
[R3] interface Ethernet0/0/0
[R3-Ethernet0/0/0] ip address 23.1.1.3 24
[R3-Ethernet0/0/0] quit
[R3] interface Ethernet0/0/1
[R3-Ethernet0/0/1] ip address 192.168.2.1 24
[R3-Ethernet0/0/1] quit
# 配置静态路由(到达 R1、R2 网段)
[R3] ip route-static 192.168.1.0 24 23.1.1.2 # 到 PC1 网段的下一跳
[R3] ip route-static 12.1.1.0 24 23.1.1.2 # 到 R1 直连网段的下一跳
复制代码
三、验证测试
PC1 测试
:
ping 192.168.2.2,验证是否能跨网段通信。
路由器路由表检查
:
在各路由器执行 display ip routing-table,确认静态路由条目是否见效。
通过以上配置,静态路由可实现 PC1 与 PC2 的跨网段通信,路由器之间通过静态路由表转发数据包。
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
欢迎光临 IT评测·应用市场-qidao123.com (https://dis.qidao123.com/)
Powered by Discuz! X3.4