HCIP作业

实验要求:

1、R6为ISP,接口IP地址均为公有地址,该设备只能配置IP地址,之后不能再对其进行任何配置;

2、R1-R5为局域网,私有IP地址192.168.1.0/24,请合理分配;

3、R1、R2、R4,各有两个环回IP地址;R5,R6各有一个环回地址;所有路由器上环回均代表连接用户的接口;

4、R3下面的两台PC通过DHCP自动获取IP地址;

5、选路最佳,路由表尽量小,避免环路;

6、R1-R5均可以访问R6的环回;

7、R6 telnet R5的公有地址时,实际登录到R1上;

8、R4与R5正常通过1000M链路,故障时通过100m链路;

实验步骤:

推荐使用AR2220和AR2240路由器

1、网段划分:

首先输入:sys 进入系统视图,接着输入:interface GigabitEthernet0/0/1 进入接口视图

**随后ip addres 192.168.1.1(ip地址)255.255.255.252(子网掩码)(为啥是252,**因为在192.168.1.0/30这个网段中255.255.255.252表示该子网只有4个IP地址可用,其中一个是网络地址、一个是广播地址,另外两个是可用地址。)

AR1:int g0/0/1IP地址:192.168.1.5 30

int g0/0/0IP地址:192.168.1.1 30

配置R1 环回地址

AR2:int g0/0/1IP地址:192.168.1.9 30

int g0/0/0IP地址:192.168.1.2 30

配置R2 环回地址

AR3:int g0/0/1IP地址:192.168.1.13 30

int g0/0/0IP地址:192.168.1.6 30

给R3配置dhcp服务:

AR4:int g0/0/1IP地址:192.168.1.14 30

int g0/0/0IP地址:192.168.1.9 30

int g0/0/2IP地址:192.168.1.17 30

int g4/0/0IP地址:192.168.1.21 30

配置R4的环回地址:

int l0 然后 ip ad 192.168.1.129 28

int l1 然后ip ad 192.168.1.145 28

AR5:int 0/0/2IP地址:192.168.1.22 30

int g0/0/0IP地址:192.168.1.18 30

int g0/0/1IP地址:12.0.0.5 24

AR6:int g0/0/0IP地址:12.0.0.6 24

配置R6环回地址:

配置R1的静态路由:

ip route-static 192.168.1.20 30 192.168.1.2

ip route-static 192.168.1.20 30 192.168.1.6

ip route-static 192.168.1.0 30 192.168.1.2

ip route-static 192.168.1.12 30 192.168.1.6

ip route-static 192.168.1.16 30 192.168.1.2

ip route-static 192.168.1.16 30 192.168.1.6

ip route-static 192.168.1.64 30 192.168.1.2

ip route-static 192.168.1.96 27 192.168.1.6

ip route-static 192.168.1.128 27 192.168.1.2

ip route-static 192.168.1.128 27 192.168.1.6

ip route-static 192.168.1.160 27 192.168.1.2

ip route-static 192.168.1.160 27 192.168.1.6

配置R2的静态路由:

