Jump to content


Does a Switch have one MAC Address or many MAC Addresses?


  • Please log in to reply
18 replies to this topic

#1 DaniG

DaniG

    Member

  • Members
  • PipPip
  • 80 posts

Posted 12 June 2009 - 07:21 PM

I know that every ethernet port on a router has different MAC address.
What about a switch? Does a switch have one identical MAC address to all of its ethernet ports or every ethernet port in a switch has different MAC Address?

Thanks...
  • 0

#2 martinlo

martinlo

    V.I.P. Member

  • Global Moderators
  • PipPipPipPipPip
  • 2684 posts
  • Gender:Male
  • Location:Land Of 10,000 Lakes

Posted 12 June 2009 - 07:26 PM

QUOTE (DaniG @ Jun 12 2009, 03:21 AM) <{POST_SNAPBACK}>
I know that every ethernet port on a router has different MAC address.
What about a switch? Does a switch have one identical MAC address to all of its ethernet ports or every ethernet port in a switch has different MAC Address?

Thanks...

One per interface, per vlan, there maybe other functions that require MACs.
  • 0

#3 DaniG

DaniG

    Member

  • Members
  • PipPip
  • 80 posts

Posted 12 June 2009 - 07:30 PM

<!--quoteo(post=843136:date=Jun 12 2009, 08:26 PM:name=martinlo)--><div class='quotetop'>QUOTE (martinlo @ Jun 12 2009, 08:26 PM) <a href="index.php?act=findpost&pid=843136"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->One per interface, per vlan, there maybe other functions that require MACs.<!--QuoteEnd--></div><!--QuoteEEnd-->

Martinlo, When I learned Spanning Tree Protocol, I saw that each Switch is identified by only one MAC Address, How is it possible?

Oh, The MAC address which is shown near every switch in STP questions is not its only one. This MAC Address is the lowest MAC it has of many, right?

Edited by Sunfish, 30 September 2009 - 03:30 AM.

  • 0

#4 drpain2006

drpain2006

    Advanced Member

  • Members
  • PipPipPip
  • 156 posts
  • Gender:Male
  • Location:Germany

Posted 12 June 2009 - 07:58 PM

The "only" mac adresse you refer is the respective adress of the port which is connected to the STP topology. So if you would put the cable into another port into the switch it would have another MAC related to STP.
Maybe its easier to understand when we talking about designated and blocked ports. In a failover trunk, or lets say an alternate link you have a designated Port at one end of the link and a blocked port at the other. How the STP decides which port used as DP and which as blocked. Answer, its doing the same as Root election, the respective ports are compared and the lower MAC adress wins and becomes the DP.

So in a STP topology you have several ports on switch that are "doing" STP and each single port has an own MAC adress that is considered when an election takes place.


  • 0

#5 drpain2006

drpain2006

    Advanced Member

  • Members
  • PipPipPip
  • 156 posts
  • Gender:Male
  • Location:Germany

Posted 12 June 2009 - 08:01 PM

Found this good picture at wiki. It should help.

Attached Files


  • 0

#6 martinlo

martinlo

    V.I.P. Member

  • Global Moderators
  • PipPipPipPipPip
  • 2684 posts
  • Gender:Male
  • Location:Land Of 10,000 Lakes

Posted 12 June 2009 - 08:46 PM

<!--quoteo(post=843137:date=Jun 12 2009, 03:30 AM:name=DaniG)--><div class='quotetop'>QUOTE (DaniG @ Jun 12 2009, 03:30 AM) <a href="index.php?act=findpost&pid=843137"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Martinlo, When I learned Spanning Tree Protocol, I saw that each Switch is identified by only one MAC Address, How is it possible?

Oh, The MAC address which is shown near every switch in STP questions is not its only one. This MAC Address is the lowest MAC it has of many, right?<!--QuoteEnd--></div><!--QuoteEEnd-->
Spanning Tree Protocol per Vlan 1 will use Vlan 1 MAC address. Vlan 1 is created by default, Right? There U Go, that is your switch MAC address used for STP.

