No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


Configuration Guide - Security

CloudEngine 8800, 7800, 6800, and 5800 V200R005C10

This document describes the configurations of Security, including ACL, local attack defense, MFF, attack defense, traffic suppression and storm control, ARP security, Port security, DHCP snooping, ND snooping, PPPoE+, IPSG, SAVI, separating the management plane from the service plane, security risks.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring Port Security

Example for Configuring Port Security

Networking Requirements

As shown in Figure 11-3, a company wants to prevent computers of non-employees from accessing the intranet of the company to protect information security. To achieve this goal, the company needs to enable port security on the interface connected to computers of employees and set the maximum number of MAC addresses learned by the interface to be the same as the number of trusted computers.

Figure 11-3 Network diagram of port security

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure a VLAN to implement Layer 2 forwarding.

  2. Configure port security to prevent the learned MAC addresses from aging.


  1. Create a VLAN and set the link type of the interface.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch
    [*HUAWEI] commit
    [~Switch] vlan 10
    [*Switch-vlan10] quit
    [*Switch] interface 10ge 1/0/1
    [*Switch-10GE1/0/1] port link-type trunk
    [*Switch-10GE1/0/1] port trunk allow-pass vlan 10
    [*Switch-10GE1/0/1] commit

  2. Configure port security.

    # Enable port security.

    [~Switch-10GE1/0/1] port-security enable

    # Enable the sticky MAC function.

    [*Switch-10GE1/0/1] port-security mac-address sticky

    # Configure the security protection action.

    [*Switch-10GE1/0/1] port-security protect-action protect

    # Set the limit on the number of MAC addresses that can be learned on the interface.

    [*Switch-10GE1/0/1] port-security maximum 4
    [*Switch-10GE1/0/1] quit
    [*Switch] commit

    To enable the port security function on other interfaces, repeat the preceding steps.

    Assume that MAC addresses of four devices (three Servers and one access switch) connected to the Switch have been learned. The maximum number of MAC addresses to be learned is 4.

  3. Verify the configuration.

    If User1 is replaced by another device, the device cannot access the intranet of the company.

Configuration Files

Switch configuration file

sysname Switch
vlan batch 10
interface 10GE1/0/1
 port link-type trunk
 port trunk allow-pass vlan 10
 port-security enable
 port-security protect-action protect
 port-security maximum 4
 port-security mac-address sticky
Updated: 2019-04-20

Document ID: EDOC1100074765

Views: 29217

Downloads: 97

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next