hcia-- 静态综合综合实验报告

      最后更新:2022-07-11 04:33

      题目要求

      1、问题分析

      • 要求1和2表明,AR5路由器只需要一个环返回地址,其余的路由器由两个路由器处理,路由器的工作原理也已知,路由器只允许通过单播,隔绝广播。因此,每个路由器的端口代表一个广播区域(也是路由器和路由器连接之间的广播区域)。因此,从图表中可以看出,总共有14个广播域(AR5路由器的环回路地址已确定,不需要分配)。
      • 我们经常认为,第一个办法是从主机借4个,这样你就可以有16个广播区域。 但是我们需要知道,子网是分开的真正意义它易于管理,易于组合。
        路由器和路由器之间只有两个接口,只有两个ips被分配,并且因为所有0和所有1不是特别ips,只有两个ips可以满足路由器和路由器之间的广播区域的ip分配。
        除AR5外,每个路由器只有两个循环返回地址,所以我们可以将一个子网分配给每个路由器,然后把子网借给主机并将其分成两个较小的子网,每个都分配给两个循环返回地址。
        综上所述,除AR5以外的每一个路由器划分一个子网,再加上所有线路共同使用一个子网,一个需要5(4+1)个广播域,所以只需要将将网段192.168.1.0/24划分为8个子网即可所以你需要从主机借三台。
      • 由要求3可知不能直接编写到达5.5.5.0/24的静态路由,所以需要使用到缺省路由
      • 要求5要求在已知的AR4和AR5路由之间使用浮动静态

      2、操作

      2.1、拓扑图

      2.2部分代码配置代码

      AR1路由器配置

      <Huawei>system-viem
      [Huawei]sysname r1                更改路由器名称

      配置环回地址
      [r1]interfaceloop Back 1
      [r1-LoopBack1]ip address192.168.1.33 28
      [r1-LoopBack1]q
      [r1]int loopBack 2
      [r1-LoopBack2]ip address192.168.1.49 28
      [r1-LoopBack2]q

      配置路由器接口ip
      [r1]interface g0/0/0
      [r1-GigabitEthernet0/0/0]ip address192.168.1.1 30
      [r1-GigabitEthernet0/0/0]q
      [r1]interface g0/0/1
      [r1-GigabitEthernet0/0/1]ip address192.168.1.5 30

      配置缺省路由
      [r1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
      [r1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.6


      配置空接口
      [r1]ip route-static 192.168.1.32 27 null 0

      向路由表添加路径
      [r1]ip route-static 192.168.1.64 27 192.168.1.2
      [r1]ip route-static 192.168.1.96 27 192.168.1.6
      [r1]ip route-static 192.168.1.128 27 192.168.1.2
      [r1]ip route-static 192.168.1.128 27 192.168.1.6
      [r1]ip route-static 192.168.1.8 30 192.168.1.2
      [r1]ip route-static 192.168.1.16 30 192.168.1.2
      [r1]ip route-static 192.168.1.20 30 192.168.1.2
      [r1]ip route-static 192.168.1.12 30 192.168.1.6
      [r1]ip route-static 192.168.1.16 30 192.168.1.6
      [r1]ip route-static 192.168.1.20 30 192.168.1.6

      AR2路由器配置
      <Huawei>system-viem

      为路由器取名
      [Huawei]sysnname r2

      配置环回地址
      [r2]int loopBack 1
      [r2-LoopBack1]ip add 192.168.1.65 28        为环回地址配置ip
      [r2-LoopBack1]q
      [r2]int loopBack 2
      [r2-LoopBack2]ip add 192.168.1.81 28
      [r2-LoopBack2]q

      配置路由器接口ip
      [r2]int g0/0/0
      [r2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
      [r2-GigabitEthernet0/0/0]q
      [r2]int g0/0/1
      [r2-GigabitEthernet0/0/1]ip add 192.168.1.9 30

      配置缺省路由
      [r2]ip route-static 0.0.0.0 0 192.168.1.10

      向路由表添加路径
      [r2]ip route-static 192.168.1.32 27 192.168.1.1
      [r2]ip route-static 192.168.1.96 27 192.168.1.1
      [r2]ip route-static 192.168.1.96 27 192.168.1.10
      [r2]ip route-static 192.168.1.128 27 192.168.1.10
      [r2]ip route-static 192.168.1.4 30 192.168.1.1
      [r2]ip route-static 192.168.1.8 30 192.168.1.10
      [r2]ip route-static 192.168.1.16 30 192.168.1.10
      [r2]ip route-static 192.168.1.20 30 192.168.1.10

      配置口接口
      [r2]ip route-static 192.168.1.64 27 null 0

      AR3路由器配置

      <Huawei>system-viem

      为路由器取名
      [Huawei]sysnname r3

      配置环回地址
      [r3]int loopBack 1
      [r3-LoopBack1]ip add 192.168.1.97 28        为环回地址配置ip
      [r3-LoopBack1]q
      [r3]int loopBack 2
      [r3-LoopBack2]ip add 192.168.1.113 28
      [r3-LoopBack2]q

      配置路由器接口ip
      [r3]int g0/0/0
      [r3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
      [r3-GigabitEthernet0/0/0]q
      [r3]int g0/0/1
      [r3-GigabitEthernet0/0/1]ip add 192.168.1.13 30

      配置缺省路由
      [r3]ip route-static 0.0.0.0 0 192.168.1.14

      向路由表添加路径
      [r3]ip route-static 192.168.1.32 27 192.168.1.5
      [r3]ip route-static 192.168.1.64 27 192.168.1.5
      [r3]ip route-static 192.168.1.64 27 192.168.1.14
      [r3]ip route-static 192.168.1.128 27 192.168.1.14
      [r3]ip route-static 192.168.1.0 30 192.168.1.5
      [r3]ip route-static 192.168.1.8 30 192.168.1.4
      [r3]ip route-static 192.168.1.16 30 192.168.1.4
      [r3]ip route-static 192.168.1.20 30 192.168.1.4

      配置空接口
      [r3]ip route-static 192.168.1.96 27 null 0

      AR4路由器的配置

      <Huawei>system-viem

      为路由器取名
      [Huawei]sysnname r4

      配置环回地址
      [r4]int loopBack 1
      [r4-LoopBack1]ip add 192.168.1.129 28        为环回地址配置ip
      [r4-LoopBack1]q
      [r4]int loopBack 2
      [r4-LoopBack2]ip add 192.168.1.145 28
      [r4-LoopBack2]q

      配置路由器接口ip
      [r4]int g0/0/0
      [r4-GigabitEthernet0/0/0]ip add 192.168.1.10 30
      [r4-GigabitEthernet0/0/0]q
      [r4]int g0/0/1
      [r4-GigabitEthernet0/0/1]ip add 192.168.1.21 30
      [r4]int g0/0/2
      [r4-GigabitEthernet0/0/2]ip add 192.168.1.14 30
      [r4]int E4/0/0
      [r4-Ethernet4/0/0]ip add 192.168.1.17 30

      配置缺省路由
      [r4]ip route-static 0.0.0.0 0 192.168.1.18 preference 70   设置浮动静态
      [r4]ip route-static 0.0.0.0 0 192.168.1.22

      向路由表添加路径
      [r4]ip route-static 192.168.1.32 27 192.168.1.9
      [r4]ip route-static 192.168.1.32 27 192.168.1.13
      [r4]ip route-static 192.168.1.96 27 192.168.1.13
      [r4]ip route-static 192.168.1.64 27 192.168.1.9
      [r4]ip route-static 192.168.1.0 30 192.168.1.9
      [r4]ip route-static 192.168.1.4 30 192.168.1.13

      配置空接口
      [r4]ip route-static 192.168.1.128 27 null 0

      AR5路由器配置

      <Huawei>system-viem

      为路由器取名
      [Huawei]sysnname r5

      配置环回地址
      [r5]int loopBack 1
      [r5-LoopBack1]ip add 5.5.5.5 24
      [r5-LoopBack1]q

      配置路由器接口ip
      [r5]int g0/0/0
      [r5-GigabitEthernet0/0/0]ip add 192.168.1.22 30
      [r4-GigabitEthernet0/0/0]q
      [r4]int g0/0/1
      [r4-GigabitEthernet0/0/1]ip add 192.168.1.18 30

      向路由表添加路径
      [r5]ip route-static 192.168.1.32 27 192.168.1.21
      [r5]ip route-static 192.168.1.64 27 192.168.1.21
      [r5]ip route-static 192.168.1.96 27 192.168.1.21
      [r5]ip route-static 192.168.1.128 27 192.168.1.21
      [r5]ip route-static 192.168.1.0 30 192.168.1.21
      [r5]ip route-static 192.168.1.4 30 192.168.1.21
      [r5]ip route-static 192.168.1.8 30 192.168.1.21
      [r5]ip route-static 192.168.1.12 30 192.168.1.21
      [r5]ip route-static 192.168.1.12 30 192.168.1.17 pre
      [r5]ip route-static 192.168.1.12 30 192.168.1.17 preference 70
      [r5]ip route-static 192.168.1.18 30 192.168.1.17 preference 70
      [r5]ip route-static 192.168.1.8 30 192.168.1.17 preference 70
      [r5]ip route-static 192.168.1.4 30 192.168.1.17 preference 70
      [r5]ip route-static 192.168.1.0 30 192.168.1.17 preference 70
      [r5]ip route-static 192.168.1.32 27 192.168.1.17 preference 70
      [r5]ip route-static 192.168.1.64 27 192.168.1.17 preference 70
      [r5]ip route-static 192.168.1.96 27 192.168.1.17 preference 70
      [r5]ip route-static 192.168.1.128 27 192.168.1.17 preference 70

      3、测试

      本文由 在线网速测试 整理编辑,转载请注明出处。

          热门文章

          文章分类