network cfg: mention that LFS and the host may name interfaces differently

This commit is contained in:
Xi Ruoyao 2022-01-31 19:41:34 +08:00
parent 4d323c324f
commit 1966b8db8f
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC
2 changed files with 27 additions and 6 deletions

View File

@ -27,12 +27,22 @@
address(es), subnet masks, and so forth. It is necessary that the stem of
the filename be <emphasis>ifconfig</emphasis>.</para>
<note><para>If the procedure in the previous section was not used, udev
will assign network card interface names based on system physical
characteristics such as enp2s1. If you are not sure what your interface
name is, you can always run <command>ip link</command> or <command>ls
/sys/class/net</command> after you have booted your system.
</para></note>
<note>
<para>If the procedure in the previous section was not used, udev
will assign network card interface names based on system physical
characteristics such as enp2s1. If you are not sure what your interface
name is, you can always run <command>ip link</command> or <command>ls
/sys/class/net</command> after you have booted your system.
</para>
<para>The interface names depend on the implementation and
configuration of the udev daemon running on the system. The udev
daemon for LFS (installed in <xref linkend="ch-system-eudev"/>) will
not run until the LFS system is booted. So it's unreliable to
determine the interface names being used in LFS system by running
those commands on the host distro,
<emphasis>even though in the chroot environment</emphasis>.</para>
</note>
<para>The following command creates a sample file for the
<emphasis>eth0</emphasis> device with a static IP address:</para>

View File

@ -53,6 +53,17 @@
<command>ip link</command> after you have booted your system.
</para>
<note>
<para>The interface names depend on the implementation and
configuration of the udev daemon running on the system. The udev
daemon for LFS (<command>systemd-udevd</command>, installed in
<xref linkend="ch-system-systemd"/>) will not run unless the LFS
system is booted. So it's unreliable to determine the interface
names being used in LFS system by running those commands on the host
distro,
<emphasis>even though in the chroot environment</emphasis>.</para>
</note>
<para>
For most systems, there is only one network interface for
each type of connection. For example, the classic interface