HCIA---静态路由综合实验

陈鑫


编写实验报告:

1、拓扑信息

2、要求及分析

3、IP规划

4.配置截图

5.测试


1、拓扑信息

2.要求及分析

分析1:用VLSM技术----可变长子网掩码(无类分址)---子网划分

实现方法---通过从主机位借位到网络位的方式,达到将一个大的网段划分为多个小的网段。将网段192.168.1.0/24分为17个小网段(本实验需要17个网段)

思路:17个广播域:七个连接设备的骨干链路(直接把两个链路相连)+10个环回
把七个骨干链路看成一个网段,然后把这个网段继续划分
换回划法:每个路由器有两个环回,把两个环回当成一个用户网段(掩码往后加一位,就可以满足两个换回网段) 好处:  另一台路由器配置静态路由到达该路由器只需要到达该 汇总  的一个网段(母网相同,掩码相同)
所以要划 六  个网段   2的3次方  8  余2  借3位
192.168.1.0/24
192.168.1.000 00000/27---192.168.1.0/27---骨干电路
  192.168.1.000 000 00/30---192.168.1.0/30  例:IP数:2的2次方=4,全0全1不能用 -2=2
  192.168.1.000 001 00/30---192.168.1.4/30  7~12满足前六条骨干链路,最后一条骨干链                                               路,  一条掩码为30 的网段不能满足3个IP,                                             正好与一条保留地址汇总
  192.168.1.000 010 00/30---192.168.1.8/30
  192.168.1.000 011 00/30---192.168.1.12/30
  192.168.1.000 100 00/30---192.168.1.16/30
  192.168.1.000 101 00/30---192.168.1.20/30
  192.168.1.000 110 00/30---192.168.1.24/30
  192.168.1.000 111 00/30---192.168.1.28/30---保留地址
                            192.168.1.24/29---DHCP
192.168.1.001 00000/27---192.168.1.32/27---R3环回
  192.168.1.001 0 0000/28---192.168.1.32/28
  192.168.1.001 1 0000/28---192.168.1.48/28                        
192.168.1.010 00000/27---192.168.1.64/27---R4环回
  192.168.1.010 0 0000/28---192.168.1.64/28
  192.168.1.010 1 0000/28---192.168.1.80/28
192.168.1.011 00000/27---192.168.1.96/27---R5环回
  192.168.1.011 0 000/28---192.168.1.96/28
  192.168.1.011 1 000/28---192.168.1.112/28
192.168.1.100 00000/27---192.168.1.128/27---R6环回
  192.168.1.100 0 000/28---192.168.1.128/28
  192.168.1.100 1 000/28---192.168.1.144/28
192.168.1.101 00000/27---192.168.1.160/27---R7环回
  192.168.1.100 0 000/28---192.168.1.160/28
  192.168.1.100 1 000/28---192.168.1.176/28
192.168.1.110 00000/27---192.168.1.196/27---保留地址
192.168.1.111 00000/27---192.168.1.224/27---保留地址

分析2:路由器R7使用DHCP协议,给PC1,PC2分配IP地址

分析3:每台路由器设置两个环回,是指两个网段

分析4:全网负载均衡就是指等价路由

分析5:减少路由表数量,利用路由表汇总,缺省进行一个纯优化过程

分析6:全网可达,ping测试

3.IP规划

+每台路由器设置两个环路IP

AR3

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int    
[Huawei]interface   G    
[Huawei]interface   GigabitEthernet   0/0/0 
[Huawei-GigabitEthernet0/0/0]ip addre    
[Huawei-GigabitEthernet0/0/0]ip address  192.168.1.1 30
[Huawei-GigabitEthernet0/0/0]
Mar 20 2023 13:49:23-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]int    
[Huawei]interface  G    
[Huawei]interface  GigabitEthernet   0/0/1
[Huawei-GigabitEthernet0/0/1]ip add    
[Huawei-GigabitEthernet0/0/1]ip address  192.168.1.5  30
Mar 20 2023 13:50:32-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int    
[Huawei]interface    loop    
[Huawei]interface    LoopBack   0
[Huawei-LoopBack0]ip add    
[Huawei-LoopBack0]ip address  192.168.1.33 28
[Huawei-LoopBack0]int      
[Huawei-LoopBack0]int 1
                      ^
Error: Unrecognized command found at '^' position.
[Huawei-LoopBack0]int l 1
[Huawei-LoopBack1]ip add    
[Huawei-LoopBack1]ip address   192.168.1.49  28

