Ethernet Port Configuration Introduction 65
Network diagram
Figure14 Network diagram for port se curity configuration
Configuration procedure
Configure switch A as follows:
1Enter the system view.
<S5500> system-view
2Enable port security.
[S5500] port-security enable
3Enter Ethernet1/0/1 port view.
[S5500] interface Ethernet1/0/1
4Adopt MAC address authentication mode on the port.
[S5500-Ethernet1/0/1] port-security port-mode mac-authentication
5Set the maximum number of MAC addresses allowed to access the port to 80.
[S5500-Ethernet1/0/1] port-security max-mac-count 80
6Set the packet transmission mode of the NTK feature on the port to ntkonly.
[S5500-Ethernet1/0/1] port-security ntk-mode ntkonly
7Set the action mode of the Intrusion Protection feature on the port to disableport.
[S5500-Ethernet1/0/1] port-security intrusion-mode disableport
8Return to the system view.
[S5500-Ethernet1/0/1] quit
9Enable the sending of intrusion packet discovery trap messages.
[S5500] port-security trap intrusion
10 Bind the MAC and IP addresses of PC1 to Ethernet1/0/1 port.
[S5500] am user-bind mac-address 00e0-fc00-5600 ip-address 10.153.1.1
interface Ethernet1/0/1
Copying Port Configuration to Other Ports
To keep the configuration of other ports consistent with a specified port, you can
copy the configuration of that specified port to other ports. The configuration may
include: STP setting, QoS setting, VLAN setting, port setting, and LACP setting. The
STP setting includes STP enabling/disabling, link attribute (point-to-point or not), STP
priority, path cost, max transmission speed, loop protection, root protection, edge
port or not. The QoS setting includes traffic limiting, priority marking, default 802.1p
priority, bandwidth assurance, congestion avoidance, traffic redirection, traffic
Switch A Switch B
GigabitEthernet1/0/1
PC1 PC2
IP Address: 10.153.1.1
MAC Address: 00e0-fc00-3900
PC1 PC2
Switch A Switch B
PC1 PC2
IP Address: 10.153.1.1
MAC Address: 00e0-fc00-3900
Switch A Switch B
PC1 PC2
IP Address: 10.153.1.1
MAC Address: 00e0-fc00-3900
PC1 PC2
Switch A Switch B
GigabitEthernet1/0/1
PC1 PC2
IP Address: 10.153.1.1
MAC Address: 00e0-fc00-3900
Switch A Switch B
GigabitEthernet1/0/1
PC1 PC2
IP Address: 10.153.1.1
MAC Address: 00e0-fc00-3900
PC1 PC2
Switch A Switch B
PC1 PC2
IP Address: 10.153.1.1
MAC Address: 00e0-fc00-3900
Switch A Switch B
PC1 PC2
IP Address: 10.153.1.1
MAC Address: 00e0-fc00-3900
PC1 PC2