are u study for CCNA?

Edited by Sunfish, 30 September 2009 - 03:30 AM.

  • 0

#7 bella_

bella_

    Member

  • Members
  • PipPip
  • 64 posts
  • Gender:Male
  • Location:RO

Posted 12 June 2009 - 09:48 PM

I hope this will help...
Attached File  mac.JPG   105.13KB   143 downloads

Anyway I don't understand what was you Q. You don't understand Root Bridge electing process or what?

Edited by bella_, 12 June 2009 - 09:50 PM.

  • 0

#8 d_esTin_y

d_esTin_y

    Member

  • Members
  • PipPip
  • 137 posts

Posted 13 June 2009 - 08:31 AM

hmmm I have a question


why does switch need a mac address? after all it's going to build the mac table from the address it learns from others so whats the need for the MAC address?

does not make any sence wink.gif
  • 0

#9 bella_

bella_

    Member

  • Members
  • PipPip
  • 64 posts
  • Gender:Male
  • Location:RO

Posted 13 June 2009 - 08:38 AM

When is connected with another L2 device frames originated by SW(BPDU,LLDP,etc) has to have a source MAC, right?
Am I wrong? blink.gif
  • 0

#10 d_esTin_y

d_esTin_y

    Member

  • Members
  • PipPip
  • 137 posts

Posted 13 June 2009 - 08:45 AM

QUOTE (bella_ @ Jun 12 2009, 11:38 PM) <{POST_SNAPBACK}>
When is connected with another L2 device frames originated by SW(BPDU,LLDP,etc) has to have a source MAC, right?
Am I wrong? blink.gif



dont think complicated please ... wink.gif

assume 2 pcs (PC1, PC2) are connected to the port f0/1 and f0/2 of SW01 and SW01 is connected to SW02 to it's port f0/8.

so in this case the SW02 will have 2 mac address right... from PC1 & PC2.

so then why does a switch needs to have a mac?
  • 0

#11 DarkFiber

DarkFiber

    Cisco Expert

  • Members
  • PipPipPipPip
  • 927 posts
  • Gender:Male
  • Location:Cairo-Egypt
  • Interests:Networks

Posted 13 June 2009 - 09:11 AM



For the new model switches

They got 1 MAC on teh Board, while assigning virtual MACs to all the switch interfaces.

to check the Real mac, do sh int vlan 1

And for fun, do cmd sh interface

and check the MAC address of each interface, you will find them all in ascending order from the Physical switch MAC.


  • 0

#12 Andy_Capp

Andy_Capp

    V.I.P. Member

  • Veterans
  • PipPipPipPipPip
  • 1488 posts
  • Gender:Male
  • Location:Athens
  • Interests:Moderator, Tech Support forum

    Photography

    Travel

    Music from Classical to Classics & Rock depending upon my mood

    Computing, Several PC's & Laptops.
    OS's: Win7 64bit, XP SP3, Win2K SP4, Win Me, Media Centre,
    Linux: Slax, Ubuntu, DSL amongst others

    Electronics Equipment Repair (Career & Hobby)

Posted 13 June 2009 - 06:48 PM

in response to first question .. yes all switches have a MAC address on EVERY Port

with regards question "why does switch need a mac address?"

think about it .. the switch creates its own MAC Table to be able to know where it has found routes and hosts

a switch by nature only sends out data to the port where the destination is to be found except when searching for a host (in which case it broadcasts)

Every hardware port is designated a unique MAC Address, whether it's on a complex multiport device or a simple NIC.
  • 0

#13 azalis

azalis

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 22 June 2009 - 03:39 PM

QUOTE (Andy_Capp @ Jun 13 2009, 06:48 PM) <{POST_SNAPBACK}>
in response to first question .. yes all switches have a MAC address on EVERY Port

