当前位置:网站首页>华为ensp模拟器 配置ACL访问控制列表
华为ensp模拟器 配置ACL访问控制列表
2022-07-04 20:11:00 【Python-派大星】
目录
1、acl类型(这里说明基础acl和高级acl类型的区别):
实验环境:
首先配置好三层交换机,在上一篇文章有详细说明,配置三层交换机是实现隔离病毒但能连通通信。实现不同网络,不同vlan的机器能够通信,这些pc机并不能直接通过中间的交换机实现通信,必须将数据包转到三层交换机,由三层交换机实现数据转发来通信,也就是三层交换机时pc机的网关。
这个环境里,pc机可以和任何网关和不同vlan的pc机通信。我们配置ACL访问控制列表是为了实现pc机只能访问vlan 20里的pc机,让他没有权限访问vlan 30的pc机。
pc机的网关就是三层交换机中,各个vlan的IP地址。
可以看到PC机能够和不同vlan不同网段的pc机通信,就是因为配置了三层交换机。
实验步骤:
步骤一:创建一个访问控制规则
步骤二:调用这个规则
步骤一:
1、acl类型(这里说明基础acl和高级acl类型的区别):
基础acl(Basic ACL):在做访问控制的时候只看源地址,不会去检查目标地址,只会检查源地址
高级acl(Advanced ACL):在做访问控制的时候会检查目标地址。(这个实验需要会检查目标地址的acl)
2、创建acl:
创建名为test的acl:(不推荐直接这样创建)
acl name test
正确的创建方法:
创建acl时命名并输入acl类型:高级(advance)、基础(basic)
#创建一个名为test的高级acl
acl name test advance
#命令使用方法
acl name 名字 acl类型
3、在acl中写入规则(基于IP地址来拒绝)
在写acl掩码时需要反着写,acl设定的规则(规定)例如:
原本的:255.255,255,0
反着写:0.0.0.255 #将255换成0,0换成255
#rule deny ip 拒绝规则ip协议
# source 源地址
#destination 目的地
拒绝访问规则:
#拒绝源地址为192.168.10.0网段、访问目标(目的地)为192.168.30.0的网段的通信
rule deny ip source 192.168.10.0 0.0.0.255 destination 192.168.30.0 0.0.0.255
#命令使用方式:
rule deny ip source 源地址网段 子网掩码(反着写) destination 目的地网段 子网掩码(反着写)
允许访问规则:
规则允许ip源地址任意,访问目标任意的的数据包通信
rule permit ip source any destination any
也就是拒绝网段为10的pc机访问网段为30的pc机。而其他访问不受限制
查看定制的规则:
dis this
步骤二:调用规则
调用规则需要在数据包必经的接口,也就是必须要通过的接口上调用,这样才能够管理到数据的通行。
1、进入数据必经的接口:
int g0/0/1
2、调用规则:
在该接口对进来的数据进行过滤,按照acl名为test的规则过滤。
traffic-filter inbound acl name test
3、检查是否成功调用规则:
发现用10网段的pc机ping不通30网段的pc机,证明调用规则游泳,接下来检查该规则是否影响别的网段的pc机通信
发现访问20网段的pc机并没有影响,达成最终的实验效果。
边栏推荐
- 黄金k线图中的三角形有几种?
- ACM组合计数入门
- HMS Core 统一扫码服务
- 【解决方案】PaddlePaddle 2.x调用静态图模式
- Pytorch---使用Pytorch实现LinkNet进行语义分割
- Explication détaillée du mécanisme de distribution des événements d'entrée multimodes
- nmap扫描
- What if the WiFi of win11 system always drops? Solution of WiFi total drop in win11 system
- 浏览器渲染页面过程
- Android原生数据库的基本使用和升级
猜你喜欢
五子棋 上班摸鱼工具 可局域网/人机
【optimtool.unconstrain】无约束优化工具箱
FastDfs的快速入门,三分钟带你上传下载文件到云服务器
Summary of the mistakes in the use of qpainter in QT gobang man-machine game
uniapp 富文本编辑器使用
Four traversal methods of binary tree, as well as the creation of binary tree from middle order to post order, pre order to middle order, pre order to post order, and sequence [specially created for t
How to solve the problem that win11 cannot write the value to the registry key?
搭建一个仪式感点满的网站,并内网穿透发布到公网 1/2
Understand Alibaba cloud's secret weapon "dragon architecture" in the article "science popularization talent"
Some suggestions for interface design
随机推荐
VIM asynchronous problem
hash 表的概念及应用
In the face of the same complex test task, why can the elder sort out the solution quickly? Ali's ten-year test engineers showed their skills
Understand Alibaba cloud's secret weapon "dragon architecture" in the article "science popularization talent"
js 闭包
基于OpenCV haarcascades的对象检测
企业数字化转型最佳实践案例:基于云的数字化平台系统安全措施简介与参考
Play the music of youth
What if the win11 shared file cannot be opened? The solution of win11 shared file cannot be opened
扩展你的KUBECTL功能
Hwinfo hardware detection tool v7.26 green version
Summary of the mistakes in the use of qpainter in QT gobang man-machine game
Android原生数据库的基本使用和升级
字节测试工程师十年经验直击UI 自动化测试痛点
c语言函数形参自增自减情况分析
多模输入事件分发机制详解
Some suggestions for interface design
测试用例 (TC)
jekins初始化密码没有或找不到
render函数与虚拟dom