CCNA课程实验-11-ACL

实验条件

网络拓朴

在这里插入图片描述

需求

  1. 使用名字为ACL_A的标准ACL配置及应用:在R1上配置ACL实现仅192.168.20.0/24网段能访问到PC1;
  2. 使用名字为ACL_B的标准ACL实现Telnet登陆控制:在R3上配置只允许PC1远程管理R3;
  3. 使用名字为ACL_C的扩展ACL配置及应用:在R3配置ACL实现PC2只允许被ping通,其他访问都不能进行;

配置实现

基础配置 R1 & R2 & R3 & PC1 & PC2

PC1

PC1(config)#no ip routing
PC1(config)#ip default-gateway 192.168.10.254
PC1(config)#int e0/0
PC1(config-if)#ip address 192.168.10.1 255.255.255.0
PC1(config-if)#no shutdown

PC2

PC2(config)#no ip routing
PC2(config)#ip default-gateway 192.168.20.254
PC2(config)#int e0/1
PC2(config-if)#ip address 192.168.20.1 255.255.255.0
PC2(config-if)#no shutdown

R1

R1(config)#int e0/0
R1(config-if)#ip address 192.168.10.254 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int e0/1
R1(config-if)#ip address 12.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#router ospf 90
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 192.168.10.254 0.0.0.0 area 0
R1(config-router)#network 12.1.1.1 0.0.0.0 area 0
R1(config-router)#

R2

R2(config)#int e0/1
R2(config-if)#ip address 12.1.1.2 255.255.255.0
R2(config-if)#no shutdown 
R2(config-if)#int e0/0
R2(config-if)#ip address 23.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#router ospf 90
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 12.1.1.2 0.0.0.0 area 0 
R2(config-router)#network 23.1.1.2 0.0.0.0 area 0
R2(config-router)#

R3

R3(config)#int e0/0   
R3(config-if)#ip address 23.1.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#int e0/1
R3(config-if)#ip address 192.168.20.254 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#router ospf 90
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 23.1.1.3 0.0.0.0 area 0
R3(config-router)#network 192.168.20.254 0.0.0.0 area 0

配置ACL_A

使用名字为ACL_A的标准ACL配置及应用:在R1上配置ACL实现仅192.168.20.0/24网段能访问到PC1

R1(config)#ip access-list standard ACL_A 
R1(config-std-nacl)#permit 192.168.20.0 0.0.0.255 
R1(config-std-nacl)#exit
R1(config)#int e0/0		//去到PC1的端口
R1(config-if)#ip access-group ACL_A out	//从这个接口出去的包,都要用ACL_A来控制

测试结果

R3#ping 192.168.10.1			// 默认以23.1.1.3接口去ping
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
R3#ping 192.168.10.1 source 192.168.20.254  // 以192.168.20.0/24的网段去ping
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.20.254 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
R3#

Ping PC1到中间各个节点
除了R1节点和192.168.20.0/24网段的设备可以ping通, 其它几个ip都ping不同,是因为其它几个IP的回包被 ACL_A的策略给阻止了.

PC1#ping 23.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 23.1.1.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
PC1#ping 192.168.10.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
PC1#ping 12.1.1.1         
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
PC1#ping 12.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
PC1#ping 23.1.1.2 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 23.1.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
PC1#ping 192.168.20.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
PC1#ping 192.168.20.1  
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/2 ms
PC1#

配置ACL_B

使用名字为ACL_B的标准ACL实现Telnet登陆控制:在R3上配置只允许PC1远程管理R3

R3(config)#ip access-list standard  ACL_B
R3(config-std-nacl)#permit host 192.168.10.1 
R3(config-std-nacl)#line vty 0 4
R3(config-line)#password passwd
R3(config-line)#login
R3(config-line)#transport input telnet
R3(config-line)#access-class ACL_B in
R3(config-line)#exit
R3(config)#enable password passwd

测试结果

PC1#telnet 192.168.20.254
Trying 192.168.20.254 ... Open


User Access Verification

Password: 
R3>enable
Password: 
R3#

配置ACL_C

使用名字为ACL_C的扩展ACL配置及应用:在R3配置ACL实现PC2只允许被ping通,其他访问都不能进行
配置PC2的telnet服务

PC2(config)#enable secret passwd
PC2(config)#line vty 0 4
PC2(config-line)#password passwd
PC2(config-line)#transport input telnet
PC2(config-line)#login
PC2(config-line)#exit

测试PC1访问PC2

PC1#ping 192.168.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
PC1#telnet 192.168.20.1
Trying 192.168.20.1 ... Open


User Access Verification

Password: 
PC2>

现在配置R3

R3(config)#ip access-list extended ACL_C
R3(config-ext-nacl)#permit icmp any host 192.168.20.1 
R3(config-ext-nacl)#int e0/1
R3(config-if)#ip access-group ACL_B out

再次测试PC1访问PC2

PC1#ping 192.168.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
PC1#telnet 192.168.20.1
Trying 192.168.20.1 ... 
% Connection timed out; remote host not responding

PC1#

达到实验目标

Python网络爬虫与推荐算法新闻推荐平台:网络爬虫:通过Python实现新浪新闻的爬取,可爬取新闻页面上的标题、文本、图片、视频链接(保留排版) 推荐算法:权重衰减+标签推荐+区域推荐+热点推荐.zip项目工程资源经过严格测试可直接运行成功且功能正常的情况才上传,可轻松复刻,拿到资料包后可轻松复现出一样的项目,本人系统开发经验充足(全领域),有任何使用问题欢迎随时与我联系,我会及时为您解惑,提供帮助。 【资源内容】:包含完整源码+工程文件+说明(如有)等。答辩评审平均分达到96分,放心下载使用!可轻松复现,设计报告也可借鉴此项目,该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的。 【提供帮助】:有任何使用问题欢迎随时与我联系,我会及时解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 下载后请首先打开README文件(如有),项目工程可直接复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

烈火蜓蜻

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值