当前位置:网站首页>交换机和路由器技术-32-命名ACL
交换机和路由器技术-32-命名ACL
2022-08-11 04:44:00 【w辣条小王子】
命名ACL:
没有表号,使用名字作为表号,直接使用standard标识标准ACL、和extended标识扩展
删除访问控制列表
1.在删除访问控制列表前,需要先从应用的接口上取消
2.不管是标准ACL还是扩展ACL 不管no哪一条ACL,删除都是全部删除,不能单独删除
而且添加ACL是自动往后排,不能插在中间

![]()
![]()
![]()
命名ACL好处:
可以在某一个表内删除单条ACL或者在任意位置插入ACL
具体配置
Router(config)#ip access-list ?
extended Extended Access List
standard Standard Access List
Router(config)#ip access-list extended wn //扩展ACL命名为wn
Router(config-ext-nacl)#deny ?
ahp Authentication Header Protocol
eigrp Cisco's EIGRP routing protocol
esp Encapsulation Security Payload
gre Cisco's GRE tunneling
icmp Internet Control Message Protocol
ip Any Internet Protocol
ospf OSPF routing protocol
tcp Transmission Control Protocol
udp User Datagram Protocol
Router(config-ext-nacl)#deny icmp ?
A.B.C.D Source address
any Any source host
host A single source host
Router(config-ext-nacl)#deny icmp host 192.168.10.2 ?
A.B.C.D Destination address
any Any destination host
host A single destination host
Router(config-ext-nacl)#deny icmp host 192.168.10.2 host 192.168.30.2
Router(config-ext-nacl)#deny icmp host 192.168.20.2 host 192.168.30.2
Router(config-ext-nacl)#deny udp host 192.168.20.2 host 192.168.30.2 eq 53
Router(config-ext-nacl)#deny tcp host 192.168.10.2 host 192.168.30.2 eq 80
Router(config-ext-nacl)#permit ip any any
Router(config-ext-nacl)#exit
Router(config)#int g0/1
Router(config-if)#
Router(config-if)#ip access-group wn in
Router(config-if)#exit
Router(config)#
Router(config)#int g0/1 //应用到接口
Router(config-if)#ip access-group wn out
Router(config-if)#删除ACL
第一步:查看ACL编号
Show access-lists

假设删除编号为20的acl
进入扩展ACL;然后直接no
Router(config)#ip access-list extended wn
Router(config-ext-nacl)#no 20

指定ACL序号
Router(config-ext-nacl)#?
<1-2147483647> Sequence Number
Router(config-ext-nacl)#12 deny icmp 192.168.20.2 0.0.0.0 192.168.30.2 0.0.0.0
deny icmp 192.168.20.2 0.0.0.0 192.168.30.2 0.0.0.0等同于deny icmp 192.168.20.2 92.168.30.2
此处的0.0.0.0是是255.255.255.255的反掩码,原因acl需要反掩码,标识一个IP我们用的子网掩码是四个255
边栏推荐
- 堆排序 和冒泡排序
- ALSA音频架构 -- aplay播放流程分析
- set_new_handler(0)是什么意思?有什么用?
- 1815. 得到新鲜甜甜圈的最多组数 状态压缩
- Clang Code Model: Error: The clangbackend executable “X:/clangbackend.exe“ could not be started
- The sword refers to offer_abstract modeling capabilities
- Use jackson to parse json data in detail
- 直播平台开发,Flutter,Drawer侧滑
- 使用百度EasyDL实现森林火灾预警识别
- What is ensemble learning in machine learning?
猜你喜欢
![[Likou] 22. Bracket generation](/img/f6/435fe9e0b4c1545514d1bf195ffd44.png)
[Likou] 22. Bracket generation

Clang Code Model: Error: The clangbackend executable “X:/clangbackend.exe“ could not be started

(转)JVM中那些区域会发生OOM?

Apache初体验

Self-research capability was recognized again, and Tencent Cloud Database was included in the Forrester Translytical report

破解事务性工作瓶颈,君子签电子合同释放HR“源动力”!

梅克尔工作室--OpenEuler培训笔记(1)

Provincial level of Echart maps, as well as all prefecture-level download and use

findViewById返回null的问题

《卫星界》刊评“星辰大海”计划:孙宇晨为太空旅游带来新的机遇
随机推荐
shell监视gpu使用情况
解决多线程调用sql存储过程问题
Read the article, high-performance and predictable data center network
send_sig: 内核执行流程
Which one to choose for mobile map development?
"3 Longest Substring Without Repeating Characters" on the 17th day of LeetCode brushing
Redis deletes keys in batches according to regular rules
c语言fprintf、fscanf、sscanf以及sprintf函数知识要点总结
Solve the problem of multi-thread calling sql stored procedure
《卫星界》刊评“星辰大海”计划:孙宇晨为太空旅游带来新的机遇
FPGA工程师面试试题集锦111~120
自研能力再获认可,腾讯云数据库入选 Forrester Translytical 报告
"239 Sliding Window Maximum Value" on the 16th day of LeetCode brushing
.NET自定义中间件
堆排序 和冒泡排序
监听U盘插入 拔出 消息,获得U盘盘符
Bubble sort and heap sort
Snap - rotate the smallest number of an array
ALSA音频架构
Clang Code Model: Error: The clangbackend executable “X:/clangbackend.exe“ could not be started