05-16-2012 08:14 AM - edited 03-04-2019 04:22 PM
1) Does Switch and Router have a single MAC address?
2) In my observation Switch has a base MAC address and differenct MAC for every interface. If yes then where does this MACs use?
3) Router has a single MAC of every port. Is it correct?
Thanks in advance for helping !!!!
05-16-2012 08:33 AM
Hi Behzad,
1) Does Switch and Router have a single MAC address?
1) The device itself has one MAC address that identifies the device but every port has its own MAC address as well.
2) In my observation Switch has a base MAC address and differenct MAC for every interface. If yes then where does this MACs use?
2) Yes you are right.
For example MAC address of the device is used in STP when electing the root bridge - the switch with smallest MAC address becomes the root bridge (if they have the same priority configured).
The MAC address of interfaces are for example used in STP BPDUs (Bridge Protocol Data Units) messages. It is used there as the source address of the frame.
3) Router has a single MAC of every port. Is it correct?
3) Yes you are correct. Just like switch ports.
Best regards,
Jan
05-16-2012 08:40 AM
Dear JAN,
Thanks for your answer. This is the output of my Router (7600 series):
GigabitEthernet1/2 is up, line protocol is up (connected)
Hardware is C6k 1000Mb 802.3, address is 0015.fa3a.3c40 (bia 0015.fa3a.3c40)
GigabitEthernet1/3 is up, line protocol is up (connected)
Hardware is C6k 1000Mb 802.3, address is 0015.fa3a.3c40 (bia 0015.fa3a.3c40)
GigabitEthernet1/4 is up, line protocol is up (connected)
Hardware is C6k 1000Mb 802.3, address is 0015.fa3a.3c40 (bia 0015.fa3a.3c40)
Every interface of router have same MAC.
And this is the output of my Switch (3500 series):
GigabitEthernet0/1 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 0022.0ca8.1481 (bia 0022.0ca8.1481)
GigabitEthernet0/2 is down, line protocol is down (notconnect)
Hardware is Gigabit Ethernet, address is 0022.0ca8.1482 (bia 0022.0ca8.1482)
GigabitEthernet0/3 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 0022.0ca8.1483 (bia 0022.0ca8.1483)
GigabitEthernet0/4 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 0022.0ca8.1484 (bia 0022.0ca8.1484)
It shows different MAC for every port. Please help !!!!
05-16-2012 08:56 AM
Hi Behzad,
The only thing that comes to my mind is that you could have the same address if you have port-channel configured and these ports are the part of such port-channel. But I suppose that the bia (Burned-in address) bia 0015.fa3a.3c40 should be different!
Best regards,
Jan
05-17-2012 12:22 AM
Hi Behzad,
MAC addresses should be unique on each network. They can be same in different networks. i.e MAC-address /layer 2 information changes with each hop.
1]
"Every interface of router have same MAC"
This is right behaviour as each interface of the router will be connected to different network. So it will be highly unlikely that mac-addresss clash would take place.
2]
In case of switch "It shows different MAC for every port"
This is also correct as switches can be used as Layer 3 and as well as in a layer 2 environment. Chances are mac-addresses might clash within same network. Consider cases like SVI/VLAN interfaces, routed interfcaes or plain layer interfaces. So it required unique mac on each interface.
Thanks,
Nandan Mathure
05-16-2012 01:59 PM
We featured your question on our Facebook page. To see your responses please click on this link http://www.facebook.com/CiscoSupportCommunity/posts/411053375594802
---
Posted by WebUser Cisco NetPro from Cisco Support Community App
11-09-2012 09:53 PM
Behzad,
Let me explain how this works.... Each switchport interface does have a Mac address. If you do a show version you'll see the Mac address and the (bia- burned in address). So when you do a sh ip int and see the Mac you will notice that all the switch does is increment each switchport by the following number or letter. Remember switches use hexadecimal so after 0-9 you have A-F. Your example actually showed you that.
GigabitEthernet0/1 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 0022.0ca8.1481 (bia 0022.0ca8.1481) <----- 1481 thru 0-9 then 148A thru F.
GigabitEthernet0/2 is down, line protocol is down (notconnect)
Hardware is Gigabit Ethernet, address is 0022.0ca8.1482 (bia 0022.0ca8.1482)
GigabitEthernet0/3 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 0022.0ca8.1483 (bia 0022.0ca8.1483)
GigabitEthernet0/4 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 0022.0ca8.1484 (bia 0022.0ca8.1484)
It shows different MAC for every port. Please help !!!!
Hopefully this clarifies your issue and now you understand how it works. Also, study hexadecimal and you'll really be able to read a packet and understand what's going on. it helped me exponentially.
Goodluck
Ryan Cooombs
11-09-2012 10:25 PM
Hi,
Agree with what Ryan has mentioned above on L2 ports.
Also just to add, on a 6500/7600 every L3 ports would use the burned in mac-address (BIA) of chassis. Once you change the port into L2 port, they would be assigned with unique mac-address.
The chassis mac-address on 6500/7600 can be seen by below command
# show catalyst6000 chassis-mac-addresses
Thanks,
Sudeep
09-18-2017 10:13 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide