27-端口安全快速配置指南
本章節下載 (202.70 KB)
端口安全快速配置指南
Copyright © 2024 bobty下载软件 版權所有,保留一切權利。
非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,並不得以任何形式傳播。
除bobty下载软件 的商標外,本手冊中出現的其它公司的商標、產品標識及商品名稱,由各自權利人擁有。
本文檔中的信息可能變動,恕不另行通知。
本案例介紹端口安全autoLearn模式的配置方法。
如圖1所示,用戶通過Device連接到網絡。通過配置端口安全autolearn模式,實現對接入用戶的控製,具體需求如下:
· 最多同時允許64個用戶直接通過交換機接入Internet,無需進行認證;
· 當用戶數量超過設定值後,新用戶無法通過Device接入Internet;
· 配置安全MAC地址並設定安全MAC地址老化時間,來防止交換機與用戶相連端口學習到的MAC地址的丟失,及安全MAC地址不老化帶來的一些問題;
· 配置入侵檢測特性方式為disableport-temporarily,當再有新的MAC地址接入時,交換機與用戶相連端口被暫時斷開連接,30秒後自動恢複端口的開啟狀態。
圖1 端口安全autoLearn模式組網圖
當端口工作於autoLearn模式時,無法更改端口安全允許的最大MAC地址數。
# 使能端口安全。
<Device> system-view
[Device] port-security enable
# 設置安全MAC地址的老化時間為30分鍾。
[Device] port-security timer autolearn aging 30
# 設置端口安全允許的最大安全MAC地址數為64。
[Device] interface ten-gigabitethernet 1/0/1
[Device-Ten-GigabitEthernet1/0/1] port-security max-mac-count 64
# 設置端口安全模式為autoLearn。
[Device-Ten-GigabitEthernet1/0/1] port-security port-mode autolearn
# 設置觸發入侵檢測特性後的保護動作為暫時關閉端口,關閉時間為30秒。
[Device-Ten-GigabitEthernet1/0/1] port-security intrusion-mode disableport-temporarily
[Device-Ten-GigabitEthernet1/0/1] quit
[Device] port-security timer disableport 30
# 上述配置完成後,可以使用display port-security interface命令查看端口安全的配置情況。
[Device] display port-security interface ten-gigabitethernet 1/0/1
Global port security parameters:
Port security : Enabled
AutoLearn aging time : 30 min
Disableport timeout : 30 s
Blockmac timeout : 180 s
MAC move : Denied
Authorization fail : Online
NAS-ID profile : Not configured
Dot1x-failure trap : Disabled
Dot1x-logon trap : Disabled
Dot1x-logoff trap : Disabled
Intrusion trap : Disabled
Address-learned trap : Disabled
Mac-auth-failure trap : Disabled
Mac-auth-logon trap : Disabled
Mac-auth-logoff trap : Disabled
Open authentication : Disabled
OUI value list :
Ten-GigabitEthernet1/0/1 is link-up
Port mode : autoLearn
NeedToKnow mode : Disabled
Intrusion protection mode : DisablePortTemporarily
Security MAC address attribute
Learning mode : Sticky
Aging type : Periodical
Max secure MAC addresses : 64
Current secure MAC addresses : 5
Authorization : Permitted
NAS-ID profile : Not configured
Free VLANs : Not configured
Open authentication : Disabled
MAC-move VLAN check bypass : Disabled
可以看到端口安全所允許的最大安全MAC地址數為64,端口模式為autoLearn,入侵檢測保護動作為DisablePortTemporarily,入侵發生後端口被禁用時間為30秒。
配置生效後,端口允許地址學習,學習到的MAC地址數可在上述顯示信息的“Current secure MAC addresses”字段查看到。
# 具體的MAC地址信息可以在二層以太網接口視圖下用display this命令查看。
[Device] interface ten-gigabitethernet 1/0/1
[Device-Ten-GigabitEthernet1/0/1] display this
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port-security intrusion-mode disableport-temporarily
port-security max-mac-count 64
port-security port-mode autolearn
port-security mac-address security sticky 00e0-fc00-5920 vlan 1
port-security mac-address security sticky 00e0-fc00-592a vlan 1
port-security mac-address security sticky 00e0-fc00-592b vlan 1
port-security mac-address security sticky 00e0-fc00-592c vlan 1
port-security mac-address security sticky 00e0-fc00-592d vlan 1
#
當學習到的MAC地址數達到64後,用命令display port-security interface可以看到端口模式變為secure,再有新的MAC地址到達將觸發入侵保護,可以通過命令display interface看到此端口關閉。30秒後,端口狀態恢複。此時,如果手動刪除幾條安全MAC地址後,端口安全的狀態重新恢複為autoLearn,可以繼續學習MAC地址。
#
port-security enable
port-security timer disableport 30
port-security timer autolearn aging 30
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port-security intrusion-mode disableport-temporarily
port-security max-mac-count 64
port-security port-mode autolearn
#
· 產品配套“安全配置指導”中的“端口安全”。
· 產品配套“安全命令參考”中的“端口安全”。
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!