In general the Cisco IOS switches learn the MAC address of the connected devices dynamically by looking at the SRC MAC address of the frame incoming on any of its ports. This dynamic MAC learning is prone to spoofing attacks hence we can manually add Static MAC entries on the switch to overrule the dynamic MAC.We can define where the MAC is located or can make the switch drop the traffic.
Let us look at the simple topology below where a R1 generates some traffic towards the switch SW1.
We will do simple ping from R1 to SW1 and see the MAC table on SW1 as below:
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 9.9.12.2, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 1/3/5 ms Mac Address Table ——————————————- Vlan Mac Address Type Ports —- ———– ——– —– 1 aabb.cc00.0100 DYNAMIC Et0/0 Total Mac Addresses for this criterion: 1 We see in the above output that we have learnt the MAC address dynamically on E0/0 port of switch SW1. Now let us change the entry to static as below and then check the CAM table again: Now we see the entry has changed to Static now: Mac Address Table ——————————————- Vlan Mac Address Type Ports —- ———– ——– —– 1 aabb.cc00.0100 STATIC Et0/0 Total Mac Addresses for this criterion: 1 I am here to share my knowledge and experience in the field of networking with the goal being – “The more you share, the more you learn.” I am a biotechnologist by qualification and a Network Enthusiast by interest. I developed interest in networking being in the company of a passionate Network Professional, my husband. I am a strong believer of the fact that “learning is a constant process of discovering yourself.”ABOUT THE AUTHOR
– Rashmi Bhardwaj (Author/Editor)