Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 2015 16:30:23 +0000
From:      Matthew Seaman <matthew@freebsd.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: NIC naming
Message-ID:  <562E551F.6060406@freebsd.org>
In-Reply-To: <562E4D92.3000308@gmail.com>
References:  <562E4D92.3000308@gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--NRIAXedgCDVb5GcVFeGWCSvAnftbxHVTe
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 10/26/15 15:58, Johan Hendriks wrote:

> Is it possible to make sure em0 stays em0 even if more network cards ar=
e
> 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=3D"net0"

and then you can refer to net0 in the rest of the config:

    ipv4_addrs_net0=3D"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






--NRIAXedgCDVb5GcVFeGWCSvAnftbxHVTe
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJWLlUfAAoJEABRPxDgqeTnJ64P/3V4A3h/YZJqUu3DGYkI5uxH
BhyDxI+ikQnMtOVFFhOqcgoa1dmX5Id8Mh83m2KirCp5fI6OzPcnVa0SuvjRelTV
0+jf4C1/NoT5Wkm/ZL89ehQpEgIo9Be1kGiTC75g7EqnaT7BJgDcW0f4Wp3fEb9j
Xbv46NcPePdfqx7LFeIxuDYaBocQJvOPA8uARjYL5Ba6FSjxu6PH9TaBQnDGlRpM
verJ39Dpe0csoI0ATmhkb6zJulsyWxymXpeI5afsD78oTRdoWy8YaqNypby+bauE
eCT5Mixzf4PJqMDpu3Wo9PgifwTYQnktTDFvIsiCvRRRztXaz4fp7/4v9NCbE+vB
6arfXd6PpJt7m0Cxg/oJZQEEg0+SwI7BbmdT6FPeZ3RvBzRH9SY2KHmeAV2CzcBI
vI4jj/DWKvyCYXF6gjUopEZPw4pGet1Pi+sHp8VrfE/+GsWRAZDeNzRG6ynR90FJ
qOr4LSL8xPc+PMR1K2dMZzEZqK1VN0LwNIFIuIJfVQCqn110jO3Y87/BY6pPD9bW
5dTkJnIY6wNYmEZrs/tykQEfudOkjGuLQY41c5ritxFfrYg7S0ixlKE5O3zchdNN
OEx0Nog2men/ckxaqgIQRRwi1IszLXHLCS6fMnDNetQA+PBc0Yhu7InvVilka1zu
0l9SK9j+8nqY8Uv7sKK1
=OBSO
-----END PGP SIGNATURE-----

--NRIAXedgCDVb5GcVFeGWCSvAnftbxHVTe--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?562E551F.6060406>