![SNR S2940-8G-v2 Configuration Manual Download Page 84](http://html1.mh-extra.com/html/snr/s2940-8g-v2/s2940-8g-v2_configuration-manual_1310630084.webp)
SNR S2940-8G-v2 Switch Configuration Guide
Port Security
Command
Explanation
Port mode
switchport port-security violation
{ protect | restrict | shutdown }
no switchport port-security viola-
tion
When exceeding the maximum number of the configured
MAC addresses, MAC address accessing the interface does
not belongs to this interface in MAC address table or a MAC
address is configured to several interfaces in same VLAN,
both of them will violate the security of the MAC address.
switchport port-security aging {
static | time <value> | type { ab-
solute | inactivity } }
Enable port-security aging entry of the interface, specify ag-
ing time or aging type.
no switchport port-security viola-
tion aging { static | time | type }
Admin mode
clear port-security { all | config-
ured | dynamic | sticky } [[ad-
dress <mac-addr> | interface
<interface-id>] [vlan <vlan-id> ]]
Clear the secure MAC entry of the interface.
show
port-security
[interface
<interface-id>] [address | vlan]
Show port-security configuration.
11.3
Example of Port Security
Network
1/0/1
Switch
HOST A
HOST B
Figure 11.1: Typical topology chart for port security
When the interface enabled Port security function, configure the maximum number of the se-
cure MAC addresses allowed by a interface to be 10, the interface allows 10 users to access the
internet at most. If it exceeds the maximum number, the new user cannot access the internet,
so that it not only limit the user's number but also access the internet safely. If configuring the
maximum number of the secure MAC addresses as 1, only HOST A or HOST B is able to access
the internet.
Configuration process:
#Configure the switch.
Switch(config)#interface Ethernet 1/0/1
Switch(config-if-ethernet1/0/1)#switchport port-security
84
Summary of Contents for S2940-8G-v2
Page 11: ...SNR S2940 8G v2 Switch Configuration Guide Part I Basic Management Configuration 11...
Page 46: ...SNR S2940 8G v2 Switch Configuration Guide Part II Port Configuration 46...
Page 123: ...SNR S2940 8G v2 Switch Configuration Guide Part III VLAN and MAC Table Configuration 123...
Page 164: ...SNR S2940 8G v2 Switch Configuration Guide Part IV MSTP Configuration 164...
Page 198: ...SNR S2940 8G v2 Switch Configuration Guide Part VI L3 Forward and ARP Configuration 198...
Page 218: ...SNR S2940 8G v2 Switch Configuration Guide Part VII DHCP Configuration 218...
Page 257: ...SNR S2940 8G v2 Switch Configuration Guide Part VIII Multicast Protocol 257...
Page 278: ...SNR S2940 8G v2 Switch Configuration Guide Part IX Security Function Configuration 278...
Page 376: ...SNR S2940 8G v2 Switch Configuration Guide Part X Reliability Configuration 376...
Page 395: ...SNR S2940 8G v2 Switch Configuration Guide Part XI Flow Monitor Configuration 395...
Page 403: ...SNR S2940 8G v2 Switch Configuration Guide Part XII Network Time Management Configuration 403...
Page 411: ...SNR S2940 8G v2 Switch Configuration Guide Part XIII Debugging and Diagnosis 411...