当前位置:网站首页>Configure ARP table entry restrictions and port security based on the interface (restrict users' private access to fool switches or illegal host access)
Configure ARP table entry restrictions and port security based on the interface (restrict users' private access to fool switches or illegal host access)
2022-07-02 16:54:00 【All documents are printed】
Application scenarios : To prevent unauthorized users from accessing the network 、 Users access the switch privately 、 Routers and other devices , Bring security risks to the company's network management . Prohibit by relevant technical means , There are two methods as follows : Configure port security and interface based ARP Table entry restrictions
The operation principle and configuration of the two methods are introduced respectively :
One 、 Port security : Learn the dynamics of the device port MAC Address translation to security MAC Address . Enable this function under the interface , And limit the maximum number of interfaces that can be learned MAC Number of entries , When the set value is exceeded , Messages of subsequent users will be discarded , So as to ensure the terminal access security of the interface , Enhance device security .
1.1 Security MAC Addresses fall into the following three categories :
(1) Security dynamic MAC Address ( Can make port-security But it does not enable Sticky, After the device is restarted, the table item will be lost , It will not be aged by default , Unless aging time is configured )
(2) Security static MAC Address ( Can make port-security Manually configured static MAC Address , It will not be aged and the equipment restart table item will not be lost )
Configuration command :port-security enable port-security mac-address 0001-0002-0003 vlan 10
(3)Sticky MAC Address ( Can make port-security And enable Sticky, It will not be aged and the equipment restart table item will not be lost , This is recommended )
Configuration steps ( Operate in the interface view ):
port-security enable
port-security mac-address sticky
port-security max-mac-num 10
port-security protect-action restrict
(4) The protection of port security is divided into the following three types :
- restrict( discarded , And report to the police , This is recommended )
- Protect( discarded , Don't report to the police )
- Shutdown( The interface status is changed to erro-down, And report to the police )
Two 、ARP Table entry restrictions : In order to prevent a user host connected to an interface from initiating ARP During the attack, the whole device ARP Table resources are exhausted . Configure the maximum dynamics that the interface can learn under the interface ARP Number of entries , After this setting value is exceeded, new dynamics will not be allowed ARP Table item .
scene 1:ARP Table entry restrictions

LSW1 On the configuration
#
Configure interface GE0/0/1(LSW1) You can learn at most 2 individual VLAN10 The corresponding dynamic ARP Table item .
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
arp-limit vlan 10 maximum 2
#
perhaps Configure interface VLANIF10 You can learn at most 10 A dynamic ARP Table item .
#
interface Vlanif10
ip address 192.168.100.254 255.255.255.0
dhcp select interface
arp-limit maximum 10
#
stay LSW1 On the implementation display arp all see ARP Table item record , Only learn PC1 and PC2 Of ARP Table item .

perform display arp-limit see ARP Restrict entry records

except PC3 cannot access 192.168.100.254,PC1 and PC2 All accessible . I forgot to cut the picture .

scene 2: Configure port security

LSW2 To configure :
#
vlan batch 10
#
interface GigabitEthernet0/0/5
port link-type access
port default vlan 10
#
PC4 and PC5 Can access the network


stay LSW1 Check out ARP Table item

stay GE0/0/5 After opening port security on the port , Then watch PC4 and PC5 Can I access the gateway
[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
Carry out orders reboot, take LSW1 restart , eliminate ARP Table item (reset arp all Command in ENSP Can't use ).

stay PC4 and PC5 Test whether you can access the gateway 192.168.100.254, Only found PC4 You can visit ,PC5 Rejected .


perform display arp all see GE0/0/1 Learned under the interface ARP entry

recommend : Change the port security protection function restrict, Report the alarm while discarding the message .
[Huawei-GigabitEthernet0/0/5]port-security protect-action restrict
The alarms output by the equipment are as follows
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)
边栏推荐
- Sim2real environment configuration tutorial
- PWM breathing lamp
- uboot的作用和功能
- LeetCode 3. Longest substring without duplicate characters
- 618 reprise en profondeur: la méthode gagnante de la famille Haier Zhi
- Global and Chinese markets for airport baggage claim conveyors 2022-2028: technology, participants, trends, market size and share Research Report
- LeetCode 6. Z 字形变换 (N字形变换)
- AcWing 300. Task arrangement
- Take you ten days to easily complete the go micro service series (I)
- Mathematical analysis_ Notes_ Chapter 6: Riemann integral of univariate function
猜你喜欢

基于Impala的高性能数仓实践之执行引擎模块

Take you ten days to easily complete the go micro service series (I)

Analyzing more than 7million R & D needs, it is found that these eight programming languages are the most needed in the industry!
![L'explosion de John utilise l'encodage d'entrée par défaut: UTF - 8 Loaded 1 password Hash (bcrypt [blowfish 32 / 64 X3])](/img/4c/ddf7f8085257d0eb8766dbec251345.png)
L'explosion de John utilise l'encodage d'entrée par défaut: UTF - 8 Loaded 1 password Hash (bcrypt [blowfish 32 / 64 X3])

Summary | three coordinate systems in machine vision and their relationships

What is the difference between self attention mechanism and fully connected graph convolution network (GCN)?

流批一体在京东的探索与实践

大厂面试总结大全

Win11应用商店无法加载页面怎么办?Win11商店无法加载页面

Which software is good for machine vision?
随机推荐
PWM controlled steering gear
Yolov5 practice: teach object detection by hand
Seal Library - installation and introduction
LeetCode 1. Sum of two numbers
LeetCode 1. 两数之和
Win11应用商店无法加载页面怎么办?Win11商店无法加载页面
pwm呼吸燈
What is normal distribution? What is the 28 law?
A week of short video platform 30W exposure, small magic push helps physical businesses turn losses into profits
Mathematical analysis_ Notes_ Chapter 5: univariate differential calculus
⌈ 2022 ⌋ how to use webp gracefully in projects
Summary of monthly report | list of major events of moonbeam in June
入行数字IC验证后会做些什么?
Global and Chinese markets for carbon dioxide laser cutting heads 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets for airport baggage claim conveyors 2022-2028: technology, participants, trends, market size and share Research Report
uboot的作用和功能
Global and Chinese markets of stainless steel surgical suture 2022-2028: Research Report on technology, participants, trends, market size and share
The login box of unity hub becomes too narrow to log in
john爆破出現Using default input encoding: UTF-8 Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
Kubernetes three open interfaces first sight