Switch port Security Configuration experiment (Mac dynamic binding and static binding)

Source: Internet
Author: User


1, according to the topology completed, you can configure the address of the PC is 192.168.1.1-192.168.1.4
2. Configure the Secure port
Switch>enable
Switch#conf T
Switch (config) #interface F0/1
Switch (config-if) #switchport mode access Configure access Mode
Switch (config-if) #switchport port-security turn on the secure port
Switch (config-if) # do show Port Inter F0/1 View security Port information
Port Security: Enabled has been opened
Port status:secure-up
Violation Mode:shutdown
Aging time:0 mins
Aging Type:absolute
Securestatic Address aging:disabled
Maximum MAC addresses:1
Total MAC addresses:0
Configured MAC addresses:0
Sticky MAC addresses:0
Last Source address:vlan:0000.0000.0000:0
Security violation count:0

Switch (config-if) #switchport port-security maximum 2

Set the maximum number of Access MAC addresses to 2
Switch (config-if) #switchport port-security mac-address Sticky
Automatically get access to your device's Mac
Switch (config-if) #switchport port-security violation?
How to handle violations
Protect Security violation Protect mode
Protection-Discard data, no alarms
Restrict Security violation restrict mode
Boycott – Discard data, send alarms
Shutdown Security violation shutdown mode
Off-discard data, send alarms and close links
Switch (config-if) #switchport port-security violation protect
Select the violation method to protect
Switch (config-if) #end
switch#
Switch#show port-security Address View table of addresses
Secure Mac Address Table

Vlan Mac Address Type Ports Remaining Age
(mins)

1 0002.4aa6. d46d Securesticky FASTETHERNET0/1-
1 0010.1108.d197 securesticky FASTETHERNET0/1-

Total Addresses in System (excluding one Mac per port): 1
Max Addresses limit in System (excluding one Mac per port): 1024

Verification experiment, two first-access host can access PC3, third cannot access PC3 instructions successfully.

Another mode of verifying a secure port-static binding

Switch#conf T
Switch (config) #
Switch (config) #interface F0/1
Switch (config-if) #no switchport port-security mac-address sticky Delete dynamic bindings
Switch (config-if) #do Show Port add
Secure Mac Address Table

Vlan Mac Address Type Ports Remaining Age

1 0002.4aa6. d46d Securesticky FASTETHERNET0/1-
Dynamically bound addresses are still in the
1 0010.1108.d197 securesticky FASTETHERNET0/1-

Total Addresses in System (excluding one Mac per port): 1
Max Addresses limit in System (excluding one Mac per port): 1024
Switch (config-if) #end
switch#Clear port-security sticky
Clear dynamic bound addresses
Switch#show port-security Address
Secure Mac Address Table

Vlan Mac Address Type Ports Remaining Age
(mins)

Total Addresses in System (excluding one Mac per port): 0
Max Addresses limit in System (excluding one Mac per port): 1024

Switch#conf T
Switch (config) #interface F0/1
Switch (config-if) #switchport port-security mac-address 00d0. ff76.14ed manual PC-bound Mac
Switch (config-if) #switchport port-security mac-address 0010.1108.d197

The MAC address of the PC needs to be obtained by yourself at the command prompt of the PC, get method: Ipconfig/all

To verify the test, the statically bound PC can access the PC3, and the other cannot access the PC3 to prove the success of the test.

Switch port Security Configuration experiment (Mac dynamic binding and static binding)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.