Aaron Martinez wrote: > apologies if this has been covered in the past, I searched on this and > couldn't find anything, although i'm sure it's the wording i'm using. > > My question is. I have OBSD 4.0 running on an Asus p3b-F with 6 pci > slots that i'm wanting to use as a router/firewall. I have 5 fxp > interfaces in the machine inserted starting from the bottom pci slot > up. When the machine boots up it finds them just fine, but I never > know what order the cards are in. (i.e. fxp0 was in the third slot > as opposed to the first or last slot populated with a card, as i would > have expected). Is there a way to hard code this into the > hostname.fxpN file, as to assign the number of the interface based on > the hardware address as opposed to the ordering of the cards in the > machine? I looked in the man page for hostname.if but saw no way > mentioned. > > A second related question, in the above example, how exactly does OBSD > choose the interface number? I was under the impression it used the > slot to assign the interface number which is why i was so surprised to > see that fxp0 the third slot, fxp2 was in the top (occupied) slot and > fxp4 was in the bottom. I have all of the pci slots set to auto in > the bios if that makes any difference. Someone else probably knows more than I, but here is my tiny bit of insight. First of all, according to the networking section of the faq: Combine the short alphabetical device name (such as fxp) with a number assigned by the kernel and you have an interface name (such as fxp0). The number is assigned based on various criteria, depending upon the card and other details of the system. Some cards are assigned by the order they are found during bus probing. Others may be by hardware resource settings or MAC address.
Where this can cause a problem is newer boards with multiple PCI buses. Usually it is something like one pair of slots are full PCI-X up to 133MHz and another pair is put aside for slower 66MHz cards or to allow you to split the bandwidth. Board manufacturers do this because many buses (including older pci) will run at the clock of the slowest card on the bus, so giving you a separate bus allows you to have a slower card in the system without slowing down the slots your faster cards are plugged into. Unfortunately these multiple pci buses are not always set up to be probed in a simple left-to-right order when looking at the board. If you look at dmesg output you will probably see you have multiple pci buses. I may be wrong about this but these are my thoughts on the matter, someone else feel free to correct me if I am wrong. Best, Chris

