端口安全基本配置

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

相关推荐
grrrr_11 分钟前
【工具类】Nuclei YAML POC 编写以及批量检测
网络·安全·web安全
码出钞能力1 小时前
更换libc.so导致linux变砖,通过LD_PRELOAD挽救
linux·服务器
中新赛克1 小时前
双引擎驱动!中新赛克AI安全方案入选网安创新大赛优胜榜单
人工智能·安全
青 .2 小时前
数据结构---二叉搜索树的实现
c语言·网络·数据结构·算法·链表
小猪咪piggy2 小时前
【JavaEE】(24) Linux 基础使用和程序部署
linux·运维·服务器
AORO20252 小时前
三防手机的三防是指什么?推荐一款实用机型
网络·5g·智能手机·制造·信息与通信
努力学习的小廉4 小时前
深入了解linux系统—— 线程同步
linux·服务器·数据库·算法
sinat_602035364 小时前
模块与包的导入
运维·服务器·开发语言·python
鲸屿1954 小时前
Ansible之playbook
服务器·网络·ansible
网硕互联的小客服4 小时前
408 Request Timeout:请求超时,服务器等待客户端发送请求的时间过长。
运维·服务器