Port security function allows the packets to enter the switch port by the source MAC address, source MAC+IP address or source IP address. You can control the packets by setting the specific MAC address statically, static IP+MAC binding or IP binding, or dynamically learning limited MAC addresses. The port with port security enabled is named as secure port. Only the packets with the source MAC address in the port security address table, or IP+MAC binding configured, or IP binding configured, or the learned MAC address,can join the switch communication, while other packets are dropped. Requirements 1. You can only connect PC1 (IP: 192.168.1.1,MAC: 0021.CCCF.6F70) to port F0/1 . If you connect PC1 to other ports, PC1 cannot access the network. If other PCs connect port F0/1 , they cannot access the network neither. 2. Port F0/2 can only foward traffic of PC (IP=192.168.1.2, MAC=any) to the network. Network Topology Configuration Tips Enable Port security on port F0/1 and F0/2, then set port security maximun value to 1. Configuration Steps Configuring Core switch:
Ruijie(config-if-VLAN 10)#ip address 192.168.1.254 255.255.255.0
Ruijie#wr Configuring Access switch:
Ruijie#configure terminal Ruijie(config)#interface fastEthernet 0/1 Ruijie(config-if-FastEthernet 0/1)#switchport port-security binding 0021.CCCF.6F70 vlan 10 192.168.1.1 Ruijie(config-if-FastEthernet 0/1)#switchport port-security ------>enable Port Security Ruijie(config-if-FastEthernet 0/1)#exit 2.Enable port security on interface F0/2 to allow the PC (IP = 192.168.1.1 VLAN=10, MAC=any) to access network. Ruijie(config)#interfac fastEthernet 0/2 Ruijie(config-if-FastEthernet 0/2)# switchport port-security binding 192.168.1.2 ------>binding ip address 192.168.1.2 to interface f0/2 Ruijie(config-if-FastEthernet 0/2)#switchport port-security ------>enable port security 3.Save Configuration Ruijie(config-if-FastEthernet 0/2)#end Ruijie#write ------>confirm and save Verification Display Port security table |
This site contains user submitted content, comments and opinions and is for informational purposes only. Ruijie may provide or recommend responses as a possible solution based on the information provided; every potential issue may involve several factors not detailed in the conversations captured in an electronic forum and Ruijie can therefore provide no guarantee as to the efficacy of any proposed solutions on the community forums. Ruijie disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Ruijie Community Terms of Use.
More ways to get help: Visit Support Videos, call us via Service Hotline, Facebook or Live Chat.
©2000-2023 Ruijie Networks Co,Ltd