Link to home
Start Free TrialLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

Limit host connections to a Switch port

Limit host connections to a Switch port

User generated imageI have the topology above.  I have configured the switch SW  interface e0/0 as shown below

CiscoSwitch(config)#interface e0/0
CiscoSwitch(config-if)#switchport port-security maximum 1
CiscoSwitch(config-if)#

Open in new window


however when I clear the Mac address table  of the Switch, then shutdown the interfaces of H1 and H2 , then bring them back up, the switch will show both Mac addresses of H1 and H2 on the Switch , it should allow just one.

CiscoSwitch#show mac address-table 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    aabb.cc00.0100    DYNAMIC     Et0/0
   1    aabb.cc00.0200    DYNAMIC     Et0/0
Total Mac Addresses for this criterion: 2
CiscoSwitch#

Open in new window



Thank you


----OK now after a while  I can see one of the Mac addresses disappearing from the table,  then it will show up again on the table,  then the other Mac address will disappear from the table for a while then will show up again.
I guess this happens after aging time .
however the issue of having 2 Mac addresses on the table is still not resolved
Avatar of Predrag Jovic
Predrag Jovic
Flag of Poland image

Port security configuration will become active once command switchport port-security is issued:
CiscoSwitch(config)#interface e0/0
CiscoSwitch(config-if)#switchport port-security maximum 1
CiscoSwitch(config-if)#switchport port-security
Avatar of jskfan

ASKER

I followed that configuration , but I get this message :
Command rejected: Ethernet0/0 is a dynamic port.


after I entered this :CiscoSwitch(config-if)#switchport port-security
ASKER CERTIFIED SOLUTION
Avatar of Predrag Jovic
Predrag Jovic
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jskfan

ASKER

This worked.... Thank you

interface eth0/0
 switchport mode access
 switchport port-security maximum 1
switchport port-security
You're welcome.