当前位置:网站首页>交换机和路由器技术-30-标准ACL
交换机和路由器技术-30-标准ACL
2022-08-11 04:44:00 【w辣条小王子】
目录
一、访问控制列表
标准的访问控制列表ACL
- ACL的基本概念
主要是基于主机,通过IP设备进行标识·
1.1 概念
什么是访问控制列表
一种基于包过滤的访问控制技术、拆的是网络层IP地址,广泛应用于路由器和三层交换机中,有效的控制用户(主机)的访问,基于数据包的五元组进行过滤(源ip、目标ip、源端口、目的端口、协议)
读取三层和四层的流量,三层(网络层)主要读取源ip和目的IP,四层(传输层)主要读取源端口,目的端口
1.2 工作原理
路由器处理数据流量走向问题(确定路由器的入口或出口)
建议是将标准ACL一般配置在靠近源IP的位置,即入口,减少路由器路由的工作量
1.3 工作过程
数据包到达路由器后,查看访问控制列表,匹配规则,有没有源ip是xxx去往xx,如果有匹配,看是允许还是拒绝,如果没有匹配默认拒绝。有一条默认的ACL deny any any
1.4 访问控制列表分类(思科设备)
标准:基于源ip地址进行控制,表号1~99
扩展:基于源ip、目的ip、指定协议、端口号、标志位进行过滤。表号:100~199
命名:没有表号,使用名字作为表号,直接使用standard标识标准ACL、和extended标识扩展ACL
1.5 配置标准访问控制列表
搭建如下拓扑,完成ip地址的分配和设置,配置前确保所有主机能够互通
思路:在路由器上配置:拒绝PC2允许PC1,然后应用到接口,配置要注意先拒绝再配置允许的主机,因为ACL是从上往下匹配的。
1.5.1配置方法一
最常用的方式是写host
Router(config)#access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
Router(config)#access-list 11 deny ? //此处11是ACL的表号
A.B.C.D Address to match
any Any source host
host A single host address
Router(config)#access-list 11 deny host 192.168.10.10
Router(config)#access-list 11 permit host 192.168.10.20
Router(config)#access-list 11 permit any //允许所有其他主机
网段 标识主机要用32位子网
192.168.10.0 192.168.10.10
255.255.255.0 255.255.255.255
1.5.2 配置方式二
ACL配置采用反码
Router(config)#access-list 11 deny 192.168.10.10 0.0.0.0
Router(config)#access-list 11 permit 192.168.10.20 0.0.0.0
1.5.3 应用到接口
Router(config)#int g0/0
Router(config-if)#ip access-group ?
<1-199> IP access list (standard or extended)
WORD Access-list name
Router(config-if)#ip access-group 11 in
In 表示入口,g0/0对于PC2和PC1来讲是入口方向
总结:
access-list 表号 deny/permit host ip
access-list 表号 deny/permit ip 反掩码
int 接口
ip access-group 表号 in/out
in表示此接口为入口,一般配置在in
1.5.4 查看效果
边栏推荐
- 洛谷P2245 星际导航
- 「转」“搜索”的原理,架构,实现,实践,面试不用再怕了
- 0基础转行软件测试,自学3个月,浅拿12k*13薪offer
- AVH 动手实践 (二) | 在 Arm 虚拟硬件上部署 PP-OCR 模型
- Provincial level of Echart maps, as well as all prefecture-level download and use
- JVM 垃圾回收的概述与机制
- The basics of binary heap~
- 洛谷P4032 火锅盛宴
- Where can machine learning be applied?What is machine learning useful for?
- set_new_handler(0)是什么意思?有什么用?
猜你喜欢
洛谷P2150 寿司晚宴
网络安全培训机构哪家好?排名怎么选择?
"239 Sliding Window Maximum Value" on the 16th day of LeetCode brushing
Three 】 【 yolov7 series of actual combat from 0 to build training data sets
The principle, architecture, implementation, practice of "transfer" and "search", no need to be afraid of interviews
What is ensemble learning in machine learning?
干货:服务器网卡组技术原理与实践
「转」“搜索”的原理,架构,实现,实践,面试不用再怕了
CAD2020 打开错误报告 e06d7363h Exception at 13644F69h
如何给网页添加icon图标?
随机推荐
【yolov7系列三】实战从0构建训练自己的数据集
洛谷P6586 蒟蒻火锅的盛宴
Object Creation and Display Transformation
js uses the string as the js execution code
【组成原理 九 CPU】
干货:服务器网卡组技术原理与实践
这些云自动化测试工具值得拥有
Introduction to c # a week of high-level programming c # - LINQ Day Four
拼多多店铺营业执照相关问题
0 Basic software test for career change, self-study for 3 months, 12k*13 salary offer
"98 BST and Its Verification" of the 13th day of leetcode brushing series of binary tree series
快速使用UE4制作”大场景游戏“
-填涂颜色-
直播平台开发,Flutter,Drawer侧滑
Alibaba Cloud releases 3 high-performance computing solutions
Bubble sort and heap sort
嵌入式分享合集33
"125 Palindrome Verification" of the 10th day string series of LeetCode brushing questions
MySQL database storage engine and database creation, modification and deletion
Redis: Solve the problem of modifying the same key with distributed high concurrency