Skip navigation

Wired Ethernet

April 2009 Previous month Next month

Intel has several dual port MAC/PHY products.  A common misunderstanding with the bunch of them is how do we store the MAC address for the two ports in just one shared EEPROM.  Here is how it works.  The base MAC address is stored only.  The second port is a XOR 1 with the base address.  So while it might look like it's just a +1, it will "backup" when the starting address is ODD.  Time to take a look at some real addresses:


Let's say the base address is 00AA00123456.  That is what is stored in the EEPROM.  Here is what the ports look like:

Port 0: 00AA00123456

Port 1: 00AA00123457


Looks like plus one, but don't be fooled.  Let's look at the base being odd.  Here is the same example, but with 00AA00123457 as the base:

Port 0: 00AA00123457

Port 1: 00AA00123456


As you can see that could get nasty if you have already programmed the address 00AA00123456 into another device.  If we use the base addresses in sequence it would look like this:

Base MAC 1:  00AA00123456  Base MAC 2:  00AA00123457

MAC 1 Port 0: 00AA00123456  MAC 1 Port 1:  00AA00123457

MAC 2 Port 0: 00AA00123457  MAC 1 Port 1:  00AA00123456


Which would really be a mess!


When programming the EEPROM on a dual port part, you only need to program the EEPROM once.  Programming it once for each port won't hurt anything, but if your EEPROM programming tool auto increments the address for each port you'll still get the MAC addresses BACKWARDS.  I know it sounds confusing, so let do another example.


Tool pass 1 Program Port 0 with 00AA00123456  and then Port 1 with  00AA00123457.  Since the EEPROM is shared between the two ports, it will leave the 00AA00123457 address as the base address in the EEPROM.  Which will make Port 0 00AA00123457 and Port 1 00AA00123456.  The two addresses are used, but the ports will be seen opposite of the expected value.  Two ways to deal with this:  1) Program just 00AA00123456 and discard 00AA00123457 without programming it, or 2)  Explore the ability to swap port 0 and port 1.  Choice 1 is the Intel BKM; choice 2 is a whole 'nother post.


So let's go to the summary:

1)  The second port MAC address is a XOR 1 of the base MAC address stored in the EEPROM

2) You only need to program you EEPROM once since it is a shared resource

and 3) Thanks for using Intel networking silicon

Filter Blog

By date: By tag: