Add informations on how to use DHCP for NIC configuration.

Refine the Testing and Troubleshooting section.
This commit is contained in:
Marc Fonvieille 2016-02-29 11:34:00 +00:00
parent 5a791f6e66
commit 55f0a86ce3
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=48296

View file

@ -967,9 +967,29 @@ lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
<acronym>NIC</acronym> configuration can be performed from the
command line with &man.ifconfig.8; but will not persist after
a reboot unless the configuration is also added to
<filename>/etc/rc.conf</filename>. Add a line for each
<acronym>NIC</acronym> present on the system, as seen in this
example:</para>
<filename>/etc/rc.conf</filename>. If a
<acronym>DHCP</acronym> server is present on your LAN, you
will just have to add the following line:</para>
<programlisting>ifconfig_dc0="DHCP"</programlisting>
<para>Replace <filename>dc0</filename> with the correct value
for the system.</para>
<para>The line added, then, follow the instructions given in <xref
linkend="config-network-testing"/>.</para>
<note>
<para>If the network was configured during installation, some
entries for the <acronym>NIC</acronym>(s) may be already
present. Double check <filename>/etc/rc.conf</filename>
before adding any lines.</para>
</note>
<para>In the case, there is no <acronym>DHCP</acronym> server,
the <acronym>NIC</acronym>(s) have to be configured manually.
Add a line for each <acronym>NIC</acronym> present on the
system, as seen in this example:</para>
<programlisting>ifconfig_dc0="inet 192.168.1.3 netmask 255.255.255.0"
ifconfig_dc1="inet 10.0.0.1 netmask 255.255.255.0 media 10baseT/UTP"</programlisting>
@ -981,11 +1001,6 @@ ifconfig_dc1="inet 10.0.0.1 netmask 255.255.255.0 media 10baseT/UTP"</programlis
&man.rc.conf.5; for more details about the allowed options and
the syntax of <filename>/etc/rc.conf</filename>.</para>
<para>If the network was configured during installation, some
entries for the <acronym>NIC</acronym>(s) may be already
present. Double check <filename>/etc/rc.conf</filename>
before adding any lines.</para>
<para>If the network is not using <acronym>DNS</acronym>, edit
<filename>/etc/hosts</filename> to add the names and
<acronym>IP</acronym> addresses of the hosts on the
@ -1003,7 +1018,7 @@ ifconfig_dc1="inet 10.0.0.1 netmask 255.255.255.0 media 10baseT/UTP"</programlis
</note>
</sect2>
<sect2>
<sect2 xml:id="config-network-testing">
<title>Testing and Troubleshooting</title>
<para>Once the necessary changes to
@ -1066,7 +1081,12 @@ round-trip min/avg/max/stddev = 0.700/0.729/0.766/0.025 ms</screen>
of the <acronym>IP</acronym> address. If there is no
<acronym>DNS</acronym> server on the network,
<filename>/etc/hosts</filename> must first be
configured.</para>
configured. To this purpose, edit
<filename>/etc/hosts</filename> to add the names and
<acronym>IP</acronym> addresses of the hosts on the
<acronym>LAN</acronym>, if they are not already there. For
more information, refer to &man.hosts.5; and to
<filename>/usr/share/examples/etc/hosts</filename>.</para>
</sect3>
<sect3>
@ -1113,7 +1133,7 @@ round-trip min/avg/max/stddev = 0.700/0.729/0.766/0.025 ms</screen>
if a cable is unplugged. Check the output of
<command>netstat -rn</command> and make sure there is a
valid route to the host. If there is not, read
<xref linkend="advanced-networking"/>.</para>
<xref linkend="network-routing"/>.</para>
<para><errorname>ping: sendto: Permission denied</errorname>
error messages are often caused by a misconfigured firewall.