summaryrefslogtreecommitdiffstats
path: root/chapter_14.xml
diff options
context:
space:
mode:
authorAlan Hicks <alan@lizella.net>2010-05-01 14:17:18 -0400
committerAlan Hicks <alan@lizella.net>2010-05-01 14:17:18 -0400
commitdbca998ce52d78ce5e525e0d799adc83d580f66a (patch)
treec2a5ee10d4e488f77354f12e4c76a64615b94890 /chapter_14.xml
parent8ec49bb2c5d0fd2d3ee8dd519e783002f3c8f9ec (diff)
downloadslackbook-dbca998ce52d78ce5e525e0d799adc83d580f66a.tar.xz
Making room for new chapter and a few minor modifications.
Diffstat (limited to 'chapter_14.xml')
-rw-r--r--chapter_14.xml564
1 files changed, 316 insertions, 248 deletions
diff --git a/chapter_14.xml b/chapter_14.xml
index c3b6d8a..23eae86 100644
--- a/chapter_14.xml
+++ b/chapter_14.xml
@@ -3,331 +3,399 @@
"/usr/share/xml/docbook/xml-dtd-4.5/docbookx.dtd">
<chapter>
-<title>Wireless Networking</title>
+<title>Networking</title>
<section>
-<title><application>iwconfig</application></title>
+<title><application>netconfig</application></title>
<para>
-Wireless networking is somewhat more complicated than traditional wired
-networking, and requires additional tools for setup. Slackware includes
-a diverse collection of wireless networking tools to allow you to
-configure your wireless network interface card (WNIC) at the most basic
-level. We won't cover everything here, but should give you a solid
-foundation to get up and running quickly. The first tool we are going
-to look at is <application>iwconfig</application>(8). When run without
-any argument, <application>iwconfig</application> displays the current
-wireless information on any and all NICs on your computer.
+Computers aren't very interesting on their own. Sure, you can install
+games on them, but that just turns them into glorified entertainment
+consoles. Today, computers need to be able to talk to one another; they
+need to be networked. Whether you're installing a business network with
+hundreds or thousands of computers or just setting up a single PC for
+Internet access, Slackware is simple and easy. This chapter should
+teach you how to setup typical wired networks. Common wireless setup will
+be thoroughly discussed in the next section, but much of what you read
+here will be applicable there as well.
</para>
+<para>
+There are many different ways to configure your computer to connect to
+a network or the Internet, but they fall into two main categories:
+static and dymanic. Static addresses are solid; they are set with the
+understanding that they will not be changed, at least not anytime soon.
+Dynamic addresses are fluid; the assumption is that the address will
+change at some time in the future. Typically any sort of network server
+requires a static address simply so other machines will know where to
+contact it when they need services. Dynamic addresses tend to be used
+for workstations, Internet clients, and any machine that doesn't
+require a static address for any reason. Dynamic addresses are more
+flexible, but present complications of their own.
+</para>
-<screen><prompt>darkstar:~# </prompt><userinput>iwconfig</userinput>
-lo no wireless extensions.
+<para>
+There are many different kinds of network protocols that you might
+encounter, but most people will only ever need to deal with Internet
+Protocol (IP). For that reason, we'll focus exclusively on IP in this
+book.
+</para>
-eth0 no wireless extensions.
+</section>
-wmaster0 no wireless extensions.
+<section>
+<title>Manual Configuration</title>
-wlan0 IEEE 802.11abgn ESSID:"nest"
- Mode:Managed Frequency:2.432 GHz Access Point:
-00:13:10:EA:4E:BD
- Bit Rate=54 Mb/s Tx-Power=17 dBm
- Retry min limit:7 RTS thr:off Fragment thr=2352 B
- Encryption key:off
- Power Management:off
- Link Quality=100/100 Signal level:-42 dBm
- Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
- Tx excessive retries:0 Invalid misc:0 Missed beacon:0
+<para>
+Ok, so you've installed Slackware, you've setup a desktop, but you
+can't get it to connect to the Internet or your business's LAN (local
+area network), what do you do? Fortunately, the answer to that question
+is simple. Slackware includes a number of tools to configure your
+network connection. The first we will look at today is the very
+powerful <application>ifconfig</application>(8).
+<application>ifconfig</application> is used to setup or modify the
+configuration of a Network Interface Card (NIC or Ethernet Card), the
+most common hardware for connecting to networks today.
+<application>ifconfig</application> is an incredibly powerful tool
+capable of doing much more than setting IP addresses. For a complete
+introduction, you should read its man page. For now, we're just going
+to use it to display and change the network addresses of some ethernet
+controllers.
+</para>
-tun0 no wireless extensions.
+<screen><prompt>darkstar:~# </prompt><userinput>ifconfig</userinput>
+lo Link encap:Local Loopback
+ inet addr:127.0.0.1 Mask:255.0.0.0
+ inet6 addr: ::1/128 Scope:Host
+ UP LOOPBACK RUNNING MTU:16436 Metric:1
+ RX packets:699 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:699 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:0
+ RX bytes:39518 (38.5 KiB) TX bytes:39518 (38.5 KiB)
+
+wlan0 Link encap:Ethernet HWaddr 00:1c:b3:ba:ad:4c
+ inet addr:192.168.1.198 Bcast:192.168.1.255 Mask:255.255.255.0
+ inet6 addr: fe80::21c:b3ff:feba:ad4c/64 Scope:Link
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
+ RX packets:1630677 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:1183224 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:1000
+ RX bytes:1627370207 (1.5 GiB) TX bytes:163308463 (155.7 MiB)
+
+wmaster0 Link encap:UNSPEC HWaddr 00-1C-B3-BA-AD-4C-00-00-00-00-00-00-00-00-00-00
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
+ RX packets:0 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:1000
+ RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
</screen>
+
<para>
-Unlike wired networks, wireless networks are "fuzzy". Their borders are
-hard to define, and multiple networks may overlap one another. In order
-to avoid confusion, each wireless network has (hopefully) unique
-identifiers. The two most basic identifiers are the Extended Service
-Set Identifier (ESSID) and the channel or frequency for radio
-transmission. The ESSID is simply a name that identifies the wireless
-network in question; you may have heard it referred to as the network
-name or something similar. Typical wireless networks operate on 11
-different frequencies. In order to connect to even the most basic
-wireless network, you will have to setup these two pieces of
-information, and possibly others, before setting up things like the
-WNIC's IP address. Here you can see that my ESSID is set to "nest" and
-my laptop is transmitting at 2.432 GHz. This is all that is required to
-connect to an unencrypted wireless LAN. (For any of you out there
-expecting to come to my house and use my unencrypted wireless, you
-should know that you'll have to break a 2048-bit SSL key before the
-access point will let you communicate with my LAN.)
+As you can clearly see here, when run without any arguments,
+<application>ifconfig</application> will display all the information it
+has on all the ethernet cards (and wireless ethernet cards) present on
+your system. The above represents a typical wireless connection from my
+laptop, so don't be afraid if what you see on your system doesn't
+match. If you don't see any ethX or wlanX interfaces though, the
+interface may be down. To show all currently present NICs whether they are
+"up" or "down", simply pass the <arg>-a</arg> argument.
</para>
-<screen><prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 essid nest \
- freq 2.432G</userinput></screen>
+<screen><prompt>darkstar:~# </prompt><userinput>ifconfig -a</userinput>
+eth0 Link encap:Ethernet HWaddr 00:19:e3:45:90:44
+ UP BROADCAST MULTICAST MTU:1500 Metric:1
+ RX packets:122780 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:124347 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:1000
+ RX bytes:60495452 (57.6 MiB) TX bytes:17185220 (16.3 MiB)
+ Interrupt:16
+
+lo Link encap:Local Loopback
+ inet addr:127.0.0.1 Mask:255.0.0.0
+ inet6 addr: ::1/128 Scope:Host
+ UP LOOPBACK RUNNING MTU:16436 Metric:1
+ RX packets:699 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:699 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:0
+ RX bytes:39518 (38.5 KiB) TX bytes:39518 (38.5 KiB)
+
+wlan0 Link encap:Ethernet HWaddr 00:1c:b3:ba:ad:4c
+ inet addr:192.168.1.198 Bcast:192.168.1.255 Mask:255.255.255.0
+ inet6 addr: fe80::21c:b3ff:feba:ad4c/64 Scope:Link
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
+ RX packets:1630677 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:1183224 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:1000
+ RX bytes:1627370207 (1.5 GiB) TX bytes:163308463 (155.7 MiB)
+
+wmaster0 Link encap:UNSPEC HWaddr 00-1C-B3-BA-AD-4C-00-00-00-00-00-00-00-00-00-00
+ UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
+ RX packets:0 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:1000
+ RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
+</screen>
-<para>
-The <arg>freq</arg> and <arg>channel</arg> arguments control basically
-the same thing. You only need to use one. If you are unsure what
-frequency or channel to use, Slackware can usually figure this out for
-you.
+<para>Notice that the eth0 interface is now listed among the returns.
+<application>ifconfig</application> can also change the current
+settings on a NIC. Typically, you would need to change the IP address
+and subnet mask, but you can change virtually any parameters.
</para>
-<screen><prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 essid nest \
- channel auto</userinput></screen>
+<screen><prompt>darkstar:~# </prompt><userinput>ifconfig eth0 192.168.1.1 netmask 255.255.255.0</userinput>
+<prompt>darkstar:~# </prompt><userinput>ifconfig eth0</userinput>
+eth0 Link encap:Ethernet HWaddr 00:19:e3:45:90:44
+ inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
+ UP BROADCAST MULTICAST MTU:1500 Metric:1
+ RX packets:122780 errors:0 dropped:0 overruns:0 frame:0
+ TX packets:124347 errors:0 dropped:0 overruns:0 carrier:0
+ collisions:0 txqueuelen:1000
+ RX bytes:60495452 (57.6 MiB) TX bytes:17185220 (16.3 MiB)
+ Interrupt:16
+</screen>
<para>
-Now Slackware will attempt to connect to the strongest access point on
-the "nest" essid operating at any frequency.
+If you look carefully, you'll notice that the interface now has the
+192.168.1.1 IP address and a 255.255.255.0 subnet mask. We've now setup
+the basics for connecting to our network, but we still need to setup a
+default gateway and our DNS servers. In order to do that, we'll need to
+look at a few more tools.
</para>
-</section>
-
-<section>
-<title>Wired Equivilant Protection (or Lack Thereof)</title>
-
<para>
-Wireless networking is by its very nature less secure than wired
-networking. Having your information travelling on the airwaves makes it
-highly susceptible to interception by third paries, so over the years a
-number of methods have been devised to make wireless networking more
-secure. The first was called Wired Equivilant Protection, or WEP for
-short, and well far short of its goal. If you are still using WEP
-today, I encourage you to consider using WPA2 or some other form of
-stronger encryption. Attacks against WEP are trivial and take only
-minutes to perform. Unfortunately there are still access points
-configured for WEP, and you may need to connect to one from time to
-time. Connecting to WEP encrypted access points is fairly simple,
-particularly if you have the key in hexidecimal format. We'll need to
-pass the <arg>key</arg> argument along with the password in hexidecimal
-or ASCII format. If using an ASCII password, you'll need to prepend it
-with "s:"; here's a couple examples. Generally speaking, hexidecimal
-format is prefered.
+Next on our stop through networking land is the equally powerful
+<application>route</application>(8). This tool is responsible for
+modifying the Linux kernel's routing table which affects all data
+transmission on a network. Routing tables can become immensely complex
+or they can be straight-forward and simple. Most users will only ever
+need to setup a default gateway, so we'll show you how to do that here.
+If for some reason you need a more complex routing table, you would be
+well advised to read the entire man page for
+<application>route</application> as well as consulting other sources.
+For now, let's take a look at our routing table immediately after
+setting up eth0.
</para>
-<screen><prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 \
- key cf80baf8bf01a160de540bfb1c</userinput>
-<prompt>darkstar:~# </prompt><userinput>iwconfig wlan0 \
- key s:thisisapassword</userinput>
+<screen><prompt>darkstar:~# </prompt><userinput>route</userinput>
+Kernel IP routing table
+Destination Gateway Genmask Flags Metric Ref Use Iface
+192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
+loopback * 255.0.0.0 U 0 0 0 lo
</screen>
-</section>
+<para>
+I won't explain everything here, but the general information should be
+easy to pick up if you're familiar with networking at all. The
+Destination and Genmask fields specify a range of IP addresses to
+match. If a Gateway is defined, information in the form of packets will
+be sent to that host for forwarding. We also specify an interface in
+the final field that the information should traverse. Right now, we can
+only communicate with computers with addresses between 192.168.1.0 and
+192.168.1.255 and ourselves through the loopback interface, a type of
+virtual NIC that is used for routing information from this computer to
+itself. In order to reach the rest of the world, we'll need to
+setup a default gateway.
+</para>
-<section>
-<title>Wifi Protected Access</title>
+<screen><prompt>darkstar:~# </prompt><userinput>route add default gw 192.168.1.254</userinput>
+<prompt>darkstar:~# </prompt><userinput>route</userinput>
+Kernel IP routing table
+Destination Gateway Genmask Flags Metric Ref Use Iface
+192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
+loopback * 255.0.0.0 U 0 0 0 lo
+default 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
+</screen>
<para>
-Wifi Protected Access (or WPA for short) was the successor for WEP that
-aimed to fix several problems with wireless encryption. Unfortunately,
-WPA had some flaws as well. An update called WPA2 offers even stronger
-protection. At this time, WPA2 is supported by nearly all wireless
-network cards and access points, but some older devices may only
-support WEP. If you need to secure your wireless network traffic, WPA2
-should be considered the minimum level of protection required.
-Unfortunately, <application>iwconfig</application> is unable to setup
-WPA2 encryption on its own. For that, we need a helper daemon,
-<application>wpa_supplicant</application>(8).
+You should immediately notice the addition of a default route. This
+specifies what router should be used to reach any addresses that aren't
+specified elsewhere in our routing table. Now, when we try to connect
+to say, 64.57.102.34, the information will be sent to 192.168.1.254
+which is responsible for delivering the data for us. Unfortunately,
+we're still not quite through. We need some way of converting domain
+names like slackware.com into IP addresses that the computer can use.
+For that, we need to make use of a DNS server.
</para>
<para>
-Unfortunately, there's no easy way to manually configure a WPA2
-protected network; you'll have to edit
-<filename>/etc/wpa_supplicant.conf</filename> directly with a text
-editor. Here we will discuss the simplest form of WPA2 protection, the
-Pre-Shared Key, or PSK for short. For details on setting up Slackware
-to connect to more complicated WPA2 encrypted networks, see the man
-page for <filename>wpa_supplicant.conf</filename>.
+Fortunately, setting up your computer to use an external (or even an
+internal) DNS server is very easy. You'll need to use your favorite
+text editor and open the <filename>/etc/resolv.conf</filename> file.
+Don't ask me what happened to the <keycap>e</keycap>. On my computer,
+<filename>resolv.conf</filename> looks like this.
</para>
<screen>
-# /etc/wpa_supplicant.conf
-# ========================
-# This line enables the use of wpa_cli which is used by rc.wireless
-# if possible (to check for successful association)
-ctrl_interface=/var/run/wpa_supplicant
-# By default, only root (group 0) may use wpa_cli
-ctrl_interface_group=0
-eapol_version=1
-ap_scan=1
-fast_reauth=1
-#country=US
-
-# WPA protected network, supply your own ESSID and WPAPSK here:
-network={
- scan_ssid=1
- ssid="nest"
- key_mgmt=WPA-PSK
- psk="secret passphrase"
-}
+# /etc/resolv.conf
+search lizella.net
+nameserver 192.168.1.254
</screen>
<para>
-The block of text we're interested in is the network block enclosed by
-curly braces. Here we have set the ssid for the network "nest", as well
-as the PSK to use "secret passphrase". At this point, WPA2 is setup.
-You can run <application>wpa_supplicant</application> and then obtain
-an IP address via DHCP or set a static address. Of course, this is a
-lot of work, there must be an easier way to do this.
+Most users won't need the "search" line. This is used to map hostnames
+to domain names. Basically, if I attempt to connect to "barnowl", the
+computer knows to look for "barnowl.lizella.net" thanks to this search
+line. We're mainly interested in the "nameserver" line. This tells
+Slackware what domain name servers (DNS) to connect to. Generally
+speaking, these should always be specified by IP address. If you know
+what DNS servers you should use, you can just add them one at a time to
+individual nameserver lines. In fact, I don't know of any practical
+limit to the number of nameservers that can be specified in
+<filename>resolv.conf</filename>, so add as many as you like. Once this
+is done, you should be able to communicate with other hosts via their
+fully qualified domain name.
</para>
-</section>
-
-<section>
-<title>rc.inet1.conf revisited</title>
-
<para>
-Welcome back to <filename>rc.inet1.conf</filename>. You're recall in
-the last chapter that we used this configuration file to automatically
-configure NICs whenever Slackware boots. Now, we will use it to
-configure wifi as well. If you're using WPA2, you'll still need to
-setup <filename>wpa_supplicant.conf</filename> properly first, however.
+But Alan! That's a lot of hard work! I don't want to do this time and
+again for dozens or even hundreds of machines. You're absolutely right,
+and that's why smarter people than you and me created DHCP. DHCP
+stands for Dynamic Host Control Protocol and is a method for
+automatically configuring computers with unique IP addresses, netmasks,
+gateways, and DNS servers. Most of the time, you'll want to use DHCP.
+The majority of wireless routers, DSL or cable modems, even firewalls
+all have DHCP servers to can make your life much easier. Slackware
+includes two main tools for connecting to an exising DHCP server and
+can even act as a DHCP server for other computers. For now though,
+we're just going to look at DHCP clients.
</para>
<para>
-Recall that each NIC had a name or number that identified the variables
-that corrospond with it? The same hold true for wifi NICs, only they
-have even more variables due to the added complexity of wireless
-networking.
+First on our list is <application>dhcpcd</application>(8), part of the
+ISC DHCP utilities. Assuming your computer is physically connected to
+your network, and that you have an operating DHCP server on that
+network, you can configure your NIC in one shot.
</para>
-<screen>
-# rc.inet1.conf (excert)
-# ======================
-## Example config information for wlan0. Uncomment the lines you need and fill
-## in your info. (You may not need all of these for your wireless network)
-IFNAME[4]="wlan0"
-IPADDR[4]=""
-NETMASK[4]=""
-USE_DHCP[4]="yes"
-#DHCP_HOSTNAME[4]="icculus-wireless"
-#DHCP_KEEPRESOLV[4]="yes"
-#DHCP_KEEPNTP[4]="yes"
-#DHCP_KEEPGW[4]="yes"
-#DHCP_IPADDR[4]=""
-WLAN_ESSID[4]="nest"
-#WLAN_MODE[4]=Managed
-#WLAN_RATE[4]="54M auto"
-#WLAN_CHANNEL[4]="auto"
-#WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
-#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | \
-# set EncrypType=TKIP | \
-# set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
-WLAN_WPA[4]="wpa_supplicant"
-#WLAN_WPADRIVER[4]="ndiswrapper"
+<screen><prompt>darkstar:~# </prompt><userinput>dhcpcd eth0</userinput>
</screen>
<para>
-When we discussed wired ethernet, each "n" in the variable corrosponded
-with the "n" in ethn. Here however, that no longer holds true. Notice
-that the variable IFNAME[4] has a value of "wlan0". It is common for
-wireless cards to have an interface name other than "ethn" and that is
-reflected here. When <filename>rc.inet1.conf</filename> is read by the
-start-up scripts, Slackware knows to apply all these options to the
-"wlan0" wifi NIC instead of the (probably non-existant) eth4 wired NIC.
-Many of the other options are the same. IP address information is
-added in exactly the same way we discussed for wired network cards in
-the previous chapter; however, we have a lot of new variables that need
-some explaination.
+If everything went according to plan, your NIC should be properly
+configured, and you should be able to communicate with other computers
+on your network, and with the Internet at large. If for some reason,
+<application>dhcpcd</application> fails, you may want to try
+<application>dhclient</application>(8).
+<application>dhclient</application> is an alternative to
+<application>dhcpcd</application> and works in basically the same way.
</para>
-<para>
-To begin, WLAN_ESSID[n] and WLAN_CHANNEL[n] should be self-explainatory
-by now; they refer the the essid and frequency to use. WLAN_MODE[n] is
-either "managed" or "ad-hoc". Anyone connecting to an access point
-will want to use managed mode. WLAN_KEY[n] is the WEP key to use, if
-you're forced to use WEP. WLAN_IWPRIV[n] is a very complicated
-variable that sets other variables inside itself. WLAN_IWPRIV[n] is
-used for WPA2 networks. Here you tell Slackware what authentication
-mode, encryption type, and key to use for WPA2 connections. Please
-note that WLAN_KEY[n] and WLAN_IWPRIV[n] are mutually exclusive; you
-can't use both on the same interface. If you successfully configure
-all this, then Slackware will attempt to connect to your wireless
-network as soon as the system boots.
-</para>
+<screen><prompt>darkstar:~# </prompt><userinput>dhclient eth0</userinput>
+Listening on LPF/eth0/00:1c:b3:ba:ad:4c
+Sending on LPF/eth0/00:1c:b3:ba:ad:4c
+Sending on Socket/fallback
+DHCPREQUEST on eth0 to 255.255.255.255 port 67
+DHCPACK from 192.168.1.254
+bound to 192.168.1.198 -- renewal in 8547 seconds.
+</screen>
<para>
-But wait, that's so much work! And what if I need to connect to
-multiple wireless networks? I take my laptop to work and school and
-need to seemlessly setup those wireless connections as soon as one is
-within range. Doing things this way is simply too much work. You're
-absolutely correct.
+So why does Slackware include two DHCP clients? Sometimes a particular
+DHCP server may be broken and not respond well to either
+<application>dhcpcd</application> or
+<application>dhclient</application>. In those cases, you can fall back
+to the other DHCP client in hopes of getting a valid response from the
+server. Traditionally, Slackware uses
+<application>dhcpcd</application>, and this works in the vast majority
+of cases, but it may become necessary at some point for you to use
+<application>dhclient</application> instead. Both are excellent DHCP
+clients, so use whichever you prefer.
</para>
</section>
<section>
-<title>wicd</title>
+<title>Automatic Configuration with rc.inet1.conf</title>
<para>
-Introducing <application>wicd</application>(8), the premier wired and
-wireless network connection manager for the laptop user on the go.
-Pronounced "wicked", <application>wicd</application> is capable of
-storing information for any number of wireless networks you need and
-connecting to them with a simple command or the click of a mouse.
-<application>wicd</application> is not part of the default Slackware
-installation at this time, as it interferes somewhat with the normal
-way of configuring network adapters, but you can find it in the
-<filename>/extra</filename> directory of your Slackware install disks
-or at your favorite mirror. <application>wicd</application> is both a
-network connection daemon and a graphical application for configuring
-networks. The CLI isn't forgotten either, as
-<application>wicd-curses</application>(8) is every bit as powerful as
-the traditional GUI front-end. In order to use
-<application>wicd</application>, you will need to disable support for
-any interfaces you have in <filename>rc.inet1.conf</filename> first.
+Manually configuring interfaces is an important skill to have, but it
+can become tedious. No one wants to manually setup their Internet
+connection every time the system boots. More importantly, you may not
+always have physical access to the machine when it boots. Slackware
+makes it easy to automatically configure ethernet (and wireless) cards
+at system startup with <filename>/etc/rc.d/rc.inet1.conf</filename>.
+For now, we're going to focus on traditional wired ethernet networking;
+the next chapter will discuss various wireless options.
+</para>
+
+<para>
+<filename>rc.inet1.conf</filename> is an incredibly powerful
+configuration file, capable of configuring most of your network cards
+automatically when Slackware is started. The file is filled with useful
+comments, but there is also a man page that more thoroughly discusses
+its use. To begin, we're going to look at some of the options used on
+one of my personal machines.
</para>
<screen>
-# rc.inet1.conf
-# =============
# Config information for eth0:
-IPADDR[0]=""
-NETMASK[0]=""
-USE_DHCP[0]="no"
+IPADDR[0]="192.168.1.250"
+NETMASK[0]="255.255.255.0"
+USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
-# Default gateway IP address:
-GATEWAY=""
+# Some lines ommitted.
+GATEWAY="192.168.1.254"
</screen>
<para>
-Now we can install <application>wicd</application>, setup the daemon to
-run on system boot-up, and begin using a more friendly application.
+This represents most of the information necessary to configure a static
+IP address on a single ethernet controller.
+<application>netconfig</application> will usually fill in these values
+for a single ethernet device for you. If you have multiple network
+cards in your machine and need all of them activated automatically at
+boot time, then you'll need to edit or add additional entries into this
+file in the same manner as above. First, let me go over some of the
+basics.
</para>
-<screen><prompt>darkstar:~# </prompt><userinput>installpkg /path/to/extra/wicd/wicd-1.6.2.1-1.txz</userinput>
-<prompt>darkstar:~# </prompt><userinput>chmod +x /etc/rc.d/rc.wicd</userinput>
-<prompt>darkstar:~# </prompt><userinput>/etc/rc.d/rc.wicd start</userinput>
-</screen>
+<para>
+As you may have already guessed, IPADDR[n] is the Internet Protocol
+Address for the "n" network interface card. Typically, "n" corrosponds
+to eth0, eth1, and so on, but this isn't always the case. You can
+specify these values to pertain to a different network controller with
+the INFAME[n] variable, but we will reserve that for the next chapter
+on wireless networking, as it more commonly pertains to wireless
+network controllers. Likewise, NETMASK[n] is the subnet mask to use
+for the network controller. If these lines are left empty, then static
+IP addresses will not be automatically assigned to this network
+controller. The USE_DHCP[n] variable tells Slackware to (naturally)
+use DHCP to configure the interface. DHCP_HOSTNAME[n] is rarely used,
+but some DHCP servers may require it. In that case, it must be set to
+a valid hostname. Finally, we come to the GATEWAY variable. It is
+actually set lower in the file than it appears in my example, and it
+controls the default gateway to use. You may be wondering why there is
+no GATEWAY[n] variable. The answer to that lies in how Internet
+Protocol works. I won't go into an indepth discussion on that subject,
+but suffice it to say that there is only ever one default route that a
+computer can use no matter how many interfaces are attached to it.
+</para>
<para>
-If you're predominately using the console, simply run
-<application>wicd-curses</application> from your command line. If
-instead, you are using a graphical desktop provided by
-<application>X</application>, you can start the graphical front-end
-from either the KDE or XFCE menu. Optionally, you could manually run
-<application>wicd-client</application>(1) from a terminal or run
-dialogue.
+If you need to use static IP addressing, you will have to obtain a
+unique static IP address and the subnet mask for the interface, as well
+as the default gateway address, and enter those here. There is no place
+to enter DNS information in <filename>rc.inet1.conf</filename>, so DNS
+servers will have to be manually placed into
+<filename>resolv.conf</filename> as we discussed above. Of course, if
+you use <application>netconfig</application>, this will be handled for
+you by that program. Now let's take a look at another interface on my
+computer.
</para>
+<screen>
+# Config information for eth1:
+IPADDR[1]=""
+NETMASK[1]=""
+USE_DHCP[1]="yes"
+DHCP_HOSTNAME[1]=""
+</screen>
+
<para>
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
-ADD PICTURES OF WICD-CURSES AND WICD-CLIENT!!!!
+Here I am telling Slackware to configure eth1 using DHCP. I do not need
+to set the IPADDR[1] or NETMASK[1] variables when using DHCP (in fact,
+if they are set, they will be ignored). Slackware will happily contact
+a DHCP server as soon as the machine begins to boot.
</para>
</section>