HCIA datacom实验文档:基本ACL 高级ACL配置
https://editor-material.365editor.com/style/20230220167686474063f2ece47a929material.gif1 拓扑 按拓扑配置各接口 PC的IP
https://editor-user.365editor.com/98/85/4933185/1694140270584882.png
2 R1配置相应的规则
acl number 2000//创建基本ACL2000 范围2000-2999
rule 5 deny source 192.168.1.100 0.0.0.0//拒绝源IP为192.168.1.100主机的流量
rule 10 deny source 192.168.1.101 0.0.0.0//拒绝源IP为192.168.1.101主机的流量
rule 999 permit//允许所有的流量通过华为设备上隐含规则为放行所有,其他厂商默认为拒绝所有
int g0/0/0
traffic-filter inbound acl 2000//0口入方向上调用了ACL2000的流量过滤
3 PC1上更换IP测试
PC1的IP为192.168.1.100测试
https://editor-user.365editor.com/98/85/4933185/1694140301192529.png
不能通
PC1的IP为192.168.1.101测试
https://editor-user.365editor.com/98/85/4933185/169414035160525.png
不能通
PC1的IP为192.168.1.102测试
https://editor-user.365editor.com/98/85/4933185/1694140370299542.png
高级ACL
1 拓扑 按拓扑配置各接口 PC的IP
https://editor-user.365editor.com/98/85/4933185/1694140481563548.png
2 R1配置相应的规则
acl number 3000//创建高级ACL 3000 范围3000-3999
rule 5 deny ip source 192.168.1.100 0.0.0.0 destination 192.168
.2.100 0.0.0.0//添加规则,拒绝源地址192.168.1.100 访问目的地址192.168.2.100的IP地址
//拒绝所有网段就是192.168.1.0 0.0.0.255
rule 999 permit ip source any destination any//放行所有的IP流量
q
int g0/0/0
traffic-filter inbound acl 3000//0口方向调用ACL3000流量过滤
3 PC1上更换IP测试
PC1 IP地址192.168.1.100
https://editor-user.365editor.com/98/85/4933185/1694140564298443.png
PC1 IP地址192.168.1.101
https://editor-user.365editor.com/98/85/4933185/1694140896339158.png
可以通
4 拒绝奇数IP的所有流量配置 清除ACL3000的配置
acl number 2001
rule 5 deny source 192.168.1.1 0.0.0.254//拒绝奇数IP的流量访问,通配符0代表严格匹配,1代表任意匹配
q
int g0/0/0
traffic-filter inbound acl 2001
5 PC1上更换IP测试
PC1 IP地址192.168.1.100
https://editor-user.365editor.com/98/85/4933185/1694140927337818.png
PC1 IP地址192.168.1.199
https://editor-user.365editor.com/98/85/4933185/1694140942780634.png
PC1 IP地址192.168.1.200
https://editor-user.365editor.com/98/85/4933185/1694140967444380.png
https://editor-material.365editor.com/style/20230220167686474063f2ece49a3d3material.gif
https://editor-material.365editor.com/style/20230220167686474063f2ece4b7c43material.gif
{:6_268:} 感谢楼主分享 终于找到了,谢谢大佬 感謝樓主分享
感謝樓主分享 终于明白了啊
页:
[1]