Static MAC Address Table Entry

Hi Laz,

One thing i want to know suppose we have single router through which 3 switches connected directly to the router with different port on router so i want to know that switches learn the mac address and would learned mac-address be the same or different b/c i want to know that mac address is specific to the port or device(router or switch) , same thing on router ?

Hello Pradyumna

A router has a different MAC address for each of its ports. In other words, you can consider each port of the router to be like a host or a PC. Switch1 would learn the MAC address of port1 of the router that is connected to it, Switch2, would learn the MAC address of port2 of the router, and Switch3 would learn the MAC address of port3 of the router.

So the MAC address of each port is indeed different.

I hope this has been helpful!

Laz

I am having a weird situation. Running some test lab in EVE on the Below SW version.
I tried to add Static Entries and It is giving the option to add the same MAC on multiple. Ports?

Switch#
Switch#sh ver
Cisco IOS Software, Solaris Software (I86BI_LINUXL2-ADVENTERPRISEK9-M), Experimental Version 15.1(20140814:053243) [mmen 112]
Copyright (c) 1986-2014 by Cisco Systems, Inc.
Compiled Thu 14-Aug-14 08:28 by mmen

ROM: Bootstrap program is Linux

Switch uptime is 1 day, 1 hour, 46 minutes
System returned to ROM by reload at 0
System image file is "unix:/opt/unetlab/addons/iol/bin/L2-ADVENTERPRISE-M-15.1-20140814.bin"
Last reload reason: Unknown reason
As shown in the image, I am able to add two Ports with static MAC Address Entry?
I used the below command
Switch(config)#mac add stat 4444.4444.4444 vlan 1 int e0/0 e0/1

Can you explain what does this command does how will switch behave ?

S

Hello Haris

After doing a bit of research I have found that some platforms do allow MAC addresses to be statically assigned to multiple ports while others do not. But no switch allows a MAC address to be dynamically assigned to multiple ports.

There are situations in which you do require this such as when you use some load balancing techniques used by some servers such as Microsoft’s Network Load Balancing. in this feature, the MAC address of the NICs used by the server are actually changed so they are the same for multiple NICs, thus requiring a switch to accept them.

I hope this has been helpful!

Laz

Hi,
What is the use case for static mac address

Thanks

Hello Sims

Assigning a static MAC address on a switch can be a quick and easy way of allowing a particular host to use only one specific port of a switch. If you configure a static MAC address, then that host will only be able to use the port configured in that static entry.

This can quickly be done for two or three devices, but as the number of devices grows, it becomes more difficult to manage. In such a case, port security should be used instead.

I hope this has been helpful!

Laz

“Note: You can also put multicast MACs into CAM assuming IGMP snooping is disabled for that VLAN. Can be used to control where multicast is flooded (useful to control where link-local messages go, since IGMP snooping does not control these) or simply to drop it.”

Can this work coexisting with IGMP Snooping enabled? @ReneMolenaar @lagapidis

Hello Trenton

Adding a static multicast MAC address table entry manually will not be affected by IGMP snooping, as the static entry will remain in the table regardless of IGMP messages. However, you should be cautious when manually configuring multicast MAC address table entries, as it can interfere with the automatic operation of IGMP snooping and may cause unexpected results.

Unless there is a very good reason for it, and unless it’s done very carefully, it’s usually best practice to allow IGMP snooping to optimize multicast traffic forwarding in the network.

I hope this has been helpful!

Laz