当前位置:网站首页>在思科模拟器Cisco Packet Tracer实现自反ACL
在思科模拟器Cisco Packet Tracer实现自反ACL
2022-06-12 18:17:00 【不惑梦蝶】
目录
实验2:在思科模拟器Cisco Packet Tracer实现自反ACL
一、前言
最近在通过Cisco Packet Tracer模拟器学习ACL时,遇到的一点小问题,ACL分为标准的ACL访问控制列表和扩展的访问控制列表,但是当给某一路由器配置了一条访问控制列表,虽然是实现禁止该条例控制列表,但是无法从对端PING回来。具体现象如下:
二、实验
实验1:使用ACL控制链路连通性
实验拓扑图

测试连通性

配置ACL
给路由器0 2911配置ACL(这里只是简单的使用了标准的ACL)
tsy(config)#access-list 11 deny 192.168.10.0 0.0.0.255 //禁止192.168.10.0网段的路由通过
tsy(config)#access-list 11 permit any //注意:这一行是最重要的,在cisco里面只要是创建了访问控制列表(上一条),其余的网段也默认禁止,只有写入这一行才能接触默认的禁止
tsy(config)#int g0/1
tsy(config-if)#ip access-group 11 out //引用到接口G0/1
tsy(config-if)#exit
tsy(config)#exit查看访问控制列表
tsy#show ip ac
tsy#show ip access-lists
Standard IP access list 11
10 deny 192.168.10.0 0.0.0.255
20 permit any
tsy#再次测试连通性


为什么PC1去PingPC0不通,不只是限制了PC0去往PC1的路由吗?!!!
因为Ping的执行过程,是两个终端之间相互询问与确认的过程:

实验2:在思科模拟器Cisco Packet Tracer实现自反ACL
那我们该如何实现单向的Ping通,对端无法Ping通自己呢?通过在度娘的知识宝库找了一番,参考了百度经验:https://jingyan.baidu.com/article/948f5924a79294d80ef5f95c.html
步骤一:给路由器2911开启securityk9模式
tsy#conf terminal //进入配置模式
tsy(config)#license boot module c2900 technology-package securityk9 //开启securityk9模式
//此处省略
ACCEPT? [yes/no]: Y //确认
tsy#write
Building configuration...
[OK]
tsy#reload //重新启动
//此处省略
tsy>en
tsy#show lic
tsy#show license fe
tsy#show license feature //重启后查看许可文件情况,securityk9已开启
Feature name Enforcement Evaluation Subscription Enabled RightToUse
ipbasek9 no no no yes no
securityk9 yes yes no yes yes
datak9 yes no no no yes
uck9 yes yes no no yes
tsy#conf terminal
Enter configuration commands, one per line. End with CNTL/Z.
tsy(config)#步骤二:配置ACL
tsy#conf terminal //进入配置模式
tsy(config)#ip access-list extended TSY //添加扩展访问控制列表TSY
tsy(config-ext-nacl)#deny ip any any //禁止所有网段通过
tsy(config-ext-nacl)#exit
tsy(config)#int G0/1 //在接口G0/1中应用
tsy(config-if)#ip access-group TSY in //访问控制列表TSY被应用于接口G0/1的进入通道
tsy(config-if)#exit
tsy(config)#ip inspect name Tong http audit-trail on //这一句我理解的是允许http往返报文的执行,标志为Tong的
tsy(config)#ip inspect name Tong icmp audit-trail on //允许icmp往返报文的执行,标志为Tong的
tsy(config)#int G0/1 //在接口G0/1中应用
tsy(config-if)#ip inspect Tong out //访问控制列表TONG被应用于接口G0/1的输出通道
tsy(config-if)#exit
tsy(config)#exit这里不知道理解的对不对,望大佬指正!
查看访问控制列表
tsy#show ip access-lists
Extended IP access list TSY
10 deny ip any any (4 match(es))
步骤三:验证连通性


三、总结
这里的自反ACL,只是在思科模拟器中的是这么使用的,但是正确的自反ACL并不是这样的!!!
边栏推荐
猜你喜欢

General differences between SQL server versions released by Microsoft in different periods so far, for reference

TypeScript类型声明文件(三)

Introduction to service grid and istio - continued

Variable of C #

Small program +app, a low-cost and active technology combination idea

Solution to the problem that the anaconda navigator card logo cannot be opened and the card will flash back - replace the alicloud image source

JS for Fibonacci sequence

Introduction to reinforcement learning and analysis of classic items 1.3

High-Speed Layout Guidelines 未完...

ESP32-C3 ESP-IDF 配置smartconfig 和 sntp 获取网络时间
随机推荐
VirtualLab基础实验教程-4.单缝衍射
Can tonghuashun open an account? Can tonghuashun directly open the security of securities companies on the app
Typescript advanced type (2)
Random talk about redis source code 91
MYSQL:Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column
轻量、便捷的小程序转App技术方案,实现与微信/流量App互联互通
High speed layout guidelines incomplete
NixOS 22.05安装过程记录
C business serial number rule generation component
A method of quickly reusing wechat login authorization in app
Pytest automated testing framework (II)
Comparison of disk mapping tools for network disk and object cloud storage management
TypeScript常用类型(一)
用grep awk提取字符串
EASYCODE template
HTTP缓存<强缓存与协商缓存>
Gospel of audio and video developers, rapid integration of AI dubbing capability
Extracting strings with grep awk
PHP:Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocat
About datasets