MAC Addresses of Switches

Ok, this is going to be the first article in a series of articles about the CCIE recertification topics (some, not all..) I’m currently going through to get myself recertified ūüôā And to have some of the base topics handy for the future. As long as Cisco doesn’t change all of them ūüėČ

**Update 8th of October 2010**
As it looks like the information below only works for “older” switches like 3550 and 2950. Newer Switches like 3560, 3750 or 2960 do behave different!

As every Ethernet device, switches do use MAC addresses to address their own interfaces, including the Switch Virtual Interfaces (SVIs). They do use a “base” MAC address for the SVI(s) and increase it by one for every interface, starting with the very first.

As written above, the “base” MAC address is assigned to the SVI(s), here VLAN1

3550#sh int vlan 1 | i bia
 Hardware is EtherSVI, address is 000d.bd43.6800 (bia 000d.bd43.6800)

The MAC address 000d.bd43.6800 is the base from which the other interfaces are addressed in sequence. The first interface (fa0/1) will get 000d.bd42.6801, while the second (fa0/2) has 000d.bd42.6802 and so on:

3550#sh int fa 0/1 | i bia
 Hardware is Fast Ethernet, address is 000d.bd43.6801 (bia 000d.bd43.6801)

3550#sh int fa 0/2 | i bia
 Hardware is Fast Ethernet, address is 000d.bd43.6802 (bia 000d.bd43.6802)

3550#sh int fa 0/3 | i bia
 Hardware is Fast Ethernet, address is 000d.bd43.6803 (bia 000d.bd43.6803)

3550#sh int fa 0/24 | i bia
 Hardware is Fast Ethernet, address is 000d.bd43.6818 (bia 000d.bd43.6818)

The Interface fa0/24 has a MAC address of 000d.bd43.618, while HEX 18 equals to DEC 24

So whats going to happen if we use more than one SVI?  Well nothing, the switch just assignes the base MAC address to every SVI configured on the switch:

3550#sh int vlan 1 | i bia
 Hardware is EtherSVI, address is 000d.bd43.6800 (bia 000d.bd43.6800)

3550#sh int vlan 10 | i bia
 Hardware is EtherSVI, address is 000d.bd43.6800 (bia 000d.bd43.6800)

3550#sh ip int brief | e una
Interface                  IP-Address      OK? Method Status                Protocol
Vlan1                      10.1.1.1        YES manual up                    down
Vlan10                     10.1.10.1       YES manual down                  down

So if we gonna plug another switch into fa0/48 we’ll see the MAC of the other switches interface and the MAC of the SVI:

3550#sh mac address-table dynamic
 Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 1    0012.d998.ec80    DYNAMIC     Fa0/48
 1    0012.d998.ecaf    DYNAMIC     Fa0/48
Total Mac Addresses for this criterion: 2

So given, that the base MAC is always the lowest (ec80 here), we know that the other switches interface is actually the 47th interface (or fa0/47 :)). If we do the math:

HEX AF = DEC 175
HEX 80 = DEC 128
175-128 = 47

As nearly as good as CDP ūüėČ

Advertisements

One comment

  1. Pingback: Day 3 – Gathering books | My CCIE Journal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s