MAC Address of Switch

typeshtypesh Member Posts: 168
Hey,

Had a question about a switches MAC address.

When I do a "show version" I see what is called a Base ethernet MAC Address, however when I do a "show interface Fa0/1" I also see another MAC Address... When I do a "show interface Fa0/2" there is also another MAC Address. There appears to be a MAC Address for every interface...

Does that mean that the switch itself has a MAC Address (called the Base ethernet MAC Address), and also that each interface has it's own MAC Address?

Also...

When I am under interface-config mode, I am able to set a specific MAC Address for the interface. Example (assuming that I am configuring Fa0/2):
Switch(config-if)#mac-address 1234.1234.1234
This shows up in the running-config.
When I do a "show interface Fa0/2" I see this:
Hardware is Lance, address is 1234.1234.1234 (bia 0030.f2a9.8702)
Before I changed it to 1234.1234.1234 it read:
Hardware is Lance, address is 0030.f2a9.8702 (bia 0030.f2a9.8702)

Confused here...

Thank you.

Comments

  • ncsugrad2002ncsugrad2002 Member Posts: 131
    typesh wrote: »
    Hey,

    Had a question about a switches MAC address.

    When I do a "show version" I see what is called a Base ethernet MAC Address, however when I do a "show interface Fa0/1" I also see another MAC Address... When I do a "show interface Fa0/2" there is also another MAC Address. There appears to be a MAC Address for every interface...

    Does that mean that the switch itself has a MAC Address (called the Base ethernet MAC Address), and also that each interface has it's own MAC Address?


    Thank you.

    yep. that is correct.

    as for the second part of your question.. what you're doing is basically mac address spoofing. read about it a little. i've done it on routers since some WAN connections require the mac address change the same of the interface they're connected to. never really done it on a switch but it sounds like the commands are the same.
  • thenjdukethenjduke Member Posts: 894 ■■■■□□□□□□
    Each interface does have it own mac address.
    CCNA, MCP, MCSA, MCSE, MCDST, MCITP Enterprise Administrator, Working towards Networking BS. CCNP is Next.
  • jbrad95706jbrad95706 Member Posts: 225
    show mac address-table will show you the macs for the switch.

    It doesn't label them by interface though, or if it does - I'm not sure how to make it do it, yet.
  • typeshtypesh Member Posts: 168
    Sounds good. I understand. Thanks for all the replies.

    Just out of curiosity... Since each interface has it's own MAC Address, what is the point of the switch having a Base ethernet MAC Address? Is it ever used anywhere?
  • ncsugrad2002ncsugrad2002 Member Posts: 131
    typesh wrote: »
    Sounds good. I understand. Thanks for all the replies.

    Just out of curiosity... Since each interface has it's own MAC Address, what is the point of the switch having a Base ethernet MAC Address? Is it ever used anywhere?

    i can't remember which is used for electing the root bridge in spanning tree..maybe it's that one?
  • jason_lundejason_lunde Member Posts: 567
    yep...
    do a show spanning tree.
    The bridge id of the switch uses the base Ethernet mac address.
  • typeshtypesh Member Posts: 168
    yep...
    do a show spanning tree.
    The bridge id of the switch uses the base Ethernet mac address.


    Ahh that makes sense.

    Thanks!!
  • trackittrackit Member Posts: 224
    This is something that i havent understood fully yet: switches and mac addresses... If every port on a switch has its own mac address then what are they used for? Lets say if i send a frame then i use ARP to find a mac address of my next hop device (router or host, not switch) and i address the frame to that next hop mac address... So... when does actually mac addresses of switch ports come into play? im quite sure the switch dont modify the frame... or does it?
  • behbeh Member Posts: 10 ■□□□□□□□□□
    trackit wrote: »
    This is something that i havent understood fully yet: switches and mac addresses... If every port on a switch has its own mac address then what are they used for? Lets say if i send a frame then i use ARP to find a mac address of my next hop device (router or host, not switch) and i address the frame to that next hop mac address... So... when does actually mac addresses of switch ports come into play? im quite sure the switch dont modify the frame... or does it?

    When you say "...mac address of my next hop device" you are really talking about the mac address of the interface that you are connected to (a host machine can have multiple NICs each having their own mac address).

    So a frame going from a switch to a host would have the switch interface's mac address as the source address, and the host's network adapter's mac address as the destination address.

    On the host if you show the ARP entries, the host should be aware of the switch's interface mac address that it's plugged into.
  • trackittrackit Member Posts: 224
    beh wrote: »

    So a frame going from a switch to a host would have the switch interface's mac address as the source address, and the host's network adapter's mac address as the destination address.

    Are you sure? actually im pretty sure thats not the case... im pretty sure swicth doesnt alter the frame and source/destination mac addresses remain how sending host specifyed them.

    If switch would indeed change the source mac address, then how would destination host know to whome it needs to reply to?

    EDIT: On the other hand receiving host may use source ip address to determine sending host though i dont see any point in changing the source mac address.

    I wonder why this "swiching" concept is not explaind in any networking book or study guide i have come across.
  • behbeh Member Posts: 10 ■□□□□□□□□□
    trackit wrote: »
    EDIT: On the other hand receiving host may use source ip address to determine sending host though i dont see any point in changing the source mac address.

    Ethernet frames operate on a point-to-point basis. Let's say we have two hosts connected to a switch (under the same subnet of course), and let's say that one host (host A) pings the other host (host B).


    A frame is sent to the switch, with the switch's interface's mac address as the destination, and host A's NIC as the source.

    When the switch receives the frame, it "unpacks" it, so to speak, to look at the IP packet contained inside.

    It then uses the destination IP (host B's IP address) of the packet in conjunction with ARP to determine the destination MAC address for the next frame and which interface it's attached to.

    After this mac address is determined, the switch then creates another frame with the destination mac address being the one that was just determined, and the source address being the mac address of the interface the frame is being sent out of.

    This process then happens in reverse in order for host B to reply.

    EDIT: What I described might have more to do with passing through a router than a switch since layer 3 is involved. Double-checking my answer now...

    EDIT2: Ok, what I said above seems to apply to passing through a layer 3 device. The switch does not change the source/destination address of a frame.
  • ncsugrad2002ncsugrad2002 Member Posts: 131
    trackit wrote: »
    Are you sure? actually im pretty sure thats not the case... im pretty sure swicth doesnt alter the frame and source/destination mac addresses remain how sending host specifyed them.

    If switch would indeed change the source mac address, then how would destination host know to whome it needs to reply to?

    EDIT: On the other hand receiving host may use source ip address to determine sending host though i dont see any point in changing the source mac address.

    I wonder why this "swiching" concept is not explaind in any networking book or study guide i have come across.

    I've seen it in a few places. I had an exam question that asked for the destination mac address and IP address at different points across a network. Goes along with this pretty well.
  • trackittrackit Member Posts: 224
    beh wrote: »
    Ethernet frames operate on a point-to-point basis. Let's say we have two hosts connected to a switch (under the same subnet of course), and let's say that one host (host A) pings the other host (host B).


    A frame is sent to the switch, with the switch's interface's mac address as the destination, and host A's NIC as the source.

    When the switch receives the frame, it "unpacks" it, so to speak, to look at the IP packet contained inside.

    It then uses the destination IP (host B's IP address) of the packet in conjunction with ARP to determine the destination MAC address for the next frame and which interface it's attached to.

    After this mac address is determined, the switch then creates another frame with the destination mac address being the one that was just determined, and the source address being the mac address of the interface the frame is being sent out of.

    This process then happens in reverse in order for host B to reply.

    EDIT: What I described might have more to do with passing through a router than a switch since layer 3 is involved. Double-checking my answer now...

    EDIT2: Ok, what I said above seems to apply to passing through a layer 3 device. The switch does not change the source/destination address of a frame.

    actually i have never heard that switch changes the source or destination MAC address... and yes, switches do not knoe anything about ip addresses, so they dont use ARP.

    Lets say host A sends a packet to host B through a switch. Host A determines hosts B mac address (with ARP protocol) and then host A creates a frame where source MAC is its own MAC address and destinaton MAC is hosts B MAC address. Switch receives the frame and forwards it to appropriate port.

    so... what are switchports MAC addresses used for? i still dont know :)

    EDIT: you beat me with your second edit :)
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    typesh wrote: »
    Does that mean that the switch itself has a MAC Address (called the Base ethernet MAC Address), and also that each interface has it's own MAC Address?
    dtlokee wrote: »
    The base MAC address is buned into the parameter block of the switch and can be modified by breaking the boot sequence and resetting the MAC_ADDRESS parameter and then written to the parameter block (although this should not need to be done). On a layer 3 switch the mac address of any layer 3 interface is based off the base mac address + offset of the port number. Layer 2 interfaces don't have an individual MAC addres, only the VLAN interface used for management.
    My 2950 has the + offset of the port number added to the Base Ethernet MAC..... but for layer 3 protocols it isn't getting used. A layer 2 switch isn't rewriting frames and putting in it's switchport MAC Address as a source....
    trackit wrote: »
    so... what are switchports MAC addresses used for? i still dont know :)
    Check out some of the layer 2 protocol formats and see what they use as a source address. I think ISL uses the switchport MAC address.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • jason_lundejason_lunde Member Posts: 567
    2 words...transparent bridging.
    L2 switches don't alter frames. The either flood, forward, or filter them.
  • japneetjapneet Member Posts: 1 ■□□□□□□□□□
    mikej412 wrote: »
    My 2950 has the + offset of the port number added to the Base Ethernet MAC..... but for layer 3 protocols it isn't getting used. A layer 2 switch isn't rewriting frames and putting in it's switchport MAC Address as a source....


    Check out some of the layer 2 protocol formats and see what they use as a source address. I think ISL uses the switchport MAC address.


    Its right Layer2 Switching never changes the frames means no changes in MAC and in CRC values......


    So, During this send and receive process, If you are using Layer 2 Switch It will never change the frame and if u r using L3 Switch it'll changes the Frame..

    We have MAC address on the Switchport but it is Replicated by the Devices which are connecting to the particular Switchport...
Sign In or Register to comment.