ACL访问控制实验

ACL(简单的安全技术,三层技术)
ACL:access control list 访问控制列表用于数据包的访问控制
ACL(两种):
基本ACL(2000-2999):只能那个匹配源ip地址
高级ACL(3000-3999):可以匹配源ip,目标ip,源端口,目标端口等三层和四层ip报文字段
ACL 两种作用:
1.用来对数据包做访问控制
2.结合其他协议用来匹配范围

在这里插入图片描述

搭建直连路由

ps: 因为ACL的访问规则在普通的Router型路由器上行不通,得使用AR2220型号的路由器

PC1:
ip: 11.1.1.2
netamsk: 255.255.255.0
gateway: 11.1.1.1

PC2:
ip: 12.1.1.2
netamsk: 255.255.255.0
gateway: 12.1.1.1

PC3:
ip: 13.1.1.2
netamsk: 255.255.255.0
gateway: 13.1.1.1

R1配置命令: 
system-view
sysname R1
interface e0/0/0 
ip address 13.1.1.1 24
interface e0/0/1
ip address 1.1.1.1 24
interface g0/0/0
ip address 2.2.2.1 24
quit
display ip interface brief

R2配置命令:
system-view
sysname R2
interface e0/0/0
ip address 1.1.1.2 24
interface e0/0/1
ip address 11.1.1.1 24
dis this

AR1配置命令:
system-view
sysname AR1
interface g0/0/0
ip address 2.2.2.2 24
interface g0/0/1
ip address 12.1.1.1 24
dis this

配置ospf动态路由

R1配置命令:
sys
ospf 
area 0
network 1.1.1.0 0.0.0.255
network 2.2.2.0 0.0.0.255
network 13.1.1.0 0.0.0.255
quit
display ip routing-table

R2配置命令:
sys
ospf
area 0
network 1.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
quit
display ip routing-table

AR1命令配置:
sys
ospf
area 0
network 2.2.2.0 0.0.0.255
network 12.1.1.0 0.0.0.255
quit
display ip routing-table

在这里插入图片描述

ACL访问控制
要求:在AR1上配置ACL,拒绝PC1(11.1.1.2)访问PC2(12.1.1.2)

ps: 命令不会敲可以空格后?查看,如下图
在这里插入图片描述

AR1路由器ACL配置命令:
system-view
acl 3000
rule deny ip source 11.1.1.2 0.0.0.255 destination 12.1.1.2 0.0.0.255
quit
interface g0/0/0
traffic-filter inbound acl 3000

PC1: 11.1.1.2ping测试PC2: 12.1.1.2
在这里插入图片描述
成功拒绝PC111.1.1.2访问PC2: 12.1.1.2

发布了103 篇原创文章 · 获赞 30 · 访问量 9064

猜你喜欢

转载自blog.csdn.net/mochu7777777/article/details/105670620