cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
584
Views
0
Helpful
4
Replies

MAC's on Switches

joeadiutori
Level 1
Level 1

Hi all,

Does each port on a switch have it's own MAC address?  I would think yes.  However, it seems like the MAC address rarely comes into play.  And here is my reasoning....

Lets say a PC connects to port 3 on a switch.  Is the MAC of port 3 in the PC's ARP table?  I would think not, because switch port 3 is typically not configured with an IP address (although it could be), and therefore there is no need to resolve an IP to a MAC.

So if the PC is sending a packet to a remote host, what MAC is in the header of the frame?  My guess it's the MAC of the default GW (presumably the ethernet port on the router).  Is that right?

So it seems like switches have MAC's but they never really get used.  Is that right?  And I guess that switches don't do any framing at all.  They just filter/forward like the book says.  I think I just answered my question.  Does that all sound about right?

Sorry to ramble on, just trying to get down to the nitty gritty.

Thank You - Joe

1 Accepted Solution

Accepted Solutions

flokki123
Level 3
Level 3

hi joe,

as far as i know a switch has only one mac address and this is only needed, if you want to send traffic directly to the switch, i.e. you want to open a http session(gui) or like dominic mentioned for administrative traffic.

otherwise the switch will never use its own mac address, as switches dont change a frame.

if a switch receives a frame, or actually a packet of traffic, it will unstrip the packet until layer two, look at the mac address, first source to check if it knows this mac already(if not it will update the cam table) then destination mac to see where to switch the frame. if the dest. mac is in the cam table it will forward the frame to that specific port if the switch does not know the mac it will broadcast the fame out of every port.(besides the port the packet was received)

regarding question 2 and 3:

if the remote host is on the same subnet as the pc sending the packet, the dest. mac will be the mac of the remote host, as if not already known, the pc will arp for the mac.

if the remote host is on a different subnet it will put the mac of the default gateway in the dest. mac header.

and you are right, a switch does not change anything of the packet, resp. frame. only if a packet is routed, then the mac addresses get changed.

regards,

florian

View solution in original post

4 Replies 4

dominic.caron
Level 5
Level 5

The switch will use it's mac for administrative trafic, like sending spanning-tree BPDU.

Reza Sharifi
Hall of Fame
Hall of Fame

Joe,

have a look at this doc.  It explains the use of the internal mac addresses per series.

http://www.cisco.com/en/US/products/hw/switches/ps700/products_tech_note09186a00801c9b4e.shtml

HTH

flokki123
Level 3
Level 3

hi joe,

as far as i know a switch has only one mac address and this is only needed, if you want to send traffic directly to the switch, i.e. you want to open a http session(gui) or like dominic mentioned for administrative traffic.

otherwise the switch will never use its own mac address, as switches dont change a frame.

if a switch receives a frame, or actually a packet of traffic, it will unstrip the packet until layer two, look at the mac address, first source to check if it knows this mac already(if not it will update the cam table) then destination mac to see where to switch the frame. if the dest. mac is in the cam table it will forward the frame to that specific port if the switch does not know the mac it will broadcast the fame out of every port.(besides the port the packet was received)

regarding question 2 and 3:

if the remote host is on the same subnet as the pc sending the packet, the dest. mac will be the mac of the remote host, as if not already known, the pc will arp for the mac.

if the remote host is on a different subnet it will put the mac of the default gateway in the dest. mac header.

and you are right, a switch does not change anything of the packet, resp. frame. only if a packet is routed, then the mac addresses get changed.

regards,

florian

Florian,

Thanks for the great explanation.

Joe

Review Cisco Networking for a $25 gift card