hcia华为路由器静态路由实验配置

打印 上一主题 下一主题

主题 942|帖子 942|积分 2836

目次
一、网络拓扑分析
二、华为路由器配置(分设备)
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 配置

  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 测试
    ping 192.168.2.2,验证是否能跨网段通信。
  • 路由器路由表检查
    在各路由器执行 display ip routing-table,确认静态路由条目是否见效。

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

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

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

来自云龙湖轮廓分明的月亮

金牌会员
这个人很懒什么都没写!
快速回复 返回顶部 返回列表