Layer 2 and Layer 3 Switches

Unanswered Question
May 16th, 2007
User Badges:

how many MAC address does both the switch has for their ports?

let say if i will have 24 port switch which is layer 2 then how many MAC address does it has? and how many MAC address for the same portdensity swich will have if its layer 3 switch?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.8 (4 ratings)
royalblues Wed, 05/16/2007 - 12:47
User Badges:
  • Green, 3000 points or more

The number of mac address support would more a question of the platform rather than they are L2 or L3

A 6500 switch may be operating as a layer 2 but still have more mac-address support per port than a 3560 which is acting like a L3.

One thing to remember under a loop free environment, you would see only one macaddress on an access-port. Multiple mac-addresses will be seen only on the trunk ports and uplinks

HTH, rate if it does


dangal.43 Wed, 05/16/2007 - 12:56
User Badges:

see normally ethernet port has one mac address, so if i will have layer 2 switch with 24 port then all 24 port have different mac address?

and what about the layer3 switch, so when we issue the no switchport command on switch interface then it will become layer 3 port then it need MAC address so if i will use all 24 port as layer 3 port then each port should have unique MAC address righ?

so i am little bit confuse about MAC addreess for the port?

mikearama Wed, 05/16/2007 - 13:08
User Badges:

I think you've got it right...

Every port on every switch has a mac address. Do a 'sh int' on any switch and you'll see a physical address.

As a layer 2 switch, the mac address really means little. Turn on ip routing (for switches with this capability) and now the mac is more important.

So, to summarize, a layer 3 switch will have a MAC address for the switch as a whole, plus have a mac for each and every port it has.



mohammedmahmoud Wed, 05/16/2007 - 13:19
User Badges:
  • Green, 3000 points or more


As far as i can remember, the per VLAN BID was only Bridge Priority + MAC address --> The problem was that most of the platforms supported only 64 or 1024 MAC addresses per switch --> can only address 64 VLAN BIDs (not the whole 4096 VLANs if using dot1q), and thus more MAC addresses were added to the switch to extend the support of more VLANs.

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

dangal.43 Wed, 05/16/2007 - 13:27
User Badges:

mohmmed you didnt get my issue. I am asking about the number of MAC address with respect to the ports in layer2 and layer 3 switches.

mohammedmahmoud Wed, 05/16/2007 - 13:33
User Badges:
  • Green, 3000 points or more


I guess that i've answered in a misleading way, the above post of mine concerns the Layer 2 switches (thus a layer 2 switch needs many MACs), and as for the layer 3 switch each port has 1 MAC address assigned to it (as if a router Ethernet interface).

Sorry for any inconvenience :)


Mohammed Mahmoud.

dangal.43 Wed, 05/16/2007 - 13:34
User Badges:

it means for layer 3 switch each port will have unique MAC address and layer 2 switch will not.

mikearama Thu, 05/17/2007 - 08:16
User Badges:

That is incorrect, dangal... even layer 2 switches have UNIQUE mac addresses on every port.

You really need to do a ' sh int ' on a layer 2 switch, cause then you will see a unique physical address on every port.

They just don't matter on a layer 2 switch.

MUHAMMAD SHAHEEN Thu, 05/17/2007 - 14:45
User Badges:
  • Silver, 250 points or more


In fact, wether its a L2 switch or L3 switch, every SVI (Vlan Interface) as well as every physical interface has its own unique mac address.

just type #show interface

and it will show details.




This Discussion