当前位置:网站首页>配置基于接口的ARP表项限制和端口安全(限制用户私自接入傻瓜交换机或非法主机接入)
配置基于接口的ARP表项限制和端口安全(限制用户私自接入傻瓜交换机或非法主机接入)
2022-07-02 13:43:00 【文件皆一印】
应用场景:为了防止未授权用户接入网络、用户私自接入交换机、路由器等设备,给公司网络管理带来安全隐患。通过相关技术手段给予禁止,方法有如下二种:配置端口安全和配置基于接口的ARP表项限制
分别介绍二种方法的操作原理及配置:
一、端口安全:将设备端口学习到的动态MAC地址转换为安全MAC地址。在接口下使能此功能,并限制接口最大可学习的MAC表项数量,当超过设置值时,将丢弃后续用户的报文,从而确保接口的终端接入安全,增强设备安全性。
1.1 安全MAC地址分为以下三类:
(1)安全动态MAC地址(使能port-security但未使能Sticky,设备重启后表项会丢失,缺省情况下不会被老化,除非配置了老化时间)
(2)安全静态MAC地址(使能port-security时手工配置的静态MAC地址,不会被老化且设备重启表项不会丢失)
配置命令:port-security enable port-security mac-address 0001-0002-0003 vlan 10
(3)Sticky MAC地址(使能port-security且使能Sticky,不会被老化且设备重启表项不会丢失,推荐采用此种方式)
配置步骤(在接口视图下操作):
port-security enable
port-security mac-address sticky
port-security max-mac-num 10
port-security protect-action restrict
(4)端口安全的保护工作分为以下三种:
- restrict(丢弃,并上报告警,推荐采用此种方式)
- Protect(丢弃,不上报告警)
- Shutdown(接口状态修改为erro-down,并上报告警)
二、ARP表项限制:为了防止当一个接口所接入的某一用户主机发起ARP攻击时导致整个设备的ARP表资源被耗尽。在接口下配置接口能够学习到的最大动态ARP表项数量,超过此设置值后将不允许新增动态ARP表项。
场景1:ARP表项限制

LSW1上配置
#
配置接口GE0/0/1(LSW1)最多可以学习到2个VLAN10对应的动态ARP表项。
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
arp-limit vlan 10 maximum 2
#
或者配置接口VLANIF10最多可以学习到10个动态ARP表项。
#
interface Vlanif10
ip address 192.168.100.254 255.255.255.0
dhcp select interface
arp-limit maximum 10
#
在LSW1上执行display arp all查看ARP表项记录,只学习到PC1和PC2的ARP表项。

执行display arp-limit查看ARP限制表项记录

除了PC3无法访问192.168.100.254,PC1和PC2都可以访问。图忘截了。

场景2:配置端口安全

LSW2配置:
#
vlan batch 10
#
interface GigabitEthernet0/0/5
port link-type access
port default vlan 10
#
PC4和PC5是可以访问网络的


在LSW1上查看ARP表项

在GE0/0/5端口上开启端口安全后,再来观察PC4和PC5能否访问网关
[Huawei-GigabitEthernet0/0/5]port-security enable
[Huawei-GigabitEthernet0/0/5]port-security protect-action protect
[Huawei-GigabitEthernet0/0/5]port-security mac-address sticky
[Huawei-GigabitEthernet0/0/5]port-security max-mac-num 1
执行命令reboot,将LSW1重启,清除ARP表项(reset arp all命令在ENSP上无法使用)。

在PC4和PC5上分别测试能否访问网关192.168.100.254,发现只有PC4可以访问,PC5被拒绝了。


执行display arp all查看GE0/0/1接口下学习到的ARP条目

推荐:将端口安全保护功能更改restrict,在丢弃报文的同时上报告警。
[Huawei-GigabitEthernet0/0/5]port-security protect-action restrict
设备输出的报警如下
Jun 27 2022 01:32:25-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 13, t
he change loop count is 0, and the maximum number of records is 4095.
Jun 27 2022 01:32:32-08:00 Huawei L2IFPPI/4/PORTSEC_ACTION_ALARM:OID 1.3.6.1.4.1
.2011.5.25.42.2.1.7.6 The number of MAC address on interface (10/10) GigabitEthe
rnet0/0/5 reaches the limit, and the port status is : 1. (1:restrict;2:protect;3
:shutdown)
边栏推荐
- jsp 和 servlet 有什么区别?
- Summary | three coordinate systems in machine vision and their relationships
- Hard core! One configuration center for 8 classes!
- PWM controlled steering gear
- Machine learning perceptron model
- 【云原生】简单谈谈海量数据采集组件Flume的理解
- vscode设置删除行快捷键[通俗易懂]
- July 1st gift: Yi Jingjie's "hundred day battle" ended perfectly, and the database of Guiyang bank was sealed in advance
- Yyds dry inventory KVM new inventory to expand space for home
- Résumé de l'entrevue de Dachang Daquan
猜你喜欢

unity Hub 登錄框變得很窄 無法登錄

Yyds dry inventory uses thread safe two-way linked list to realize simple LRU cache simulation

Yyds dry goods inventory # look up at the sky | talk about the way and principle of capturing packets on the mobile terminal and how to prevent mitm

Recalling the college entrance examination and becoming a programmer, do you regret it?

PCL point cloud image transformation

月报总结|Moonbeam6月份大事一览

SQL solves the problem of continuous login deformation holiday filtering

Which software is good for machine vision?

Mathematical analysis_ Notes_ Chapter 6: Riemann integral of univariate function

Some problems about MySQL installation
随机推荐
中国信通院《数据安全产品与服务图谱》,美创科技实现四大板块全覆盖
总结|机器视觉中三大坐标系及其相互关系
Classifier visual interpretation stylex: Google, MIT, etc. have found the key attributes that affect image classification
pwm呼吸灯
LeetCode 2. Add two numbers
vscode设置删除行快捷键[通俗易懂]
月报总结|Moonbeam6月份大事一览
Lampe respiratoire PWM
Recalling the college entrance examination and becoming a programmer, do you regret it?
台积电全球员工薪酬中位数约46万,CEO约899万;苹果上调日本的 iPhone 售价 ;Vim 9.0 发布|极客头条...
Foreign enterprise executives, continuous entrepreneurs, yoga and skiing masters, and a program life of continuous iteration and reconstruction
有赞和腾讯云、阿里云一同摘得“中国企业云科技服务商50强”[通俗易懂]
流批一体在京东的探索与实践
Seal Library - installation and introduction
Download blender on Alibaba cloud image station
Global and Chinese markets for carbon dioxide laser cutting heads 2022-2028: Research Report on technology, participants, trends, market size and share
LeetCode 5. Longest Palindromic Substring
分析超700万个研发需求发现,这8门编程语言才是行业最需要的!
LeetCode 3. Longest substring without duplicate characters
Penetration tool - intranet permission maintenance -cobalt strike