Port Security Technology BackgroundThe enterprise requires that each interface on the access layer switch that connects to the terminal device only allows one PC to access the network (limiting the number of MAC address accesses). If an employee attempts to cascade a small switch or hub under a certain interface to expand the Internet access interface, this behavior should be discovered or prohibited, as shown in the following figure: Some companies may also require that only data frames sent by terminals with trusted MAC addresses are allowed to be forwarded by the switch to the upper network, and employees cannot change their positions (change the access port of the switch) without permission, as shown in the following figure: These problems can be solved by the switch's port security feature. Port Security OverviewBy deploying port security on specific interfaces of a switch, you can limit the number of MAC addresses learned by the interface and configure penalty measures when the limit is exceeded. Port security converts the dynamic MAC addresses learned by the interface into secure MAC addresses (including secure dynamic MAC, secure static MAC, and sticky MAC) to prevent illegal users from communicating with the switch through the interface, thereby enhancing the security of the device. Port Security Technology PrinciplesSecure MAC addresses are usually used in conjunction with security protection actions. Common security protection actions include:
Port security technology applicationIn a network that requires high security for access users, you can configure the port security function and the limit on the number of port security dynamic MAC learning. In this case, the MAC addresses learned by the interface will be converted into secure MAC addresses. When the maximum number of MAC addresses learned by the interface reaches the upper limit, no new MAC addresses will be learned, and only these MAC addresses are allowed to communicate with the switch. In addition, when the number of secure MAC addresses on the interface reaches the limit, if a message with a non-existent source MAC address is received, regardless of whether the destination MAC address exists, the switch will consider that there is an attack by an illegal user, and will protect the interface according to the configured action. This can prevent other untrusted users from communicating with the switch through this interface, thereby improving the security of the switch and the network. After configuring the port security function, the MAC addresses learned by the interface will be converted to secure MAC addresses. When the maximum number of MAC addresses learned by the interface reaches the upper limit, no new MAC addresses will be learned, and only these MAC addresses are allowed to communicate with the switch. If the access user changes, you can refresh the MAC address table by restarting the device or configuring the secure MAC aging time. For relatively stable access users, if you do not want subsequent changes, you can further enable the Sticky MAC function of the interface, so that after saving the configuration, the MAC address table entries will not be refreshed or lost. Port Security Configuration Commands(1) Enable port security: By default, port security is disabled. (2) Configure the port security dynamic MAC learning limit: By default, the maximum number of secure MAC addresses that an interface can learn is 1. (3) (Optional) Manually configure a secure static MAC address entry: (4) (Optional) Configure port security protection actions: By default, the port security action is restrict. When static MAC address flapping occurs, the interface will perform error down operations and issue an alarm:
(5) (Optional) Set the aging time for secure dynamic MAC addresses learned on an interface: By default, secure dynamic MAC addresses learned on an interface do not age. (6) Enable the Sticky MAC function on the interface By default, the sticky MAC function is disabled on an interface. (7) Set the maximum number of sticky MAC addresses that can be learned on an interface. After the sticky MAC function is enabled on an interface, the default limit on the number of MAC addresses that the interface can learn is 1. (8) (Optional) Manually configure a sticky-mac entry: Port Security Configuration ExampleSecure Dynamic MACConfiguration requirements:
The configuration of Switch1 is as follows: Configuration verification: Run the display mac-address security command to view the dynamic secure MAC table entries. Sticky MACConfiguration requirements:
The Switch configuration is as follows: Configuration verification Run the display mac-address sticky command to view the sticky MAC entries: |
>>: Wi-Fi 7 may be closer than you think
This article introduces how to use Python to impl...
China is making significant progress in expanding...
The energy of digital technologies represented by...
[[404039]] Preface As we all know, when there is ...
The development of 5G services has put forward hi...
Digital transformation is in full swing, and tech...
The World Cup has just passed, and the Chinese Su...
Everyone needs Wi-Fi at home, but for various rea...
Arthur C. Clarke, a famous British science fictio...
[51CTO.com original article] Recently, Huawei'...
China Mobile released its unaudited financial dat...
A new report from market research firm Dell'O...
Recently, Ericsson Consumer Lab released the &quo...
According to a new research report released by St...