Consider a computer with Mac address (physical address) A, joins a network, and then it changes its Mac address to B. So, the network is able to recognise such a computer?
It sounds like what you are asking for, is in Cisco terms called Port Security. Port Security allows you to configure the network to restrict access to the port based on the MAC address. There are a few different variations of the feature
- Prevent more than X number of MAC addresses from being learned/used on the port
- Prevent any MAC address other than the one(s) statically configured from being learned/used on the port
- Allow X number of MAC addresses to be learned/used and then lock the port down to only those that are used. This is referred to as the "Sticky" feature
The difference between the 1st and 3rd options listed above are that in the 1st option, only X number of MACs can be used on the port at one time, but it could vary WHICH devices are in use. So if you say one MAC at a time, then you could connect one PC, and then later connect a different PC and it would be fine.
With the 3rd option, if you say one MAC and the sticky option, you are saying you want the network to learn the MAC that connects to the port and ONLY that device can use that port.
int gi1/0/1 switchport port-security max 2 switchport port-security mac-address sticky switchport port-security switchport mode access switchport access vlan 30
The above would be a basic example of the feature. This would say the port can learn 2 MAC addresses dynamically and then using the sticky feature, would lock the port to only allow those specific MAC addresses to be used. If the devices changed in the future, the port would have to be adjusted. Note that you need to use the
switchport port-security command by itself on the port to turn the feature ON. Otherwise, you would just be listing options that are not used.