当前位置:网站首页>交换机和路由器技术-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
边栏推荐
- Map中的getOrDefualt方法
- 华南师范宋宇老师课堂对话论文翻译
- 1815. Get the maximum number of groups of fresh donuts state compression
- I wrote some code in my resume, but I still can't pass the interview
- The basics of binary heap~
- 洛谷P6586 蒟蒻火锅的盛宴
- [Server installation mysql] Use mysql offline installation package to install mysql5.7 under centos7
- Redis:解决分布式高并发修改同一个Key的问题
- ALSA音频架构 -- aplay播放流程分析
- Self-research capability was recognized again, and Tencent Cloud Database was included in the Forrester Translytical report
猜你喜欢
![[Likou] 22. Bracket generation](/img/f6/435fe9e0b4c1545514d1bf195ffd44.png)
[Likou] 22. Bracket generation

延长经济保险(jeecgboot)

Layered Architecture & SOA Architecture

2022新员工公司级安全教育基础培训(118页)

To break the bottleneck of transactional work, the gentleman signs the electronic contract to release the "source power" of HR!

LeetCode Brush Questions Day 11 String Series "58 Last Word Length"

Word2021 中的图片保存后就变模糊了

如何将360全景图导出高清短视频分享到视频平台上?

简历里写了会代码,却依然过不了面试这一关

Jetson Orin平台4-16路 GMSL2/GSML1相机采集套件推荐
随机推荐
《卫星界》刊评“星辰大海”计划:孙宇晨为太空旅游带来新的机遇
洛谷P4324 扭动的回文串
jwsManager服务接口实现类-jni实现
ALSA音频架构 -- aplay播放流程分析
"110 Balanced Binary Tree Judgment" in leetCode's 14-day binary tree series
Mysql: set the primary key to automatically increase the starting value
Snap - rotate the smallest number of an array
c语言fprintf、fscanf、sscanf以及sprintf函数知识要点总结
Alibaba Cloud releases 3 high-performance computing solutions
[Server installation mysql] Use mysql offline installation package to install mysql5.7 under centos7
What is Machine Reinforcement Learning?What is the principle?
标识密码技术在 IMS 网络中的应用
Harvesting of radio frequency energy
二叉堆的基础~
ALSA音频架构
Object Creation and Display Transformation
Listen to pull out U disk inserted into the message, U disk drive
使用百度EasyDL实现智能垃圾箱
洛谷P1196 银河英雄传说
MySQL database storage engine and database creation, modification and deletion