Other Interface names at boot and NAT

Hello.

I'm trying to set up NAT and a firewall on a Raspberry Pi B using the built-in Ethernet adapter and a USB Ethernet adapter through a USB hub. How can I make sure that the interfaces are configured correctly at boot? For example, if the adapters are not always assigned the same interface name or number.

Linux has a convention called Consistent Network Device Naming. Is there something similar in FreeBSD? Or can I refer to the adapters by, for example, MAC addresses instead of interface names in the firewall and NAT configuration files?
 
They're probably both going to be using different drivers, and thus use different interface names.
 
Multiple USB devices can change, but you only have one. It is possible to use devd(8) to assign fixed device names, although I don't know if alternate names would work with ifconfig(8). For that matter, it would depend on the USB devices having different detectable IDs.

For normal Ethernet cards, device order probably comes from bus enumeration, and that code does not change often. Like DutchDaemon, I have never seen them change order.
 
Back
Top