NIC naming
Matthew Seaman
matthew at freebsd.org
Mon Oct 26 16:30:48 UTC 2015
On 10/26/15 15:58, Johan Hendriks wrote:
> Is it possible to make sure em0 stays em0 even if more network cards are
> added.
> I try to goole for it but could not find anything.
Unlike hard drives, I do not believe that there is any way to force the
kernel to number NICs in any way other than the order that they appear
on whatever system buses at the time the kernel is booted.
However, you can arbitrarily rename NICs using ifconfig(8). It's
supported in /etc/rc.conf:
ifconfig_em0_name="net0"
and then you can refer to net0 in the rest of the config:
ipv4_addrs_net0="192.0.2.1/24"
This probably doesn't solve your problem, which appears to be knowing
which of the ethernet ports on your machine is em0 -- the usual method
to do that is by ifconfig'ing everything else down and then testing with
a network cable until you find the working port. However it might help
clarify the system configuration.
It's not like an em(4) interface can be added to a server without
powering the machine down and opening the case, so you'ld need to have
people physically working on the machine in any case. Various USB
connected devices might be a different matter.
Cheers,
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20151026/a1e8ed88/attachment.bin>
More information about the freebsd-questions
mailing list