IT评测·应用市场-qidao123.com

标题: hcia华为路由器静态路由实验配置 [打印本页]

作者: 来自云龙湖轮廓分明的月亮    时间: 2025-3-14 15:59
标题: hcia华为路由器静态路由实验配置
目次
一、网络拓扑分析
二、华为路由器配置(分设备)
1. R1 配置
2. R2 配置
3. R3 配置
三、验证测试


拓扑图


一、网络拓扑分析



二、华为路由器配置(分设备)

1. R1 配置

  1. system-view
  2. [R1] sysname R1  # 设备命名
  3. [R1] interface Ethernet0/0/0
  4. [R1-Ethernet0/0/0] ip address 12.1.1.1 24
  5. [R1-Ethernet0/0/0] quit
  6. [R1] interface Ethernet0/0/1
  7. [R1-Ethernet0/0/1] ip address 192.168.1.1 24
  8. [R1-Ethernet0/0/1] quit
  9. # 配置静态路由(到达 R2、R3 网段)
  10. [R1] ip route-static 23.1.1.0 24 12.1.1.2  # 到 R2 右侧网段的下一跳
  11. [R1] ip route-static 192.168.2.0 24 12.1.1.2  # 到 PC2 网段的下一跳
复制代码
2. R2 配置

  1. system-view
  2. [R2] sysname R2
  3. [R2] interface Ethernet0/0/0
  4. [R2-Ethernet0/0/0] ip address 12.1.1.2 24
  5. [R2-Ethernet0/0/0] quit
  6. [R2] interface Ethernet0/0/1
  7. [R2-Ethernet0/0/1] ip address 23.1.1.2 24
  8. [R2-Ethernet0/0/1] quit
  9. # 配置静态路由(双向互通)
  10. [R2] ip route-static 192.168.1.0 24 12.1.1.1  # 到 PC1 网段的下一跳
  11. [R2] ip route-static 192.168.2.0 24 23.1.1.3  # 到 PC2 网段的下一跳
  12. [R2] ip route-static 12.1.1.0 24 12.1.1.1  # 回程路由(可选,视网络需求)
复制代码
3. R3 配置

  1. system-view
  2. [R3] sysname R3
  3. [R3] interface Ethernet0/0/0
  4. [R3-Ethernet0/0/0] ip address 23.1.1.3 24
  5. [R3-Ethernet0/0/0] quit
  6. [R3] interface Ethernet0/0/1
  7. [R3-Ethernet0/0/1] ip address 192.168.2.1 24
  8. [R3-Ethernet0/0/1] quit
  9. # 配置静态路由(到达 R1、R2 网段)
  10. [R3] ip route-static 192.168.1.0 24 23.1.1.2  # 到 PC1 网段的下一跳
  11. [R3] ip route-static 12.1.1.0 24 23.1.1.2  # 到 R1 直连网段的下一跳
复制代码
三、验证测试



通过以上配置,静态路由可实现 PC1 与 PC2 的跨网段通信,路由器之间通过静态路由表转发数据包。

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 IT评测·应用市场-qidao123.com (https://dis.qidao123.com/) Powered by Discuz! X3.4