端口安全基本配置

1.top图

2.交换机配置

复制代码
交换机swa
<SWA> system-view
[SWA] vlan batch 10 20


[SWA] interface GigabitEthernet0/0/1
[SWA-GigabitEthernet0/0/1] port link-type trunk
[SWA-GigabitEthernet0/0/1] port trunk allow-pass vlan 10


[SWA] interface GigabitEthernet0/0/2
[SWA-GigabitEthernet0/0/2] port link-type trunk
[SWA-GigabitEthernet0/0/2] port trunk allow-pass vlan 20

交换机swb
<SWB> system-view
[SWB] vlan 10
[SWB-vlan10] quit
[SWB] interface GigabitEthernet0/0/1   
[SWB-GigabitEthernet0/0/1] port link-type access
[SWB-GigabitEthernet0/0/1] port default vlan 10
[SWB] interface GigabitEthernet0/0/2    
[SWB-GigabitEthernet0/0/2] port link-type access
[SWB-GigabitEthernet0/0/2] port default vlan 10
[SWB-GigabitEthernet0/0/1] port-security enable
[SWB-GigabitEthernet0/0/1] port-security max-mac-num 1
[SWB-GigabitEthernet0/0/1] port-security mac-address static 5489-983F-24E5 vlan 10
[SWB-GigabitEthernet0/0/1] port-security protect-action shutdown
[SWB-GigabitEthernet0/0/2] port-security enable
[SWB-GigabitEthernet0/0/2] port-security max-mac-num 1
[SWB-GigabitEthernet0/0/2] port-security mac-address static 5489-98a4-2424 vlan 10
[SWB-GigabitEthernet0/0/2] port-security protect-action shutdown
[SWB] interface GigabitEthernet0/0/3
[SWB-GigabitEthernet0/0/24] port link-type trunk
[SWB-GigabitEthernet0/0/24] port trunk allow-pass vlan 10

交换机swc
<SWC> system-view
[SWC] vlan 20
[SWC-vlan20] quit
[SWC] interface GigabitEthernet0/0/1    
[SWC-GigabitEthernet0/0/1] port link-type access
[SWC-GigabitEthernet0/0/1] port default vlan 20
[SWC] interface GigabitEthernet0/0/2    
[SWC-GigabitEthernet0/0/2] port link-type access
[SWC-GigabitEthernet0/0/2] port default vlan 20
[SWC-GigabitEthernet0/0/1] port-security enable
[SWC-GigabitEthernet0/0/1] port-security max-mac-num 1
[SWC-GigabitEthernet0/0/1] port-security mac-address dynamic
[SWC-GigabitEthernet0/0/1] port-security aging-time 5   
[SWC-GigabitEthernet0/0/1] port-security protect-action restrict
[SWC-GigabitEthernet0/0/2] port-security enable
[SWC-GigabitEthernet0/0/2] port-security max-mac-num 1
[SWC-GigabitEthernet0/0/2] port-security mac-address dynamic
[SWC-GigabitEthernet0/0/2] port-security aging-time 5
[SWC-GigabitEthernet0/0/2] port-security protect-action restrict
[SWC] interface GigabitEthernet0/0/3
[SWC-GigabitEthernet0/0/24] port link-type trunk
[SWC-GigabitEthernet0/0/24] port trunk allow-pass vlan 20

3.ping

相关推荐
忧郁的橙子.17 分钟前
三、k8s 1.29 之 安装2
linux·运维·服务器
数据智能老司机23 分钟前
实现逆向工程——汇编指令演练
安全·逆向·汇编语言
huangyuchi.1 小时前
【Linux系统】动静态库的制作
linux·运维·服务器·动态库·静态库·库的简单制作
闻不多1 小时前
用llamaindex搭建GAR遇到400
android·运维·服务器
jim写博客1 小时前
Linux进程概念(四)环境地址变量
linux·运维·服务器
Fine姐2 小时前
The Network Link Layer: 无线传感器中Delay Tolerant Networks – DTNs 延迟容忍网络
开发语言·网络·php·硬件架构
网络研究院3 小时前
新的“MadeYouReset”方法利用 HTTP/2 进行隐秘的 DoS 攻击
网络·网络协议·安全·http·攻击·漏洞
189228048613 小时前
NY270NY273美光固态闪存NY277NY287
服务器·网络·数据库·科技·性能优化
guts°3 小时前
6-服务安全检测和防御技术
安全
你好,赵志伟4 小时前
Socket 编程 TCP
linux·服务器·tcp/ip