当前位置:网站首页>华为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机并没有影响,达成最终的实验效果。
边栏推荐
- 浏览器渲染页面过程
- Understand Alibaba cloud's secret weapon "dragon architecture" in the article "science popularization talent"
- 网络命名空间
- HMS Core 统一扫码服务
- mysql语句执行详解
- Flet tutorial 07 basic introduction to popupmenubutton (tutorial includes source code)
- go defer的使用说明
- 黄金k线图中的三角形有几种?
- 二叉树的四种遍历方式以及中序后序、前序中序、前序后序、层序创建二叉树【专为力扣刷题而打造】
- Flet tutorial 06 basic introduction to textbutton (tutorial includes source code)
猜你喜欢
Jmeter 之压测入门
How does win11 search for wireless displays? Win11 method of finding wireless display device
idea配置标准注释
What if the brightness of win11 is locked? Solution to win11 brightness locking
Advantages of RFID warehouse management system solution
How does the computer save web pages to the desktop for use
LeetCode+ 81 - 85 单调栈专题
二叉树的四种遍历方式以及中序后序、前序中序、前序后序、层序创建二叉树【专为力扣刷题而打造】
What if the WiFi of win11 system always drops? Solution of WiFi total drop in win11 system
Summary of the mistakes in the use of qpainter in QT gobang man-machine game
随机推荐
async await 在map中使用
admas零件名重复
接口设计时的一些建议
word中插入圖片後,圖片上方有一空行,且删除後布局變亂
D3.js+Three.js数据可视化3d地球js特效
[Shenbo introduction] VI How to contact your favorite doctoral tutor
What should I do if my computer sharing printer refuses access
《动手学深度学习》(三) -- 卷积神经网络 CNN
插入排序,选择排序,冒泡排序
【服务器数据恢复】某品牌服务器存储raid5数据恢复案例
MySQL --- 数据库查询 - 聚合函数的使用、聚合查询、分组查询
企业数字化转型最佳实践案例:基于云的数字化平台系统安全措施简介与参考
阿里测试师用UI自动化测试实现元素定位
HMS Core 机器学习服务
RFID仓库管理系统解决方案有哪些功能模块
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
Play the music of youth
【1200. 最小絕對差】
jekins初始化密码没有或找不到
After inserting a picture into word, there is a blank line above the picture, and the layout changes after deletion