One DocBook source in docs/guide produces the manual pages, one HTML file, the PDF and an MCDE information library. The guide follows the structure of The NetBSD Guide, describes Makronix 0.99.10 (Camouflage), and has its own chapters for MCDE, the Information Manager and the display. The forms are installed by the release: /usr/share/doc/makronix/makronix-guide.html /usr/share/doc/makronix/makronix-guide.pdf /usr/share/doc/makronix/infolib/makronix.dti/ (base-sys-share) /usr/share/man/man7/makronix-guide*.7 (man-reference-man) /etc/dt/config/Xsession.d/0000makronix (etc-sys-etc) /etc/dt/infolib/en_US.UTF-8/makronix.dti (symlink) The information library is built with MCDE's dtdocbook2infolib from a small Lua writer for the CDE DocBook SGML dialect; tools/test-tools.sh runs docs/guide/check.sh on the installed copies and proves that a missing manual page falls red.
99 lines
3.6 KiB
XML
99 lines
3.6 KiB
XML
<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
|
|
<chapter id="network">
|
|
<title>Networking</title>
|
|
|
|
<para>NetBSD's network configuration is small and explicit: an interface
|
|
is configured with <command>ifconfig</command>, an address can come from
|
|
DHCP, and the routes and the resolver are plain files. Makronix's
|
|
installer writes the files for the network you chose; this chapter is for
|
|
changing them later.</para>
|
|
|
|
<sect1 id="network-interfaces">
|
|
<title>Interfaces and addresses</title>
|
|
|
|
<screen>$ ifconfig -a
|
|
$ netstat -rn
|
|
$ cat /etc/resolv.conf</screen>
|
|
|
|
<para>The name of an interface is the driver's: <filename>wm0</filename>
|
|
for an Intel Ethernet, <filename>re0</filename> for a Realtek,
|
|
<filename>ath0</filename> or <filename>urtwn0</filename> for Wi-Fi,
|
|
<filename>lo0</filename> for the loopback. An address from DHCP is
|
|
requested by <citerefentry><refentrytitle>dhcpcd</refentrytitle><manvolnum>8</manvolnum></citerefentry>:</para>
|
|
|
|
<screen># dhcpcd wm0
|
|
# /etc/rc.d/dhcpcd restart</screen>
|
|
|
|
<para>The service reads <filename>/etc/rc.conf</filename>; with
|
|
<literal>dhcpcd=YES</literal> it configures every interface that is not
|
|
configured by a fixed file at boot.</para>
|
|
</sect1>
|
|
|
|
<sect1 id="network-fixed">
|
|
<title>A fixed address</title>
|
|
|
|
<para>A machine that should have the same address every time does not
|
|
need DHCP. The address belongs in
|
|
<filename>/etc/ifconfig.</filename><replaceable>interface</replaceable>:</para>
|
|
|
|
<screen>inet 192.168.1.20/24</screen>
|
|
|
|
<para>The default route is <filename>/etc/mygate</filename>:</para>
|
|
|
|
<screen>192.168.1.1</screen>
|
|
|
|
<para>and the resolver is <filename>/etc/resolv.conf</filename>:</para>
|
|
|
|
<screen>nameserver 192.168.1.1
|
|
nameserver 9.9.9.9</screen>
|
|
|
|
<para>Set <literal>dhcpcd=NO</literal> for that interface, or leave the
|
|
service off entirely. The name of the machine is in
|
|
<filename>/etc/myname</filename>; the local names are in
|
|
<filename>/etc/hosts</filename>:</para>
|
|
|
|
<screen>127.0.0.1 localhost
|
|
192.168.1.20 studio.example studio</screen>
|
|
</sect1>
|
|
|
|
<sect1 id="network-wifi">
|
|
<title>Wi-Fi</title>
|
|
|
|
<para>A Wi-Fi interface needs its network and passphrase before DHCP can
|
|
run. <citerefentry><refentrytitle>wpa_passphrase</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
|
writes the configuration:</para>
|
|
|
|
<screen># wpa_passphrase "network-name" "the passphrase" > /etc/wpa_supplicant.conf
|
|
# chmod 600 /etc/wpa_supplicant.conf
|
|
# ifconfig ath0 up
|
|
# wpa_supplicant -B -i ath0 -c /etc/wpa_supplicant.conf
|
|
# dhcpcd ath0</screen>
|
|
|
|
<para>The service configuration is:</para>
|
|
|
|
<screen>wpa_supplicant=YES
|
|
wpa_supplicant_flags="-B -i ath0 -c /etc/wpa_supplicant.conf"
|
|
dhcpcd=YES</screen>
|
|
|
|
<para>The MCDE System Settings network pane lists the networks in reach
|
|
and asks for the passphrase; it writes the same files. A USB Wi-Fi
|
|
adapter is a second interface with its own name; use that name in the
|
|
commands above.</para>
|
|
</sect1>
|
|
|
|
<sect1 id="network-test">
|
|
<title>Testing</title>
|
|
|
|
<screen>$ ping -c 3 192.168.1.1
|
|
$ ping -c 3 www.NetBSD.org
|
|
$ route -n get default
|
|
$ netstat -an | grep LISTEN</screen>
|
|
|
|
<para>If the first ping works and the second does not, the address and
|
|
the route are fine and the resolver or the uplink is not. If neither
|
|
works, the interface is down or the cable is not in the right port.
|
|
<command>dmesg</command> names the interface the driver found, and
|
|
<command>ifconfig</command> shows whether it has an address.</para>
|
|
</sect1>
|
|
</chapter>
|