久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

標準ACL配置的示例分析

186次閱讀
沒有評論

共計 3380 個字符,預計需要花費 9 分鐘才能閱讀完成。

丸趣 TV 小編給大家分享一下標準 ACL 配置的示例分析,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

訪問控制列表(一)結構:

一. 訪問控制列表概述:訪問控制列表(ACL)

1. 讀取第三層、第四層包頭信息

2. 根據預先定義好的規則對包進行過濾

二. 訪問控制類表的工作原理訪問控制列表在接口應用的方向:

出:已經過路由器的處理,正離開路由器接口的數據包

入:已達到路由器接口的數據包,將被路由器處理

列表應用到接口方向與數據方向有關訪問控制列表的處理過程:

ACL 規則:匹配為自上而下逐條匹配,默認隱含的拒絕是拒絕所有(any)白名單:

允許  1.2
允許  1.3
拒絕所有(不寫)

黑名單:

拒絕  1.2
拒絕  1.3
允許所有(必須寫)

三.ACL 訪問控制列表的類型:標準訪問控制列表:

1. 基于 IP 地址過濾數據包
2. 標準訪問控制列表的訪問控制列表號是 1~99

擴展訪問控制列表:

1. 基于源 IP、目標 IP 地址、指定協議、端口和標志來過濾數據包
2. 擴展訪問控制列表的訪問控制列表號是 100~199

命名訪問控制列表(包含標準和擴展):

1. 命名訪問控制列表允許在標準和擴展訪問控制列表中使用名稱待敵表號

可靈活調整策略

四. 標準訪問控制列表的配置創建 ACL:

Router(config)#access-list accsee-list-number
 { permit 允許數據包通過  | deny 拒絕數據包通過  } source [ source-wildcard ] 可對源 IP 進行控制 

刪除 ACL:

Router(config)#no access-list access-list-number

應用實例:

Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)# access-list 1 permit 192.168.2.2 0.0.0.0
允許 192.168.1.0/24 和主機 192.168.2.2 的流量通過 

隱含的拒絕語句:

Router(config)# access-list 1 deny 0.0.0.0 255.255.255.255

關鍵字:

host/any

Demo1:標準 ACL 的配置實例

 交換機:sw#conf t 
sw(config)#no ip routing
sw(config)#int f1/0
sw(config-if)#speed 100
sw(config-if)#dup full
 路由器:R1#conf t
R1(config)#int f0/0
R1(config-if)#ip add 192.168.10.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int f0/1
R1(config-if)#ip add 192.168.20.1 255.255.255.0
R1(config-if)#no shut
 客戶機配置 IP 地址:PC1  ip 192.168.10.2 192.168.10.1
Checking for duplicate address...
PC1 : 192.168.10.2 255.255.255.0 gateway 192.168.10.1
PC2  ip 192.168.10.3 192.168.10.1 
Checking for duplicate address...
PC1 : 192.168.10.3 255.255.255.0 gateway 192.168.10.1
PC3  
PC3  ip 192.168.20.2 192.168.20.1
Checking for duplicate address...
PC1 : 192.168.20.2 255.255.255.0 gateway 192.168.20.1
 驗證互通:PC1  ping 192.168.20.2 
192.168.20.2 icmp_seq=1 timeout
84 bytes from 192.168.20.2 icmp_seq=2 ttl=63 time=15.676 ms
84 bytes from 192.168.20.2 icmp_seq=3 ttl=63 time=17.680 ms
84 bytes from 192.168.20.2 icmp_seq=4 ttl=63 time=21.956 ms
84 bytes from 192.168.20.2 icmp_seq=5 ttl=63 time=12.700 ms
PC2  ping 192.168.20.2
192.168.20.2 icmp_seq=1 timeout
192.168.20.2 icmp_seq=2 timeout
84 bytes from 192.168.20.2 icmp_seq=3 ttl=63 time=17.735 ms
84 bytes from 192.168.20.2 icmp_seq=4 ttl=63 time=14.069 ms
84 bytes from 192.168.20.2 icmp_seq=5 ttl=63 time=14.960 ms
// 此時全網段互通 

全局模式下在 R1 上定義規則

R1(config-if)#access-list 1 deny host 192.168.10.2
R1(config)#do show access-list
R1(config)#access-list 1 permit any
R1(config)#int f0/0
R1(config-if)#ip access-group 1 in

PC1pingPC3 顯示管理員拒絕:

PC1  ping 192.168.20.2
*192.168.10.1 icmp_seq=1 ttl=255 time=20.233 ms (ICMP type:3, code:13, Communication administratively prohibited)
*192.168.10.1 icmp_seq=2 ttl=255 time=4.913 ms (ICMP type:3, code:13, Communication administratively prohibited)
*192.168.10.1 icmp_seq=3 ttl=255 time=12.927 ms (ICMP type:3, code:13, Communication administratively prohibited)
*192.168.10.1 icmp_seq=4 ttl=255 time=12.965 ms (ICMP type:3, code:13, Communication administratively prohibited)
*192.168.10.1 icmp_seq=5 ttl=255 time=13.958 ms (ICMP type:3, code:13, Communication administratively prohibited)

PC1pingPC2 可以連通:

PC1 ping 192.168.10.3
84 bytes from 192.168.10.3 icmp_seq=1 ttl=64 time=0.000 ms
84 bytes from 192.168.10.3 icmp_seq=2 ttl=64 time=0.975 ms
84 bytes from 192.168.10.3 icmp_seq=3 ttl=64 time=0.997 ms
84 bytes from 192.168.10.3 icmp_seq=4 ttl=64 time=0.000 ms
84 bytes from 192.168.10.3 icmp_seq=5 ttl=64 time=1.731 ms

以上是“標準 ACL 配置的示例分析”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注丸趣 TV 行業資訊頻道!

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-08-25發表,共計3380字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 车险| 洛浦县| 柘荣县| 当阳市| 昆明市| 博乐市| 霍城县| 肥东县| 静海县| 邹城市| 若羌县| 普陀区| 元谋县| 彭泽县| 曲阳县| 电白县| 无锡市| 同心县| 花莲市| 宜兰市| 微博| 竹山县| 静安区| 祁阳县| 阿图什市| 西和县| 平凉市| 揭阳市| 汾阳市| 贞丰县| 通辽市| 承德县| 缙云县| 桑日县| 赤城县| 北海市| 青铜峡市| 杭锦后旗| 双鸭山市| 通城县| 布拖县|