Command
Function
Switch(config-if-GigabitEthernet-0/3)#port-secu
rity enable default [deny|permit]
Enable the port security functions of the
interface:Deny:Unbound port refused
Permit:Unbound port permit
Switch(config-if-GigabitEthernet-0/3)#
port-security disable
Close the port security functions of the
interface.
Command
Function
Switch(config-if-GigabitEthernet-0/1)#
port-security add ip-address
X.X.X.X
mac-address
XXXX.XXXX.XXXX
Description
xxxx
In configuration mode, the port to allow
access to the host's IP address and MAC and
port.
Safe way of address binding
None
Dynamic MAC addresses learning
Enable
12.3.3. Configure port security
In interface configuration mode, please configure port security and exception processing mode uses
the following commands:
The following example illustrates the enable port security function interface on
gigabitethernet0/3.Binding method for IPMAC
Switch# configure terminal
Enter configuration commands, one per line. End with CTRL+Z.
Switch(config-if-GigabitEthernet-0/3)#
port-security add ip-address
1.1.1.1 mac-address
0000.0000.0001 Description xxxx
12.3.4. configure Security address of security port .
In the port mode, please use the following command added security for safe port address:
In the port mode, use the command
port-security move ip-address
X.X.X.X
mac-address
XXXX.XXXX.XXXX
to delete the address table configuration.
The following example shows how to configure port security binding and access mode
Switch# configure terminal