端口安全基本配置

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值