日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

思科扩展ACL具体怎么配置?

發布時間:2025/3/20 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 思科扩展ACL具体怎么配置? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.?理解擴展ACL的應用

2.?掌握擴展ACL的配置

1.?根據實驗拓撲圖,完成設備的基本配置;

2.?配置EIGRP,使得全網路由可達;

3.?在R3上部署ACL,只允許192.168.1.0/24網段的用戶Ping?PC3;

4.?在R3上部署ACL,只允許192.168.2.0/24網段的用戶Telnet?PC3。

步驟1:設備的基本配置

配置PC1

Router>enable Router#configure terminal Router(config)#hostname PC1 PC1(config)#no ip routing PC1(config)#ip default-gateway 192.168.1.254 PC1(config)#interface ethernet0/0 PC1(config-if)#ip address 192.168.1.1 255.255.255.0 PC1(config-if)#no shutdown PC1(config-if)#end PC1#

?配置PC2:

Router>enable Router#configure terminal Router(config)#hostname PC2 PC2(config)#no ip routing PC2(config)#ip default-gateway 192.168.2.254 PC2(config)#interface ethernet0/0 PC2(config-if)#ip address 192.168.2.1 255.255.255.0 PC2(config-if)#no shutdown PC2(config-if)#end PC2#

?配置PC3:

Router>enable Router#configure terminal Router(config)#hostname PC3 PC3(config)#no ip routing PC3(config)#line vty 0 4 PC3(config-line)#password xmws PC3(config-line)#login PC3(config-line)#transport input telnet PC3(config-line)#exit PC3(config)#ip default-gateway 192.168.3.254 PC3(config)#interface ethernet0/0 PC3(config-if)#ip address 192.168.3.1 255.255.255.0 PC3(config-if)#no shutdown PC3(config-if)#end PC3#

?配置R1:

Router>enable Router#configure terminal Router(config)#hostname R1 R1(config)#no ip domain-lookup R1(config)#line console 0 R1(config-line)#exec-timeout 0 0 R1(config-line)#logging synchronous R1(config-line)#exit R1(config)#interface ethernet0/0 R1(config-if)#ip address 192.168.1.254 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface serial1/0 R1(config-if)#ip address 192.168.12.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#end R1#

配置R2:

Router>enable Router#configure terminal Router(config)#hostname R2 R2(config)#no ip domain-lookup R2(config)#line console 0 R2(config-line)#exec-timeout 0 0 R2(config-line)#logging synchronous R2(config-line)#exit R2(config)#interface serial1/0 R2(config-if)#ip address 192.168.12.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#interface serial1/1 R2(config-if)#ip address 192.168.23.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#interface ethernet0/0 R2(config-if)#ip address 192.168.2.254 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#end R2#

?配置R3:

Router>enable Router#configure terminal Router(config)#hostname R3 R3(config)#no ip domain-lookup R3(config)#line console 0 R3(config-line)#exec-timeout 0 0 R3(config-line)#logging synchronous R3(config-line)#exit R3(config)#interface ethernet0/0 R3(config-if)#ip address 192.168.3.254 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#interface serial1/0 R3(config-if)#ip address 192.168.23.3 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#end R3#

步驟2:配置靜態路由

配置R1:

R1(config)#ip route 192.168.2.0 255.255.255.0 192.168.12.2 R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.12.2 R1(config)#ip route 192.168.23.0 255.255.255.0 192.168.12.2

?配置R2:

R2(config)#ip route 192.168.1.0 255.255.255.0 serial1/0 R2(config)#ip route 192.168.3.0 255.255.255.0 serial1/1

配置R3:

R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.23.2 R3(config)#ip route 192.168.2.0 255.255.255.0 192.168.23.2 R3(config)#ip route 192.168.12.0 255.255.255.0 192.168.23.2 這個時候任何一個網段都能訪問PC3。

測試PC1ping?PC3

PC1#ping 192.168.3.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 19/20/22 ms

測試PC1 telnet PC3

PC1#telnet 192.168.3.1 Trying 192.168.3.1 ... Open User Access Verification Password: PC3>

測試PC2ping?PC3

PC2#ping 192.168.3.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 10/10/11 ms

測試PC2?telnet?PC3

PC1#telnet 192.168.3.1 Trying 192.168.3.1 ... Open User Access Verification Password: PC3>

步驟3:配置擴展ACL

配置R3

R3(config)#access-list 101 permit icmp 192.168.1.0 0.0.0.255 host 192.168.3.1 R3(config)#access-list 101 permit tcp 192.168.2.0 0.0.0.255 host 192.168.3.1 eq 23 R3(config)#interface serial 1/0 R3(config-if)#ip access-group 101 in R3(config-if)#end R3# 這個時候只有PC1能PingPC3,PC2能Telnet PC3。 測試PC1ping PC3: PC1#ping 192.168.3.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 19/20/22 ms測試PC1 telnet PC3: PC1#telnet 192.168.3.1 Trying 192.168.3.1 ... % Destination unreachable; gateway or host down PC1#

測試PC2ping?PC3

PC2#ping 192.168.3.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds: U.U.U Success rate is 0 percent (0/5)

測試PC2?telnet?PC3

PC1#telnet 192.168.3.1 Trying 192.168.3.1 ... Open User Access Verification Password: PC3>

《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀

總結

以上是生活随笔為你收集整理的思科扩展ACL具体怎么配置?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。