1、请自行准备好华为交换机和电脑并且让你的电脑和交换机连接上
2、采用如下的思路配置接口安全:创建VLAN,并配置接口的链路类型为Trunk。使能接口安全功能。使能接口Sticky MAC功能。配置接口安全功能的保护动作。配置接口MAC地址学习限制数。
3、创建VLAN,并配置接口的链路类型:
4、<Quidway> system-view[Quidway] vlan 10[Quidw锾攒揉敫ay-vlan10] quit[Quidway] interface ethernet 0/0/1[Quidway-Ethernet0/0/1] port link-type trunk[Quidway-Ethernet0/0/1] port trunk allow-pass vlan 10
5、配置接口安全功能
6、# 使能接口安全功能。[Quidway-Ethernet0/0/1] port-security enable
7、# 使能接口Sticky MAC功能。[Quidway-Ethernet0/0/1] port-security mac-address sticky
8、# 配置接口安全功能的保护动作。[Quidway-Ethernet0/0/1] port-security protect-action protect
9、# 配置接口MAC地址学习限制数。[Quidway-Ethernet0/0/1] port-security max-mac-num 4
10、其他接口如需使能接口安全功能,请重复上述配置。
11、查看当前配置蟠校盯昂disp cur inter Ethernet0/0/1interface Ethernet0/0/1port link-type trunkport trunk allow-pass vlan 10port-security enableport-security protect-action protectport-security mac-address stickyport-security max-mac-num 4#
12、验证配置结果将PC1换成其他设备,无法访问公司网络。(实现需求)
13、如果您觉得本经验有帮助,请点击正下方的或右上角的“大拇指”或“分享”或“关注TA”给我支持和鼓励为了方便下次寻找,您可以点击“收藏”收藏本经验
14、如有其他问题请联系我本人