Examples
The following example activates the port security database for the
specified VSAN, and automatically enables autolearning:
switch# config terminal
switch(config)# port-security activate vsan 1
The following example deactivates the port security database for the
specified VSAN, and automatically disables auto-learn:
switch# config terminal
switch(config)# no port-security activate vsan 1
The following example disables the auto-learn feature for the port
security database in VSAN 1:
switch# config terminal
switch(config)# port-security activate vsan 1 no-auto-learn
The following example enables auto-learning so the switch can learn
about any device that is allowed to access VSAN 1. These devices are logged in
the port security active database:
switch# config terminal
switch(config)# port-security auto-learn vsan 1
The following example disables auto-learning and stops the switch
from learning about new devices accessing the switch. Enforces the database
contents based on the devices learnt up to this point.
switch# config terminal
switch(config)# no port-security auto-learn vsan 1
The following example enters the port security database mode for the
specified VSAN:
switch# config terminal
switch(config)# port-security database vsan 1
switch(config-port-security)#
The following example configures any WWN to login through the
specified interfaces:
switch(config-port-security)# any-wwn interface fc1/1 - fc1/8
The following example configures the specified pWWN to only log in
through the specified fWWN.
switch(config-port-security)# pwwn 20:11:00:33:11:00:2a:4a fwwn 20:81:00:44:22:00:4a:9e
The following example deletes the specified pWWN configured in the
previous step:
switch(config-port-security)# no pwwn 20:11:00:33:11:00:2a:4a fwwn 20:81:00:44:22:00:4a:9e
The following example configures the specified pWWN to only log in
through the specified sWWN:
switch(config-port-security)# pwwn 20:11:00:33:11:00:2a:4a swwn 20:00:00:0c:85:90:3e:80
The following example deletes the specified pWWN configured in the
previous step:
switch(config-port-security)# no pwwn 20:11:00:33:11:00:2a:4a swwn 20:00:00:0c:85:90:3e:80
The following example configures the specified nWWN to log in through
the specified fWWN:
switch(config-port-security)# nwwn 26:33:22:00:55:05:3d:4c fwwn 20:81:00:44:22:00:4a:9e
The following example configures the specified pWWN to login through
any port on the local switch:
switch(config-port-security)# pwwn 20:11:33:11:00:2a:4a:66
The following example configures the specified sWWN to only login
through PortChannel 5:
switch(config-port-security)# swwn 20:01:33:11:00:2a:4a:66 interface port-channel 5
The following example configures any WWN to log in through the
specified interface:
switch(config-port-security)# any-wwn interface fc3/1
The following example deletes the wildcard configured in the previous
step:
switch(config-port-security)# no any-wwn interface fc2/1
The following example deletes the port security configuration
database from the specified VSAN:
switch# config terminal
switch(config)# no port-security database vsan 1
switch(config)#
The following example forces the VSAN 1 port security database to
activate despite conflicts:
switch(config)# port-security activate vsan 1 force