hcip 第九天

1)首先实验要求是将192.168.1.0/24的网段进行IP地址的划分。根据拓扑结构,我们得知需要划分出6个网段,划分的网段如下:

192.168.1.0/24

192.168.1.0/27

192.168.1.32/27

192.168.1.64/27

192.168.1.96/27

192.168.1.128/27

192.168.1.160/27

192.168.1.192/27

192.168.1.224/27

2)选其中6个网段作为实验所需网段,剩余2个网段作为保留网段,在将192.168.1.0/27作为我们的骨干链路的网段,根据拓扑得知我们需要6个网段,划分的网段如下:

192.168.1.0/27

192.168.1.4/30

192.168.1.8/30

192.168.1.12/30

192.168.1.16/30

192.168.1.20/30

192.168.1.24/30

192.168.1.28/30

选其中6个网段作为骨干链路的网段,其余网段作为保留网段。此类划分好是因为一个骨干链路刚好需要2个IP地址,此种划分刚好满足这种现象,以达到IP地址最大化节约。

3)将划分出的网段再次进行划分用作环回接口,划分结构如下:

192.168.1.32/28

192.168.1.48/28

192.168.1.64/28

192.168.1.80/28

192.168.1.96/28

192.168.1.112/28

192.168.1.128/28

192.168.1.144/28

192.168.1.160/28

192.168.1.176/28

192.168.1.192/28

192.168.1.208/28

192.168.1.224/28

192.168.1.240/28

以上此类的划分是为了可以更加方便的汇总。

2、配置:

1)对各个设备进行IP地址和环回接口的配置

AR1:

IP地址的配置:

r1-GigabitEthernet0/0/0ip a 192.168.1.1 30

r1-GigabitEthernet0/0/2ip a 192.168.1.9 30

环回接口的配置:

r1-LoopBack0ip a 192.168.1.33 28

r1-LoopBack1ip a 192.168.1.49 28

AR2:

IP地址的配置:

r2-GigabitEthernet0/0/0ip a 192.168.1.2 30

r2-GigabitEthernet0/0/1ip a 192.168.1.5 30

环回接口的配置:

r2-LoopBack0ip a 192.168.1.65 28

r2-LoopBack1ip a 192.168.1.81 28

AR3:

IP地址的配置:

r3-GigabitEthernet0/0/0ip a 192.168.1.10 30

r3-GigabitEthernet0/0/1ip a 192.168.1.13 30

r3-GigabitEthernet0/0/2ip a 192.168.1.97 27

AR4:

IP地址的配置:

r4-GigabitEthernet0/0/0ip a 192.168.1.6 30

r4-GigabitEthernet0/0/1ip a 192.168.1.14 30

r4-GigabitEthernet0/0/2ip a 192.168.1.21 30

r4-GigabitEthernet4/0/0ip a 192.168.1.17 30

环回接口的配置

r4-LoopBack0ip a 192.168.1.129 28

r4-LoopBack1ip a 192.168.1.145 28

AR5:

IP地址的配置:

r5-GigabitEthernet0/0/0ip a 192.168.1.22 30

r5-GigabitEthernet0/0/2ip a 192.168.1.18 30

r5-GigabitEthernet0/0/1ip a 12.0.0.1 24

环回接口的配置:

r5-LoopBack0ip a 192.168.1.161 28

AR6:

IP地址的配置:

isp-GigabitEthernet0/0/0ip a 12.0.0.2 24

环回接口的配置:

isp-LoopBack0ip a 1.1.1.1 24

2)配置路由和空接口

AR1:

r1ip route-static 0.0.0.0 0 192.168.1.2

r1ip route-static 0.0.0.0 0 192.168.1.10

r1ip route-static 192.168.1.96 27 192.168.1.10

r1ip route-static 192.168.1.4 30 192.168.1.2

r1ip route-static 192.168.1.12 30 192.168.1.10

r1ip route-static 192.168.1.32 27 NULL 0

AR2:

r2ip route-static 0.0.0.0 0 192.168.1.6

r2ip route-static 192.168.1.32 27 192.168.1.1

r2ip route-static 192.168.1.96 27 192.168.1.1

r2ip route-static 192.168.1.96 27 192.168.1.6

