[ previous ] [ next ] [ threads ]
 From:  Chris Taylor <chris at x dash bb dot org>
 To:  m0n0wall-dev Mailing List <m0n0wall dash dev at lists dot m0n0 dot ch>
 Subject:  Re: [m0n0wall-dev] Making interface assignments more resilient
 Date:  Sun, 06 Nov 2005 22:39:53 +0000

How about something along the lines of...

1. If the same MAC address is still in the system, assign the same 
interface to it.

2. If that MAC address is no longer found in the machine, look instead 
at what card has been placed in that PCI slot and assign that to the 

Obviously the above doesn't cover the instance of moving one card to 
another slot AND adding an additional card in the previous slot but I 
can't see that being too likely.

Basically, I'd say MAC addresses should have preference. Point 2 would 
cover your point about replacing failed hardware, as the old MAC would 
no longer be found anyway :)

Not sure if it's feasible, but IMO that would be the least surprising 
way to do it.



Kris Maglione wrote:
> I'm working on a patch to make interface assignments more resilient, but 
> I'd like some input as to which datas should have the highest priority.
> The problem I have is that when an iterface is added, removed, or moved, 
> interface names may change. For instance, if one has an xl0 and xl1 
> interface, and another xl interface is added, it may become xl0 or xl1, 
> thereby mangling the names. To solve this, I considered remapping the 
> names by MAC address at bootup. That way, the same card is mapped to the 
> same interface, no matter where it is. Then it occured to me that it may 
> be better to save the assignments by PCI address, so someone need only 
> worry about which PCI slot a card is in, making it easy to replace a 
> failed or obselete interface.
> The question I'm considering, though, is whether a MAC address should be 
> valued over a PCI address, or under it. If a person moves a network card 
> (maybe because of an IRQ conflict), and puts another in its place, but 
> leaves that card in the machine, they may be expecing that card to still 
> act as the same interface. I'd like this to act in the least surprising 
> way, so I'd like some input as to what people think that would be.