with regards question "why does switch need a mac address?"

think about it .. the switch creates its own MAC Table to be able to know where it has found routes and hosts

a switch by nature only sends out data to the port where the destination is to be found except when searching for a host (in which case it broadcasts)

Every hardware port is designated a unique MAC Address, whether it's on a complex multiport device or a simple NIC.

yup i'm agreed...every Ethernet or fast ethernet on the switch has its own Mac Address...
why does the switch needs a MAC address?...cause in order to communicate it's frame it has to know where the frame needs to be delivered and who was the deliverer...i hope that's right..hahahaha...
  • 1

#14 help

help

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 02 July 2009 - 04:19 PM

So, if 2 switches are connected to one another, with their own respective hosts, so,when the switch is building up its mac table, does it consider the mac addresses of the other switch or its own switch (ie mac addresses of every single switch ports)? If no, then why not and if yes, what's the need? I mean after all, they may just be connected to each other with just a single cable...I am confused...
  • 0

#15 ManishBehal

ManishBehal

    Super Member

  • Members
  • PipPipPipPip
  • 989 posts
  • Gender:Male

Posted 02 July 2009 - 04:26 PM

There is a MAC on every interface. Sh inter fa0/1 | i bia should show you this, I think that's the command. Also, there is a base MAC address. If you do a sho ver you can see it there.

HTH
  • 0

#16 talent pk

talent pk

    Cisco Newbie

  • Technical Experts
  • PipPipPipPipPip
  • 4028 posts
  • Gender:Male
  • Location:Pakistan
  • Interests:Oracle

Posted 02 July 2009 - 05:44 PM

There are ethernet MAC address on each PORT

FE-Module manufacturers usually take a board with 8 or 12 or 24 or 48 ports and assign them Mac addresses in the same series with usually last bit varying

so if my mac address of one port is 001d.70cd.536a and i have four port FE-Module

i would have

on FE/ 001d.70cd.536b
on FE/ 001d.70cd.536c
on FE/ 001d.70cd.536e

  • 1

#17 WoOkieE

WoOkieE

    Member

  • Members
  • PipPip
  • 100 posts
  • Gender:Male
  • Location:Cairo

Posted 24 July 2009 - 06:08 PM

QUOTE (DarkFiber @ Jun 13 2009, 02:11 AM) <{POST_SNAPBACK}>
For the new model switches

They got 1 MAC on teh Board, while assigning virtual MACs to all the switch interfaces.

to check the Real mac, do sh int vlan 1

And for fun, do cmd sh interface

and check the MAC address of each interface, you will find them all in ascending order from the Physical switch MAC.


Hi Dark Fiber wink.gif

Assume we have 2 Switches connected with 2 cables ( so we have a loop ) , and assume both of the has same Priority , and all ports are in VLAN 1 .
What will be each switch MAC Address keeping in mind we have in that case ( 2 MAC Addresses contributing in the PVSTP from Each Switch )

Glad to see you here &
Thanks for your feedback

Shinnawy wink.gif
  • 0

#18 mahdi.r

mahdi.r

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 02 January 2011 - 11:06 PM

So, if 2 switches are connected to one another, with their own respective hosts, so,when the switch is building up its mac table, does it consider the mac addresses of the other switch or its own switch (ie mac addresses of every single switch ports)? If no, then why not and if yes, what's the need? I mean after all, they may just be connected to each other with just a single cable...I am confused...


hi..
yes, i have the same question.
somebody help us ...plz !
answer that why sh mac-address-table doesn't show all of macs? -just show pc macs?-
:(
  • 0

#19 flashsplash

flashsplash

    Advanced Member

  • Members
  • PipPipPip
  • 241 posts
  • Gender:Male
  • Location:The Netherlands

Posted 14 January 2011 - 11:50 PM

It does not shows pc macs but all the macs it has learned
  • 0





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users