中兴交换机端口安全配置


中兴5950 配置端口mac绑定和禁止学习功能

  • 配置前先查看下端口下的mac地址表:
1
2
3
4
5
6
AQYX-LaiBangBian-S5950-1#show mac table interface gei-0/1/1/6
Total MAC address : 2
MAC VLAN Outgoing Information Attribute From Time
-------------- ---- ---------------------------- -------------- ---- -----------
6002.9220.e834 9 gei-0/1/1/6 Dynamic 0 00:00:06:15
6002.9261.7dfd 9 gei-0/1/1/6 Dynamic 0 00:00:06:15
  • 配置端口禁止学习mac地址
1
2
3
4
AQYX-LaiBangBian-S5950-1#conf t   //进入配置模式
Enter configuration commands, one per line. End with CTRL/Z.
AQYX-LaiBangBian-S5950-1(config)#mac //进入mac全局配置模式
AQYX-LaiBangBian-S5950-1(config-mac)#learning disable interface gei-0/1/1/6 //命令格式learning disable interface 端口

配置该命令后,最长300smac老化之后,重新使用命令show mac table interface gei-0/1/1/6查看mac地址,会发现原mac地址已经清除。
添加永久mac地址到端口

1
2
AQYX-LaiBangBian-S5950-1(config-mac)#add permanent 6002.9220.e834 interface gei-0/1/1/6 all-owner-vlan  //添加永久地址表,重启依然生效。格式 add permanent  MAC地址 interface 端口 all-owner-vlan
AQYX-LaiBangBian-S5950-1(config-mac)#add permanent 6002.9261.7dfd interface gei-0/1/1/6 all-owner-vlan
  • 查看mac相关配置
1
2
3
4
5
6
7
8
AQYX-LaiBangBian-S5950-1#show running-config mac
!<mac>
mac
learning disable interface gei-0/1/1/6
add permanent 6002.9261.7dfd interface gei-0/1/1/6 vlan 9
add permanent 6002.9220.e834 interface gei-0/1/1/6 vlan 9
$
!</mac>
  • 查看地址表,状态变为permanent
1
2
3
4
5
6
7
8
9
10
11
12
AQYX-LaiBangBian-S5950-1#show mac table permanent 
Total MAC address : 2

Flags: Src--Source filter, Dst--Destination filter
From:0,driver;1,config;2,VPN;3,802.1X;4,micro;5,DHCP;
6,PBT;7,EVB;8,OTV;9,TRILL;10,ESADI,
Time--Day:Hour:Min:Sec

MAC VLAN Outgoing Information Attribute From Time
-------------- ---- ---------------------------- -------------- ---- -----------
6002.9220.e834 9 gei-0/1/1/6 Permanent 1 N/A
6002.9261.7dfd 9 gei-0/1/1/6 Permanent 1 N/A
本文作者: 光明常在
发布时间: 2020-02-03
最后更新: 2020-02-03
本文标题: 中兴交换机端口安全配置
本文链接: http://mmdav0.coding-pages.com/2020/zte-port-sec/
版权声明: 本作品采用 CC BY-NC-SA 4.0 许可协议进行许可,转载请注明出处!
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×