Update a bit the "Setting Up Network Interface Cards" section to match

current FreeBSD versions (commands output, use of rc.d facilities,
config for Internet access, etc.).  I may add some inputs about DHCP
soon.
This commit is contained in:
Marc Fonvieille 2010-08-28 20:59:31 +00:00
parent 559928dccc
commit 8f9aabc4c1
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=36334

View file

@ -828,16 +828,18 @@ sshd is running as pid 433.</screen>
<screen>dc0: &lt;82c169 PNIC 10/100BaseTX&gt; port 0xa000-0xa0ff mem 0xd3800000-0xd38
000ff irq 15 at device 11.0 on pci0
dc0: Ethernet address: 00:a0:cc:da:da:da
miibus0: &lt;MII bus&gt; on dc0
ukphy0: &lt;Generic IEEE 802.3u media interface&gt; on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bmtphy0: &lt;BCM5201 10/100baseTX PHY&gt; PHY 1 on miibus0
bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc0: Ethernet address: 00:a0:cc:da:da:da
dc0: [ITHREAD]
dc1: &lt;82c169 PNIC 10/100BaseTX&gt; port 0x9800-0x98ff mem 0xd3000000-0xd30
000ff irq 11 at device 12.0 on pci0
dc1: Ethernet address: 00:a0:cc:da:da:db
miibus1: &lt;MII bus&gt; on dc1
ukphy1: &lt;Generic IEEE 802.3u media interface&gt; on miibus1
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto</screen>
bmtphy1: &lt;BCM5201 10/100baseTX PHY&gt; PHY 1 on miibus1
bmtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc1: Ethernet address: 00:a0:cc:da:da:db
dc1: [ITHREAD]</screen>
<para>In this example, we see that two cards using the &man.dc.4;
driver are present on the system.</para>
@ -1009,29 +1011,25 @@ ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps</screen>
your system, enter the following command:</para>
<screen>&prompt.user; <userinput>ifconfig</userinput>
dc0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
dc0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=80008&lt;VLAN_MTU,LINKSTATE&gt;
ether 00:a0:cc:da:da:da
inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (100baseTX &lt;full-duplex&gt;)
status: active
dc1: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
dc1: flags=8802&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=80008&lt;VLAN_MTU,LINKSTATE&gt;
ether 00:a0:cc:da:da:db
inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
media: Ethernet 10baseT/UTP
status: no carrier
lp0: flags=8810&lt;POINTOPOINT,SIMPLEX,MULTICAST&gt; mtu 1500
lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; mtu 16384
plip0: flags=8810&lt;POINTOPOINT,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; metric 0 mtu 16384
options=3&lt;RXCSUM,TXCSUM&gt;
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
tun0: flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1500</screen>
<note>
<para>Old versions of &os; may require the <option>-a</option>
option following &man.ifconfig.8;, for more details about the
correct syntax of &man.ifconfig.8;, please refer to the manual
page. Note also that entries concerning IPv6
(<literal>inet6</literal> etc.) were omitted in this
example.</para>
</note>
nd6 options=3&lt;PERFORMNUD,ACCEPT_RTADV&gt;</screen>
<para>In this example, the following devices were
displayed:</para>
@ -1048,18 +1046,14 @@ tun0: flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1500</screen>
</listitem>
<listitem>
<para><devicename>lp0</devicename>: The parallel port
interface</para>
<para><devicename>plip0</devicename>: The parallel port
interface (if a parallel port is present on the
machine)</para>
</listitem>
<listitem>
<para><devicename>lo0</devicename>: The loopback device</para>
</listitem>
<listitem>
<para><devicename>tun0</devicename>: The tunnel device used by
<application>ppp</application></para>
</listitem>
</itemizedlist>
<para>&os; uses the driver name followed by the order in
@ -1121,8 +1115,11 @@ tun0: flags=8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1500</screen>
<para>If the &man.ifconfig.8; output had shown something similar
to:</para>
<screen>dc0: flags=8843&lt;BROADCAST,SIMPLEX,MULTICAST&gt; mtu 1500
ether 00:a0:cc:da:da:da</screen>
<screen>dc0: flags=8843&lt;BROADCAST,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=80008&lt;VLAN_MTU,LINKSTATE&gt;
ether 00:a0:cc:da:da:da
media: Ethernet autoselect (100baseTX &lt;full-duplex&gt;)
status: active</screen>
<para>it would indicate the card has not been configured.</para>
@ -1159,6 +1156,15 @@ ifconfig_dc1="inet 10.0.0.1 netmask 255.255.255.0 media 10baseT/UTP"</programlis
addresses of various machines of the LAN, if they are not already
there. For more information please refer to &man.hosts.5;
and to <filename>/usr/share/examples/etc/hosts</filename>.</para>
<note>
<para>If an access to the Internet is planned with the
machine, you also have to manually set up the default
gateway and the nameserver:</para>
<screen>&prompt.root; <userinput>echo 'defaultrouter="<replaceable>your_default_router</replaceable>"' &gt;&gt; /etc/rc.conf</userinput>
&prompt.root; <userinput>echo 'nameserver <replaceable>your_DNS_server</replaceable>' &gt;&gt; /etc/resolv.conf</userinput></screen>
</note>
</sect2>
<sect2>
@ -1168,9 +1174,20 @@ ifconfig_dc1="inet 10.0.0.1 netmask 255.255.255.0 media 10baseT/UTP"</programlis
<filename>/etc/rc.conf</filename>, you should reboot your
system. This will allow the change(s) to the interface(s) to
be applied, and verify that the system restarts without any
configuration errors.</para>
configuration errors. Alternatively you can just relaunch the
networking system:</para>
<para>Once the system has been rebooted, you should test the
<screen>&prompt.root; <userinput>/etc/rc.d/netif restart</userinput></screen>
<note>
<para>If a default gateway has been set in
<filename>/etc/rc.conf</filename>, use also this
command:</para>
<screen>&prompt.root; <userinput>/etc/rc.d/routing restart</userinput></screen>
</note>
<para>Once the networking system has been relaunched, you should test the
network interfaces.</para>
<sect3>