r2ip route-static 192.168.1.12 30 192.168.1.6

r2ip route-static 192.168.1.64 27 NULL 0

AR3:

r3ip route-static 0.0.0.0 0 192.168.1.14

r3ip route-static 192.168.1.32 27 192.168.1.9

r3ip route-static 192.168.1.64 27 192.168.1.9

r3ip route-static 192.168.1.64 27 192.168.1.14

r3ip route-static 192.168.1.4 30 192.168.1.14

r3ip route-static 192.168.1.0 30 192.168.1.9

AR4:

r4ip route-static 0.0.0.0 0 192.168.1.18

r4ip route-static 0.0.0.0 0 192.168.1.22 preference 61

r4ip route-static 192.168.1.96 27 192.168.1.13

r4ip route-static 192.168.1.8 30 192.168.1.13

r4ip route-static 192.168.1.32 27 192.168.1.13

r4ip route-static 192.168.1.32 27 192.168.1.5

r4ip route-static 192.168.1.0 30 192.168.1.5

r4ip route-static 192.168.1.64 27 192.168.1.5

r4ip route-static 192.168.1.0 24 NULL 0

r4ip route-static 192.168.1.160 27 192.168.1.18 --- 防止空接口讲数据包丢掉

r4ip route-static 192.168.1.160 27 192.168.1.22 preference 61 --- 浮动静态路由

AR5:

r5ip route-static 192.168.1.0 24 192.168.1.17

r5ip route-static 192.168.1.0 24 GigabitEthernet 0/0/0 192.168.1.21

r5ip route-static 0.0.0.0 0 12.0.0.2

3)在AR3上配置DHCP

r3dhcp enable

r3ip pool aaa

r3-ip-pool-aaanetwork 192.168.1.96 mask 27

r3-ip-pool-aaagateway-list 192.168.1.97

r3-ip-pool-aaaq

r3int g 0/0/2

r3-GigabitEthernet0/0/2dhcp select global

4)对AR5配置nat协议

r5acl 2000

r5-acl-basic-2000rule permit source 192.168.1.0 0.0.0.255

r5-acl-basic-2000q

r5int g 0/0/1

r5-GigabitEthernet0/0/1nat outbound 2000

5)对AR1启动telnet

r1aaa

r1-aaalocal-user xujialong privilege level 15 password cipher 123456

r1-aaaq

r1user-interface vty 0 4

r1-ui-vty0-4authentication-mode aaa

6)在AR5上启动nat的映射配置

r5int g0/0/1

r5-GigabitEthernet0/0/1nat server protocol tcp global current-interface 23 in

side 192.168.1.1 23

Warning:The port 23 is well-known port. If you continue it may cause function fa

ilure.

Are you sure to continue?Y/N:y

7)在AR6 上远程登陆

<isp>telnet 12.0.0.1

相关推荐
九硕智慧建筑一体化厂家3 小时前
数字化管控落地,直流照明构筑安全照明体系
运维·人工智能·笔记·安全·智慧城市
波波0073 小时前
C# 15 重磅新特性: 带标签 break 与 continue:重新定义嵌套循环控制流
服务器·前端·c#
刘某的Cloud5 小时前
ceph osd 导入导出 rbd volume 卷
linux·运维·ceph·volume
記億揺晃着的那天5 小时前
NAS 内网域名访问为什么需要浏览器授权
网络·nginx·js·nas
chunmiao30325 小时前
DeepSeek V4-Pro 正式版上线,API 8月17日起分时调价
网络·安全
隔窗听雨眠6 小时前
GBase 8s并发控制深度解析:封锁机制、隔离级别与死锁处理全攻略
服务器·数据库·oracle
神奇霸王龙7 小时前
Agent 准入门控屠夫:5 旗舰 4 维度评估
linux·运维·数据库·ai·ai作画·agent·ai编程
鲸采云SRM采购管理系统7 小时前
采购管理系统哪家好?2026最新测评对比
java·服务器·数据库
cfm_29147 小时前
基于Binlog实现不停机数据库平滑迁移技术
运维·数据库·架构
迪康Defender7 小时前
AI 重构终端安全运营:智能分析中枢 AI Insight 模块架构与落地场景深度解析
运维·网络·人工智能·其他·安全·重构·架构