From 829d40731b8d6fc89548fb2605f5f8fd4b277281 Mon Sep 17 00:00:00 2001 From: Klaatu von Schlacker Date: Mon, 25 Jun 2012 09:28:49 -0400 Subject: Added netconfig and startup services section to ch02 Made minor changes to ch14 15 16 --- TODO | 4 -- chapter_02.xml | 162 ++++++++++++++++++++++++++++++++++++++++++++------------- chapter_14.xml | 73 ++++++++++++++------------ chapter_15.xml | 101 ++++++++++++++++++----------------- chapter_16.xml | 28 ++++++---- 5 files changed, 231 insertions(+), 137 deletions(-) diff --git a/TODO b/TODO index 7d96c0f..91f61c0 100644 --- a/TODO +++ b/TODO @@ -28,10 +28,6 @@ Chapter 10. Working with Filesystems allows you to find out exactly what NFS exports a remote server has made available. -Chapter 14. Networking - -* Add netconfig. This is mandatory! - Chapter 16. Basic Networking Commands * Additional tools to discuss: finger, host, dig, nail diff --git a/chapter_02.xml b/chapter_02.xml index 961aca5..885080f 100644 --- a/chapter_02.xml +++ b/chapter_02.xml @@ -2,7 +2,7 @@ - + Installation @@ -28,7 +28,7 @@ or from a network card that support PXE. The files there are the best source of information available for such boot methods. -
+
Booting the Installer @@ -142,7 +142,7 @@ need to do so and should proceed directly to partitioning.
-
+
Partitioning @@ -300,7 +300,8 @@ Units = cylinders of 16065 * 512 = 8225280 bytes -The swap partition is a special partition that is used for + +The swap partition is a special partition that is used for virtual memory by the Linux kernel. If for some reason you run out of RAM, the kernel will move the contents of some of the RAM to swap in order to prevent a crash. The size of your swap partition is up to @@ -353,7 +354,7 @@ ensure that they are properly read by the kernel.
-
+
The <application>setup</application> Program @@ -369,7 +370,7 @@ step-by-step. In order to do so, just type -
+
Help @@ -384,9 +385,9 @@ step-by-step. In order to do so, just type -
+
-
+
Keymap @@ -404,7 +405,7 @@ step-by-step. In order to do so, just type
-
+
Addswap @@ -425,7 +426,7 @@ step-by-step. In order to do so, just type
-
+
Target @@ -446,7 +447,7 @@ step-by-step. In order to do so, just type
-
+
Source @@ -469,7 +470,7 @@ step-by-step. In order to do so, just type
-
+
Select @@ -490,7 +491,7 @@ step-by-step. In order to do so, just type
-
+
Install @@ -534,7 +535,7 @@ step-by-step. In order to do so, just type
-
+
Configure @@ -605,32 +606,119 @@ step-by-step. In order to do so, just type - netconfig! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! + The next stage in configuring your install is the network + configuration. If you don't wish to configure your network at this + stage, you may decline, but otherwise you'll be prompted to + provide a hostname for your computer. Do not enter a domain name, + only the hostname. + + + + The following screen will prompt you for a domainname, such as + example.org. The combination of the hostname and the domainname + can be used to navigate between computers in your network if you + use an internal DNS service or maintain your + /etc/hosts file. + + + + You have three options when setting your IP address; you may + assign it a static IP, or you may use DHCP, or you may configure a + loopback connection. The simplest option, and probably the most + common for laptops or computers on a basic network, is to let a + DHCP server assign IP addresses dynamically. In practice, this + often results in a consistent address since both + dhcpcd and + dhclient initially request the same + address previously assigned. If the address is unavailable then + the machine gets a new one, but on small networks this may never + happen. + + + + If the DHCP server on your network requires a specific DHCP + hostname before you're permitted to connect. You can enter this on + the Set DHCP Hostname screen. + + + + To use a static IP address, you must provide: + + + + Static IP Address + + + IP Address + + + The address of your computer, such as 192.168.1.1 (for + IPv4). Also, you should verify that no DHCP server on your + network is set to assign that same address out as a part of + its DHCP pool, or you may encounter address conflicts. + + + + + + Netmask + + + The subnet mask for your network; often 255.255.255.0 for + small networks. + + + + + + Gateway Address + + + The address of the gateway server providing internet access + to your network. On small networks, this will probably be + provided by your ISP while on larger networks you may use an + internal server which handles the traffic. In other words, + this may be an internal address like 192.168.1.1 or it might + be an address provided by your ISP, such as 75.146.49.79 + + + + + + Nameserver + + + Most likely, you'll want to utilize DNS; in this initial + setup, provide your primary domain name server. Edit + /etc/resolv.conf to add + secondary and tertiary servers later. + + + + + + + The final screen during static IP address configuration is a + confirmation screen, where you're permitted to accept your + choices, edit them, or even restart the IP address configuration + in case you decide to use DHCP instead. + + + + Your network configuration is now complete. The next screen + prompts you to configure the startup services that you wish to run + automatically upon boot. Read the descriptions that appear both to + the right of the service name as well as at the bottom of the + screen in order to decide whether that service should be turned on + by default. These can always be modified later with + pkgtool > Setup + > Services. - services! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! - FILL THIS IN!!!!!! + As the startup services window warns, you should only turn on the + startup services that you actually intend to use. This not only + decreases boot time but makes for a more secure system. diff --git a/chapter_14.xml b/chapter_14.xml index b9e7e58..aeedd11 100644 --- a/chapter_14.xml +++ b/chapter_14.xml @@ -2,10 +2,10 @@ - + Networking -
+
<application>netconfig</application> @@ -43,24 +43,23 @@ book.
-
+
Manual Configuration 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 ifconfig(8). -ifconfig 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. -ifconfig 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. +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 is the very +powerful ifconfig(8), which is used to +setup or modify the configuration of the most common hardware for +connecting to networks: a Network Interface Card (NIC or +Ethernet Card). ifconfig 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. darkstar:~# ifconfig @@ -177,7 +176,8 @@ For now, let's take a look at our routing table immediately after setting up eth0. -darkstar:~# route + +darkstar:~# route 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 @@ -198,7 +198,8 @@ itself. In order to reach the rest of the world, we'll need to setup a default gateway. -darkstar:~# route add default gw 192.168.1.254 + +darkstar:~# route add default gw 192.168.1.254 darkstar:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface @@ -233,7 +234,7 @@ nameserver 192.168.1.254 -Most users won't need the search line. This is used to map hostnames +Many 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 @@ -305,7 +306,7 @@ clients, so use whichever you prefer.
-
+
Automatic Configuration with <filename>rc.inet1.conf</filename> @@ -357,14 +358,17 @@ 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 (naturally) to use DHCP to configure the interface. +pertain to a different network controller with the IFNAME[n] +variable, but we will reserve that for , +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 +(naturally) to 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 @@ -379,13 +383,14 @@ interfaces are attached to it. 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 rc.inet1.conf, so DNS -servers will have to be manually placed into -resolv.conf as we discussed above. Of course, if -you use netconfig, this will be handled for -you by that program. Now let's take a look at another interface on my +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 rc.inet1.conf, +so DNS servers will have to be manually placed into +resolv.conf as discussed in . Of course, if you use +netconfig, this will be handled for you by +that program. Now let's take a look at another interface on my computer. diff --git a/chapter_15.xml b/chapter_15.xml index e7d0cc4..0e80bbc 100644 --- a/chapter_15.xml +++ b/chapter_15.xml @@ -2,10 +2,10 @@ - + Wireless Networking -
+
<application>iwconfig</application> @@ -46,24 +46,29 @@ tun0 no wireless extensions. 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 +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.) +network in question; you may have heard it referred to as the "network +name" or something similar. -darkstar:~# iwconfig wlan0 essid nest \ + +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.) + + + + darkstar:~# iwconfig wlan0 essid nest \ freq 2.432G @@ -73,17 +78,19 @@ frequency or channel to use, Slackware can usually figure this out for you. -darkstar:~# iwconfig wlan0 essid nest \ - channel auto + + darkstar:~# iwconfig wlan0 essid nest \ + channel auto + Now Slackware will attempt to connect to the strongest access point on -the "nest" essid operating at any frequency. +the "nest" essid operating at any frequency.
-
+
Wired Equivilant Protection (or Lack Thereof) @@ -105,7 +112,8 @@ you'll need to prepend it with "s;" but generally speaking, hexidecimal format is preferred. -darkstar:~# iwconfig wlan0 \ + +darkstar:~# iwconfig wlan0 \ key cf80baf8bf01a160de540bfb1c darkstar:~# iwconfig wlan0 \ key s:thisisapassword @@ -113,7 +121,7 @@ speaking, hexidecimal format is preferred.
-
+
Wifi Protected Access @@ -173,20 +181,26 @@ course, this is a lot of work; there must be an easier way to do this. -
+
rc.inet1.conf revisited -Welcome back to rc.inet1.conf. 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 wpa_supplicant.conf properly first, however. +Welcome back to rc.inet1.conf. You're recall +that in 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 + wpa_supplicant.conf properly first, however. + + + 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 +that correspond with it? The same hold true for wifi NICs, only they have even more variables due to the added complexity of wireless networking. @@ -227,7 +241,7 @@ other than ethn and that is reflected here. When rc.inet1.conf 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 +other options are the same. IP address information is added in exactly the same way we discussed for wired network cards in ; however, we have a lot of new variables that need some explanation. @@ -264,7 +278,7 @@ absolutely correct.
-
+
wicd @@ -328,34 +342,19 @@ from either the KDE or XFCE menu. Optionally, you could manually run -wicd-client(1) from a terminal or run -dialogue. +wicd-client(1) from a terminal or run +dialogue. - - If you're not running X or simply would - prefer to stay in the terminal, you can launch the command line - version, wicd-curses. - - - - - - - - The wicd-curses interface - - - On the graphical front-end, options for different networks are available via the Preferences button adjacent to the ESSID listed. In the terminal client, the same options can be - reached by highlighting the network you wish to configure and - pressing c. + reached by highlighting the ESSID you wish to use and + pressing the right arrow key, which opens a configuration page for + that network.
- + \ No newline at end of file diff --git a/chapter_16.xml b/chapter_16.xml index 97a0fee..05a32e0 100644 --- a/chapter_16.xml +++ b/chapter_16.xml @@ -433,9 +433,9 @@ A more feature-rich alternative is the popular links(1), a console-based web browser that supports frames and has better table rendering than lynx. Like its predecessor, -links is navigated with the arrow keys, and -the use of a mouse is supported. Unlike, -lynx it also includes a handy menu (simply +links is navigable with the arrow keys, and +the use of a mouse is supported. Unlike +lynx, it also includes a handy menu (simply click on the top line with your mouse to activate) and generally formats web pages better. @@ -729,7 +729,7 @@ for that, muttrc(5). You might want to read up on it. - formail to re-format your mail if needed + Optionally, formail to re-format your mail if needed (depending on your mail server settings) @@ -822,9 +822,10 @@ here and wants mds "/usr/bin/procmail"' >> ~/.fetchmailrc - Now that fetchmail is configured, it will successfully pull your - email from the server. But what will your computer do with all of - that mail? This is the job of procmail. + Now that fetchmail is configured, it will + successfully pull your email from the server. But what will your + computer do with all of that mail? This is the job of + procmail. @@ -850,8 +851,8 @@ here and wants mds "/usr/bin/procmail"' >> ~/.fetchmailrc At this point, your email will be pulled from the server by fetchmail and sorted on your local system - by way of procmail. You need to - configure mutt so that it knows where to + by way of procmail. All that's left to + do is to configure mutt so that it knows where to find your email messages so that you can view them. @@ -883,7 +884,7 @@ here and wants mds "/usr/bin/procmail"' >> ~/.fetchmailrc procmail), while mbox defines where mail that you have read and responded to will be stored. All other settings are self-explanatory, and all have been - drawn directly from the muttrc man page. + drawn directly from the muttrc man page; refer to it for more options. @@ -897,8 +898,13 @@ here and wants mds "/usr/bin/procmail"' >> ~/.fetchmailrc darkstar:~$ formail -ds < ~/Mail/Inbox >> ~/Mail/Muttbox - + + Rather than performing this conversion every time you check your + email, you might want to script it to happen automatically after + procmail is finished its job. + + The commands used to navigate around in mutt are highly -- cgit v1.2.3