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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章