# Network device naming



## hawkcra7 (Jan 10, 2012)

Hi, I hope I picked the right topic to post this under but here it goes...

I have one concern that has been plaguing me since I switched from Linux to FreeBSD and that is with having multiple network cards of the same type and their naming.  I have experienced issues with Linux where the network cards get renamed from eth0 to eth1 (and back) across multiple boots (which is fixed by adding rules in UDEV) and am curious if this is an issue with FreeBSD.

I have two identical Intel ethernet cards installed in my FreeBSD box and so far I haven't had an issue.  My question is, as long as the cards remain in the same slot will the names always remain the same or are there steps I can take to make sure naming is the same based on MAC addr?

Obviously, this is not an issue with DHCP configurations but I have my cards statically defined.

Thanks.


----------



## SirDice (Jan 10, 2012)

hawkcra7 said:
			
		

> My question is, as long as the cards remain in the same slot will the names always remain the same


Short answer, yes :e

As long as the number of cards and the slots they're in isn't changed their names won't change either. Things might start moving around if you add or remove a card.


----------



## hawkcra7 (Jan 10, 2012)

Thanks for the fast reply!  For completeness, if I were to add another identical card in the future or change the ordering, does FreeBSD have a mechanism to define naming based on MAC?


----------



## SirDice (Jan 10, 2012)

You can rename a card but it's based on its (detected) device name, not its MAC address.


----------



## hawkcra7 (Jan 10, 2012)

Okay, so in other words if you change things around and the card name order changes from xyz0, xyz1, xyz2 to xyz1, xyz0, xyz2 for example you just need to redefine the static ip address associated with the cards -- fair enough.  Again, thanks.


----------