AR4

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int     
[Huawei]interface  g    
[Huawei]interface  GigabitEthernet  0/0/0
[Huawei-GigabitEthernet0/0/0]ip add    
[Huawei-GigabitEthernet0/0/0]ip address  192.168.1.2  30
Mar 20 2023 15:22:27-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add    
[Huawei-GigabitEthernet0/0/1]ip address 192.168.1.9 30
Mar 20 2023 15:23:48-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int    
[Huawei]interface l    
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip add    
[Huawei-LoopBack0]ip address 192.168.1.65 28
[Huawei-LoopBack0]int l 1
[Huawei-LoopBack1]ip add    
[Huawei-LoopBack1]ip address 192.168.1.81  28
[Huawei-LoopBack1]q

AR5

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int    
[Huawei]interface g    
[Huawei]interface GigabitEthernet  0/0/0
[Huawei-GigabitEthernet0/0/0]ip add    
[Huawei-GigabitEthernet0/0/0]ip address  192.168.1.13 30
Mar 20 2023 15:27:44-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add   192.168.1.6 30
Mar 20 2023 15:28:39-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int l0
[Huawei-LoopBack0]ip add 192.168.1.97  28
[Huawei-LoopBack0]int l1
[Huawei-LoopBack1]ip add 192.168.113  28
                         ^
Error: Wrong parameter found at '^' position.
[Huawei-LoopBack1]ip add 192.168.1.113 28
[Huawei-LoopBack1]q

AR6

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int    
[Huawei]interface  g    
[Huawei]interface  GigabitEthernet  0/0/0
[Huawei-GigabitEthernet0/0/0]ip add  192.168.1.10 30
Mar 20 2023 15:41:51-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int  g  0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.1.14 30
Mar 20 2023 15:44:20-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int  g 0/0/2
[Huawei-GigabitEthernet0/0/2]ip add  192.168.1.17 30
Mar 20 2023 15:45:14-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]int g  1/0/0
[Huawei-GigabitEthernet1/0/0]ip add    
[Huawei-GigabitEthernet1/0/0]ip address 192.168.1.21  30
Mar 20 2023 15:46:58-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[3]:The line protocol
 IP on the interface GigabitEthernet1/0/0 has entered the UP state. 
[Huawei-GigabitEthernet1/0/0]int  l 0
[Huawei-LoopBack0]ip add  192.168.1.129 28
[Huawei-LoopBack0]int  l  1
[Huawei-LoopBack1]ip add 192.168.1.145 28
[Huawei-LoopBack1]q

AR7

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r7
[r7]int      
[r7]int GigabitEthernet  0/0/0
[r7-GigabitEthernet0/0/0]ip add 192.168.1.18  30
Mar 20 2023 15:54:05-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r7-GigabitEthernet0/0/0]int g  0/01
                                ^
Error: Unrecognized command found at '^' position.
[r7-GigabitEthernet0/0/0]int g 0/0/1
[r7-GigabitEthernet0/0/1]ip add 192.168.1.22  30

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<r7>

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<r7>sys
Enter system view, return user view with Ctrl+Z.
[r7]int l 0
[r7-LoopBack0]ip add  192.168.1.161 28
[r7-LoopBack0]int l 1 
[r7-LoopBack1]ip add 192.168.1.177  28
[r7-LoopBack1]int g 0/0/2
[r7-GigabitEthernet0/0/2]ip add 192.168.1.25 29
Mar 20 2023 16:19:08-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state.

4.配置截图

路由器R7使用DHCP协议,给PC1,PC2分配IP

[r7]dhcp  enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[r7]ip  pool   1
Info: It's successful to create an IP address pool.
[r7-ip-pool-1]netw    
[r7-ip-pool-1]network 192.168.1.24   m    
[r7-ip-pool-1]network 192.168.1.24   mask 29
[r7-ip-pool-1]ga    
[r7-ip-pool-1]gateway-list 192.168.1.25
[r7-ip-pool-1]dns    
[r7-ip-pool-1]dns-list 8.8.8.8
[r7-ip-pool-1]q
[r7]int g
          ^
Error:Incomplete command found at '^' position.
[r7]int g  0/0/2
[r7-GigabitEthernet0/0/2]dhcp  se    
[r7-GigabitEthernet0/0/2]dhcp  select
                                      ^
Error:Incomplete command found at '^' position.
[r7-GigabitEthernet0/0/2]dhcp select g    
[r7-GigabitEthernet0/0/2]dhcp select global 
[r7-GigabitEthernet0/0/2]q

配置静态路由

AR3到AR4,5,6,及其环回路由(注:环回路由网段可进行汇总 , 注意网段和IP 地址区别

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]ip  rou    
[Huawei]ip  route-sta    
[Huawei]ip  route-static 192.168.1.64  27  192.168.1.2
[Huawei]ip  rou    
[Huawei]ip  route-st    
[Huawei]ip  route-static  192.168.1.8 30  192.168.1.2
[Huawei]ip  rou    
[Huawei]ip  route-st    
[Huawei]ip  route-static    192.168.1.96  27  192.168.1.6
[Huawei]ip route-static 192.168.1.12 30  192.168.1.6

AR3到AR7那边网段及其环回路由

[Huawei]ip   route-static   0.0.0.0  192.168.1.2
                                                 ^
Error:Incomplete command found at '^' position.
[Huawei]ip route-static 0.0.0.0 0 192.168.1.2
[Huawei]ip route-static 0.0.0.0 0 192.168.1.6

注:使用缺省路由和等价路由

[Huawei]display this
[V200R003C00]
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
 drop illegal-mac alarm
#
 set cpu-usage threshold 80 restore 75
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
ip route-static 0.0.0.0 0.0.0.0 192.168.1.6
ip route-static 192.168.1.8 255.255.255.252 192.168.1.2
ip route-static 192.168.1.12 255.255.255.252 192.168.1.6
ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
#
return

对于AR3 来说,除了四个路由是直连的,其它13个原本都要配置,现在只要配置六条静态路由,其中还有一条等价路由

对于AR3,配置了两条缺省路由之后,是可以将其余四条删掉的,但又因为AR1配了两条缺省的等价路由,传递一个数据包会绕路,开销大,所以不删

对于其它几个路由同理一样

AR4

[Huawei]ip  route-sta    
[Huawei]ip  route-static   192.168.1.32 27  192.168.1.1
[Huawei]ip route-static 192.168.1.4 30   192.168.1.1
[Huawei]ip route-static 192.168.1.96  27 192.168.1.10
[Huawei]ip route-static 0.0.0.0  0 192.168.1.10
[Huawei]dis    
[Huawei]display this
[V200R003C00]
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
 drop illegal-mac alarm
#
 set cpu-usage threshold 80 restore 75
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.10
ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
#
return
[Huawei]ip route-static 192.168.1.96 27 192.168.1.1
[Huawei]display this
[V200R003C00]
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
 drop illegal-mac alarm
#
 set cpu-usage threshold 80 restore 75
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.10
ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
#
return

AR4少配一条192.168.1.12/30是因为缺省路由包括了

AR5

[Huawei]ip rou    
[Huawei]ip route-st    
[Huawei]ip route-static  192.168.1.32 27  192.168.1.5
[Huawei]ip route-static 192.168.1.0 30 192.168.1.5
[Huawei]ip route-static 192.168.1.64 27 192.168.1.5
[Huawei]ip route-static 192.168.1.64 27 192.168.1.14
[Huawei]ip route-static 0.0.0.0  0 192.168.1.14
[Huawei]displ    
[Huawei]display  this
[V200R003C00]
#
 snmp-agent local-engineid 800007DB03000000000000
 snmp-agent 
#
 clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
 drop illegal-mac alarm
#
 set cpu-usage threshold 80 restore 75
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.14
ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.14
#
return

AR6

AR6 AR7 浮动静态路由

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]ip rout    
[Huawei]ip route-st    
[Huawei]ip route-static 192.168.1.32 27  192.168.1.9  
[Huawei]ip route-static 192.168.1.32 27 192.168.1.13
[Huawei]ip route-static 192.168.1.0 30 192.168.1.9
[Huawei]ip route-static 192.168.1.4 30 192.168.1.13
[Huawei]ip route-static 192.168.1.64 27 192.168.1.9
[Huawei]ip route-static 192.168.1.96 27 192.168.1.13
[Huawei]ip route-static 0.0.0.0 0 192.168.1.18
[Huawei]ip route-static 0.0.0.0 0 192.168.1.22  pr    
[Huawei]ip route-static 0.0.0.0 0 192.168.1.22  preference 90

AR7

<r7>sys
Enter system view, return user view with Ctrl+Z.
[r7]ip rout    
[r7]ip route-st    
[r7]ip route-static   192.168.1.0  24 192.168.1.17
[r7]ip route-static 192.168.1.0 24 192.168.1.21  pr    
[r7]ip route-static 192.168.1.0 24 192.168.1.21  preference 90

5. 测试

各路都通,实验成功

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值