R2\]ip route-static 192.168.1.128 27 192.168.1.10 \[R2\]ip route-static 192.168.1.16 30 192.168.1.10 \[R2\]ip route-static 192.168.1.160 27 192.168.1.10 \[R2\]ip route-static 192.168.1.20 30 192.168.1.10 \[R2\]ip route-static 192.168.1.12 30 192.168.1.10 \[R2\]ip route-static 192.168.1.96 27 192.168.1.1 \[R2\]ip route-static 192.168.1.4 30 192.168.1.1 \[R2\]ip route-static 192.168.1.32 27 192.168.1.1 ![](https://file.jishuzhan.net/article/1770310046341664769/9a1c0d189a631979f80b159198428223.webp) 配置R3的静态路由: \[R3\]ip route-s \[R3\]ip route-static 192.168.1.32 27 192.168.1.5 \[R3\]ip route-static 192.168.1.0 30 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.8 30 192.168.1.14 \[R3\]ip route-static 192.168.1.128 27 192.168.1.14 \[R3\]ip route-static 192.168.1.16 30 192.168.1.14 \[R3\]ip route-static 192.168.1.160 27 192.168.1.14 \[R3\]ip route-static 192.168.1.20 30 192.168.1.14 \[R3\]dis ip ro \[R3\]dis ip routing-table p \[R3\]dis ip routing-table protocol s \[R3\]dis ip routing-table protocol static ![](https://file.jishuzhan.net/article/1770310046341664769/28f9c1188601ebbcef965a37172fb204.webp) 配置R4的静态路由: \[R4\]ip rou \[R4\]ip route-static 192.168.1.96 27 192.168.1.13 \[R4\]ip route-static 192.168.1.4 30 192.168.1.13 \[R4\]ip route-static 192.168.1.32 27 192.168.1.13 \[R4\]ip route-static 192.168.1.32 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.64 27 192.168.1.9 \[R4\]ip route-static 192.168.1.160 27 192.168.1.18 \[R4\]ip route-static 192.168.1.160 27 192.168.1.22 ![](https://file.jishuzhan.net/article/1770310046341664769/77b150650bfa97f7fa37b678f3907a88.webp) 配置R5的静态路由: \[R5\]ip route-s \[R5\]ip route-static 192.168.1.128 27 192.168.1.17 \[R5\]ip route-static 192.168.1.128 27 192.168.1.21 \[R5\]ip route-static 192.168.1.12 30 192.168.1.17 \[R5\]ip route-static 192.168.1.12 30 192.168.1.21 \[R5\]ip route-static 192.168.1.96 27 192.168.1.17 \[R5\]ip route-static 192.168.1.96 27 192.168.1.21 \[R5\]ip route-static 192.168.1.4 30 192.168.1.17 \[R5\]ip route-static 192.168.1.4 30 192.168.1.21 \[R5\]ip route-static 192.168.1.32 27 192.168.1.17 \[R5\]ip route-static 192.168.1.32 27 192.168.1.21 \[R5\]ip route-static 192.168.1.0 30 192.168.1.17 \[R5\]ip route-static 192.168.1.0 30 192.168.1.21 \[R5\]ip route-static 192.168.1.64 27 192.168.1.17 \[R5\]ip route-static 192.168.1.64 27 192.168.1.21 \[R5\]ip route-static 192.168.1.8 30 192.168.1.17 \[R5\]ip route-static 192.168.1.8 30 192.168.1.21 ![](https://file.jishuzhan.net/article/1770310046341664769/cfe67b9dc9c804d19b7efefad2b69a47.webp) 检查内网是否通了: ![](https://file.jishuzhan.net/article/1770310046341664769/8d45f2779d1c7c21e541aa5e69100f02.webp) 现在进行公网通: 在R5上配(缺省路由):ip route-static 0.0.0.0 0 12.0.0.6 检查公网是否通了: ![](https://file.jishuzhan.net/article/1770310046341664769/48ea9565f9d12da7157fbc03b233de40.webp) 避免环路: 静态防环机制 \[R1\]ip route-static 192.168.1.32 27 NULL 0 \[R2\]ip route-static 192.168.1.64 27 NULL 0 \[R4\]ip route-static 192.168.1.128 27 NULL 0 R1访问R6 公网上需要进行nat操作 \[R5\]acl 2000 \[R5-acl-basic-2000\]rule per \[R5-acl-basic-2000\]rule permit s \[R5-acl-basic-2000\]rule permit source 192.168.1.0 0.0.0.255 \[R5-acl-basic-2000\]q \[R5\]int g0/0/1 \[R5-GigabitEthernet0/0/1\]nat o \[R5-GigabitEthernet0/0/1\]nat outbound 2000 \[R5-GigabitEthernet0/0/1

给R1搞缺省:

R1\]ip rou \[R1\]ip route-s \[R1\]ip route-static 0.0.0.0 0 192.168.1.2 \[R1\]ip route-static 0.0.0.0 0 192.168.1.6 给R2搞缺省:\[R2\]ip route-static 0.0.0.0 0 192.168.1.10 给R3搞缺省:\[R3\]ip route-static 0.0.0.0 0 192.168.1.14 给R4搞缺省:\[R4\]ip route-static 0.0.0.0 0 192.168.1.18 \[R4\]ip route-static 0.0.0.0 0 192.168.1.22 现在R1 ping 1.1.1.6 就可以通了

相关推荐
犀思云5 分钟前
网络运维减负:解构FusionWAN NaaS 面向企业广域网的技术逻辑演进
网络·智能仓储·fusionwan·专线·naas
倔强的石头1066 分钟前
边缘侧时序数据的选型指南:网络不稳定、数据不丢、回传可控——用 Apache IoTDB 设计可靠链路
网络·apache·iotdb
db_murphy20 分钟前
知识篇 | net.ipv4.ip_forward 参数
网络·网络协议·tcp/ip
科技块儿25 分钟前
在线考试防作弊IP工具选型:5款主流IP查询API精度、成本、场景适配全测评
服务器·网络·tcp/ip·安全
zbtlink1 小时前
路由器的外置天线和内置天线有多大差别?
网络·智能路由器
B2_Proxy1 小时前
如何使用代理服务解决“您的 ASN 被阻止”错误:全面策略分析
网络·爬虫·网络协议·tcp/ip·安全·代理模式
一起养小猫1 小时前
Flutter for OpenHarmony 进阶:Timer组件与倒计时系统深度解析
android·网络·笔记·flutter·json·harmonyos
程序猿编码2 小时前
实战Linux内核模块:终止ptrace跟踪程序与被跟踪进程
linux·网络·内核·内核模块·ptrace
乾元2 小时前
下一代检测:基于自编码器(Autoencoder)的异常流量检测
运维·网络·人工智能·深度学习·安全·安全架构
lifejump2 小时前
二层双核心冗余链路实现(1/2期)(eNSP)
网络