Chapter 6. Networking with Linux

Let your Linux box connect to other machines using PPPand Ethernet

One of the biggest benefits of Linux and UNIX is the built-in TCP/IP networking. This networking gives you E-mail, remote connections, and World Wide Web (WWW) access.

To connect your machine to a network, you'll need either an Ethernet card or a modem and a PPP provider.[1] Once this is done, you'll have to reconfigure the Linux kernel to take advantage of the networking hardware. There are more networking options available in Linux than just those for the Ethernet card and Point to Point Protocol (PPP), but these are the two most common methods. For example, you could use PLIP (Parallel Line IP), ATM, Frame Relay, or AX.25.

TCP/IP

The Transmission Control Protocol / Internet Protocol (TCP/IP) is the way that UNIX machines talk to each other. This is also the primary way of connecting to and using the Internet.[2] The entire TCP/IP world (as it's defined right now, anyway) is based on a 32-bit number. This allows for about four billion hosts[3] to all be on the Internet and talking to each other. For us humans to figure this out, these 32-bit numbers are referenced by four 8-bit bytes, also known as an IP address; for example, 192.33.4.10. For the further sanity of the human race, these IP addresses can also be referenced as names (ns.psi.net) to make it easier for us to use. Note that these two addresses are not the same. Linux prefers using numbers, and we humans prefer using names. The middle ground comes in the form of the DNS (Domain Name Service), which allows for mapping IP addresses to domain names, and vice versa.

DNS works with a root nameserver, which can be located in various parts of the world. When a user has their Web browser point to http://www.wayga.net, the machine asks the local DNS server to map that name to an IP address. The local DNS server first looks at the root nameservers. These root nameservers know that the nameserver for the wayga.net domain is 208.197.103.125. The DNS server then connects to 208.197.103.125 and requests the IP address for http://www.wayga.net. The DNS server at 208.197.103.125 responds by saying that www.wayga.net's IP address is 208.197.103.125. The local DNS server stores that IP address in its cache in case it's needed again and then provides that IP address to the user application. The user application completes the connection and up pops the Web page.

DNS servers really do more than this. They also provide for the first pass at mail routing, aliases for machine names, reverse DNS, and even give basic system and location information.

At an application or system level, TCP/IP has over 65,000 ports available for connecting. This allows for FTP, telnet, E-mail, WWW, DNS, and hundreds of other functions to happen all at the same time. When a Web browser connects to a server, Linux opens one of those unused ports and makes a connection to the server. The server monitors one specific port (port 80 for WWW), sees a connection request, opens an unused port on its side, and then tells the client what port is available for connection. Other important TCP/IP ports include port 25 (E-mail), port 23 (telnet), and ports 20 and 21 (FTP). A list of the known ports and their uses is kept in the /etc/services file. Note that for security reasons, ports lower than 1024 can be opened by root only. This is why the main Web server has to run as root, but its clients can run as other users.

TCP/IP has two main connection methods that you'll probably run into: UDP (User Datagram Protocol) and TCP (Telnet Control Protocol). UDP is a connectionless protocol. The packets are usually small, and interaction between the client and server really consists of a number of openings and closings of network connections. UDP is a bit faster and less resource-intensive than TCP, but does not guarantee transmission of a packet. NFS is a protocol that uses UDP. TCP is a connection-based protocol. The client talks to the server, the port is opened, and the connection begins. When the connection closes, it should be because both programs have finished their need for the network. TCP guarantees packet delivery, and most protocols (Telnet, HTTP, SMTP, etc.) use TCP, but the connections may be longer in time than UDP connections.

Ethernet

Ethernet was developed in the 1970s as a broadcast-style network. In the commonly used coax network, Ethernet cable was run in one long cable and each end was terminated with a 50-ohm resistor. Each machine that was on the Ethernet network hooked into this cable using a tap.

For machines to identify themselves, each Ethernet adapter has a unique address (Media Access Connector, or MAC address) assigned to it by the Ethernet adapter manufacturer. When an Ethernet adapter wants to talk to another Ethernet adapter, it sends a message containing its own MAC address, as well as the receiving MAC address, down the entire Ethernet cable. If the receiving MAC address is on that run, it gets the message. Collisions occur when two Ethernet adapters try to transmit at the same time. If this happens, both adapters stop transmission, wait a random amount of time, and retransmit. Having too many collisions indicates a network that has very heavy traffic and is running inefficiently. A link that has a high number of collisions should be broken up into two or more separate Ethernet runs.

Each Ethernet packet has to and from Ethernet addresses along with IP to and from addresses, followed by the data, and finally some error checking data to verify that a packet arrives complete. A typical Ethernet packet can be no larger than 1514 bytes. IPv4 takes up 40 bytes, and the Ethernet framing takes up another 18 bytes, leaving a maximum of 1456 bytes of data.

Even though all the other Ethernet adapters on a cable see a message, they do not answer or respond. The only message that all Ethernet adapters should receive is an Ethernet broadcast. Network monitors take advantage of this feature of Ethernet to give an overall view of a particular Ethernet run.

For a packet (say an IP packet) to get across a network to another Ethernet run, a router is used. The router doesn't look at the Ethernet header, but instead looks at the protocol being used. If the router knows that a particular packet needs to be forwarded to another network, it forwards the packet.

What allows Linux (and TCP /IP) to make connections between an Ethernet address and an IP address is the Address Resolution Protocol (or ARP) cache. When the Linux machine starts talking on an Ethernet network, it starts asking (via ARP) what the MAC addresses for other machines on the subnet are. Here's how it works:

Linux first sends an Ethernet broadcast asking for a mapping from an IP address to a MAC address. The receiving end with that IP address responds with an ARP reply, giving the IP address and its MAC address. Linux stores that MAC address in an ARP cache for future use. The cache times out every now and then, and this may happen several times a day. Don't worry, though—there are plenty of 10 Mbps for everyone on the network. If a packet has to go through a router to get somewhere else, Linux addresses the Ethernet packet to the router (or gateway), and the router then picks it up and forwards it to another network.

In the reverse situation, the BOOTP protocol involves a Reverse ARP (RARP) that announces its MAC address, asking which IP address to use. For diskless machines, or even Windows machines using Dynamic Host Configuration Protocol (DHCP), this is the way that these machines can get themselves configured. A machine that has RARP or DHCP running responds with the IP address and other information (the gateway and nameserver, for example).

Even though the Ethernet protocol is a standard, there are three main ways of actually implementing the physical layer. Thicknet is a 15-pin connection with very heavy gauge wire that is no longer in use. The best thing you can do with a thicknet connection is attach a transceiver on it to convert it to another physical layer.[4] Thinnet, or coax, runs one long wire, which has all the Ethernet adapters adding taps or T-connectors along the wire to connect. Coax is very inexpensive to implement, but a wiring problem anywhere along the cable can cause failure of the entire network. Coax also requires termination on both ends to keep the Ethernet signals from reflecting and causing network problems. With the large number of wires and connectors that can be on an Ethernet run, your chances of failure for a large-scale installation increase. The last, and preferable, setup is RJ-45, also known as 10-BaseT. 10-BaseT costs more, since you have to buy a hub, and is harder to implement, since a cable has to go from the hub to each individual machine, but only the failure of a hub would cause more than one person to have network trouble at the same time. If a wire from the hub were to become disconnected, no other users would be affected.[5] The RJ-45 connection also has the capability of running at 100 Mbps instead of the regular 10 Mbps, and most new cabling installations use Category 5 (Cat 5) cabling, which is required for 100 Mbps. Category 3 (Cat 3) is suitable for 10 Mbps.

Connecting to an Ethernet Network

To get hooked into an Ethernet network, get yourself an Ethernet card. Most should work, but you may want to check out the Ethernet HOWTO for a list of cards. For the most part, if it's from a major provider like 3Com, there is probably support for that card. Install the card in your machine and reboot. If the kernel recognizes your card, you're set for now. If not, recompile the kernel and be sure to add support for your particular Ethernet card. The first Ethernet card is usually designated eth0.

To add networking for this Ethernet card, you have to first initialize and set up the IP interface, then you have to set up routing for the interface you just set up. No, the two are not the same. The IP interface merely gives the kernel an IP address to work with. It still needs to know when a packet wants to go out and what interface it should use. Otherwise, you're likely to use the loopback interface and your packets will get nowhere fast.

The /sbin/ifconfig program will register the Ethernet card with the TCP/IP services. The typical syntax is:

/sbin/ifconfig eth0 netmask <addr> broadcast <addr> <IP address>

The netmask and broadcast addresses are given, followed by the IP address for the interface. The interface is automatically brought up if you give it a new IP address, so you don't need to explicitly tell the interface to start.

Now that you have that, you can get the routing set up:

route add default gw <address>

This sets up a route to your gateway (firewall, router, etc). This is set up to be the default route, so any packets that Linux cannot determine how to route will be sent to this address for further processing.

The Red Hat network configuration is an excellent tool for setting up your network devices. Get your IP address, nameserver information, gateway, and netmask from your network administrator. If you're the network administrator, look further in this chapter for instructions on finding this information. Under the Names section, verify the hostname, domain, and IP address for your nameservers. The Hosts section lists what IP addresses and hostnames you have in your /etc/hosts file. This should contain at least your IP address and hostname. If you have other hosts you want to list here, go ahead and add them.

The Interfaces section lists which interfaces are available to you. The lo0 interface is the loopback interface and is used to route TCP/IP packets to itself. Think of it as a virtual Ethernet interface. Changing it will cause problems with most other programs, including X.

You can next add the Ethernet interface and give the IP address and netmask. Don't turn on Configure Interface with BOOTP, but you can turn on Activate Interface at boot time. BOOTP is a protocol intended to dynamically assign IP addresses at boot time. The interface should be configured at boot time, so that once the machine starts, you can use the Ethernet network.

DHCP

DHCP stands for Dynamic Host Configuration Protocol. The purpose of DHCP is similar to BOOTP in that a client requests an IP address and gets one assigned to it. The similarities end there. DHCP provides much more configurability than BOOTP, including:

  • Dynamic host setup—You don't need to know what every machine's MAC address is to configure it for DHCP. If DHCP receives a request for an IP and it's configured with a pool of dynamic IP addresses, it will give those IPs out. This allows you to quickly get a client on a network.

  • Hostname, routing, log host, nameserver, and WINS information—All this can be sent to a client. WINS is really only good for Windows-based machines, but it can be a big help in configuring them on a network.

  • Works with Windows and Linux—Linux can be configured as a DHCP client or server, and Windows machines try to find DHCP information by default.

  • On-the-fly configuration—DHCP "leases" expire after a set time, and if you change a machine's configuration during that time, it will use the new configuration (even on MS Windows) without a reboot.

Aside from these features, why would you want to use DHCP on your network? The biggest advantage of DHCP is configurability. One central location stores networking information for an entire subnet. For setups where network settings are changed frequently (such as changing ISPs or changing a router IP address), all configuration is done in one location, as opposed to going to each client machine and changing the settings manually. As new machines are added to a network, they can be quickly put on the network using a dynamic IP address, then later changed to use a static IP address. This can make configuring a machine easy. For the convenience of visitors, anyone with a laptop and Ethernet card can pick up their email from the home office without tying up a phone line.

DHCP Configuration

Server Configuration

When installing DHCP on a network, the first question you should ask is: Do I want dynamic IPs or static IP addressing? That is, should hosts on the network get the same IP address every time they boot, or should you have a pool of addresses that you could use and assign as hosts request them? To us (you may do whatever you like), static IPs are the way to go in general. They allow you to use your existing DNS configuration and not have to worry about setting up a dynamic DNS server. It is advisable to leave 5 or 10 addresses available as dynamically allocated so that you can get a machine on the network temporarily.

There are two programs to give you access to DHCP services: the server software (dhcpd) and client software (dhcpcd). Note that you should have only one DHCP server on a network, and since the DHCP server also provides BOOTP services, you can turn off your existing BOOTP servers and use dhcpd instead. These packages exist on the Red Hat CD as dhcpd and dhcpcd. Also note that in some instances, dhcpd will be configured to automatically start on boot, so you should only install dhcpd on one machine per subnet.

The configuration file that dhcpd uses is /etc/dhcpd.conf. This file contains MAC addresses, IP information, and router/WINS/nameserver information. Two other files that get created when dhcpd is running are /etc/dhcpd.leases and /etc/dhcpd.pid. The .pid file contains the PID of the running dhcpd to make stopping or restarting dhcpd easier. The leases file is used if you have dynamic IP addresses being used in a network. It contains information about who is being leased IP addresses, and how long the leases last. In the event of a reboot or restart of dhcpd, the dhcpd.leases file should not be deleted as it is re-read on the startup of dhcpd to know what dynamic IP addresses have already been assigned.

Here's a sample configuration file for dhcpd, along with some running commentary:

# What's the DNS name of this server?
server-identifier wayga.auroratech.com;
#Also identify the DNS domain that clients will be under
option domain-name "auroratech.com";
#What DNS servers should clients look at? (put at least 2)
option domain-name-servers auratek.auroratech.com, row.auroratech.com;
# Define a Class C network (192.168.1.0->192.168.1.255)
subnet 192.168.1.0 netmask 255.255.255.0 {
#Set the network mask (again)
  option subnet-mask 255.255.255.0;
  option domain-name "auroratech.com";
  option domain-name-servers auratek.auroratech.com, row.auroratech.com;
#Define how long a lease for an IP address should be.
  default-lease-time 600;
#Max lease time, in case that's what the
# client requests.
  max-lease-time 7200;
#Specify the default router.
  option routers 192.168.1.142;
#The below IP range will be dynamically
# allocated to clients whose MAC address
# doesn't match any of the following hosts.
  range 192.168.1.46 192.168.1.50;
}
#A printer (called ipc)
host lpipc {
#MAC address for lpipc
   hardware Ethernet 0:60:b0:0f:c0:a9;
#It's FQDN (so that DNS knows what its IP is
# We could have used a plain IP address here, but why?
   fixed-address lpipc.auroratech.com;
}
#PC host
host camille {
  hardware Ethernet 0:0:bc:0f:12:d6;
  fixed-address camille.auroratech.com;
}
# PC host using a different default router.
host cyrus {
  hardware Ethernet 0:10:4b:a2:e2:4b;
  fixed-address cyrus.auroratech.com;
  option routers 192.168.1.95;
}

Client Configuration

The client side is easy to set up. Using the network configuration (netcfg), set the IP configuration to be DHCP and activate the Ethernet card. The dhcpcd program will automatically start, request an IP configuration from the DHCP server, and re-create any needed files such as /etc/resolv.conf for DNS information. Linuxconf (see Chapter 3) can also be configured to start up an Ethernet interface with DHCP.

You can also choose to edit files manually if you do not have X running. Look at /etc/sysconfig/network-scripts, and edit the file for your Ethernet card (usually ipcfg-eth0). Clear out any IP settings you don't want to keep, and set PROTOCOL to read DHCP.

Windows machines can merely be set for DHCP configuration via the Network Control Panel. Other UNIX machines (such as Solaris) may come with DHCP client software already installed, or you can download and compile the ISC DHCP distribution available at http://www.isc.org/.

If you choose to use all dynamic IP addresses on your network, you can use a program like lanlord (http://linux.uhw.com/software/lanlord/) to view what IP addresses have been assigned.

PPP

The Point-to-Point Protocol (PPP) is the way to connect to the Internet or a TCP/IP network via a dial-up line. As the name implies, PPP is designed to work between two machines and two machines only. This makes it ideal for dial-up applications, or even connecting remote locations via a leased line. Many 56-Kb links use PPP to carry IP traffic over the line.

PPP depends on one machine running pppd server on one end of the phone line, and a pppd client running on the machine dialing up (yours). Unlike Ethernet, you have to configure the software differently, depending on whether you're the client or the server.

PPP doesn't quite have the overhead of Ethernet since no MAC addresses are used. Also, some compression is added to the IP frames to boost the amount of data that can be sent in a packet.

Like Ethernet, PPP can carry more than just IP traffic. It can route IPX, AppleTalk, or DECNET along with IP over a PPP link. Linux does not really take advantage of this functionality, but not many people need it. Since SMB packets can be encapsulated inside TCP/IP packets, you can use Samba or NT shares over a dial-up line from Linux.

PPP Client

Setting up a PPP client requires a modem, phone line, a PPP server at some other phone number, and PPP support compiled into the kernel. Check the dmesg command to see if PPP support has been compiled into it. You can also check the /lib/modules/ directory for ppp.o and see if it was compiled as a module. If support is not compiled into it, recompile the kernel and reboot using the new kernel.

The quick way of verifying that a PPP connection works is by doing something similar to the following:

pppd connect 'chat -v "+" ATDTphone CONNECT "" ogin: login word:
  password' 
/dev/cua1 38400 debug crtscts modem defaultroute

The phone, login, and password are assigned to you by whomever is providing the PPP account. Also, change /dev/cua1 to be the location of your modem. Remember that /dev/cua1 under Linux is the same as COM2: under DOS and Windows. The chat command is used to dial the modem and provide the login and password information. Once chat returns success (that is, once it makes a successful connection), PPP takes over the line and starts a connection. The server and client negotiate settings like Maximum Transmit Units (MTU), compression, and a few other settings. This will take a few seconds, but once it's done, you should be able to use the /sbin/ifconfig command to examine the network connections. If you see a ppp0 listed, you're ready to go.

To use DNS, be sure to enter a valid DNS server that you can reach in the /etc/resolv.conf file. Add it as in the following:

domain wayga.net
nameserver 192.33.4.10

This sets the domain and default nameserver. If you know of other nameservers, you can enter them here.

All this configuration can be filled out in scripts using the Red Hat Network Configuration Manager. You merely have to enter the phone number, line speed, modem, login, and password. All the rest of the scripts are done for you.

PPP Server

To get the PPP server software running (which, coincidentally, is the same software as the PPP client), you must have IP forwarding and PPP turned on. This allows Linux to act as an ARP proxy and answer ARP requests for an Ethernet address. If you're using a multiport serial card, you should have the drivers for that in the kernel as well.

Once this is completed, assign a bank of IP addresses that are not in use and will not be in use. These will be the addresses used for incoming connections, and there should at least be as many available as you have phone lines. You don't want to run out of IP addresses, do you?

Once this is done, create new accounts for each user that will be connecting via PPP. Many places use the name of the user with a P prepended to it. For example, if your normal dial-in name were mark, then your PPP dialup would be Pmark to signify a PPP connection. Have the user information in /etc/passwd look something like this:

Pmark:#56njvc893h:500:500:PPP user:/home/mark:/usr/local/bin/pppd

In the home directory of that user, create a .ppprc[6] file and add the following:

 -detach
modem
crtscts
lock
192.55.123.100:192.55.123.111
proxyarp

This gives PPP some initial settings to work with. The -detach says to not detach from the console. The modem says to monitor the CD (Carrier Detect) line and to terminate if CD drops. The lock will lock the device, preventing anyone else from using that serial port. The two IP addresses are the address of the server (waiting for the call) followed by a colon and the IP address to assign to the client when it dials in. The proxyarp allows the server to put the PPP client in its ARP cache and respond to packets that are supposed to go to the client.

Once this has been completed, set up getty to monitor the serial ports, and dial in to make sure that the static IP addresses work. The pppstats command can give a running total of packets in and out for the line.

If you choose to use dynamic IP addresses instead of static IPs to save on IP addresses, create a /etc/ppp/options.ttyXX file for each tty file that is attached to a modem. Replace the XX with the name of the serial port, for example, /etc/ppp/options.ttyS0 for /dev/ttyS0. The content of the options.ttyXX file is the same as the .ppprc file listed above.

INETD

The inetd meta daemon is used to start programs automatically when a request comes in on a specific TCP/IP port. What happens is that inetd monitors all the ports that are in its configuration file, and when a request comes in, it starts the application and returns to watching ports. There are two files that inetd needs to work: /etc/services and /etc/inetd.conf.

/etc/services

The /etc/services file contains information about a TCP/IP port number, and a name for the specified port which is later used in the /etc/inetd.conf file. It's not often that you'll need to add entries to this, but some programs may have you do it. Here's a portion of an /etc/services file:

chargen        19/tcp ttytst source
chargen 19/udp ttytst source
ftp-data 20/tcp
ftp  21/tcp
telnet 23/tcp
smtp 25/tcp      mail
time 37/tcp      timserver
time 37/udp      timserver
rlp  39/udp        resource # resource location
name 42/udp      nameserver
whois 43/tcp nicname # usually to sri-nic
domain 53/tcp
domain 53/udp
mtp  57/tcp                     # deprecated
bootps 67/udp                # bootp server
bootpc 68/udp                # bootp client
tftp 69/udp
gopher  70/tcp               # gopher server

The first entry in the line is the service name. This is followed by the port number and the protocol (usually TCP or UDP), which are then followed by any aliases. As you can see above, the port where email comes in is called the smtp port and it is located on port 25. Its alias is mail, so you could run a command like:

[markk@wayga ~]$ telnet localhost smtp
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 wayga.ratatosk.org ESMTP Sendmail 8.8.5/8.8.5; Mon, 1 Sep 1997
  18:54:30 -040

and the telnet command would connect you to TCP/IP port 25 (where sendmail is currently running).

/etc/inetd.conf

The /etc/inetd.conf file takes the port information in the /etc/services file and tells inetd what ports to monitor. Here's a portion of a sample inetd.conf file:

# These are standard services.
#
ftp     stream  tcp  nowait  root
/usr/sbin/tcpd
in.ftpd-l -a
telnet    stream  tcp  nowait  root
/usr/sbin/tcpd in.telnetd
gopher    stream  tcp  nowait  root
/usr/sbin/tcpd gn

# do not uncomment smtp unless you *really* know what you are
# doing.
# smtp is handled by the sendmail daemon now, not smtpd.  It does # NOT
# run from here, it is started at boot time from /etc/rc.d/rc#.d.
#smtp stream  tcp nowait  root /usr/bin/smtpd smtpd
#nntp stream  tcp nowait  root
/usr/sbin/tcpd in.nntpd

The entries in this file are as follows:

  • Entry from /etc/services for what port to monitor.

  • stream or dgram (tcp is stream, udp is dgram).

  • Protocol (tcp or udp).

  • Options (wait or nowait). wait says to wait until the program has finished or returned before returning to watching the port. The nowait option says to not wait and return to monitoring the port. If nowait is selected, only one instance of a program will run at a time.

  • User to run as—this is usually root.

  • Path of the program.

  • Name of the program, and any options you'll want to add.

In the example from /etc/services, we made a connection to the mail port, but the inetd.conf example shows that smtp is not being monitored. What happened? For some high-throughput programs (httpd and sendmail are prime examples), you don't want to have a program constantly restarting since it takes a lot of time for a program to start initially. But, for a program that is already running to fork or spawn off a new process, the overhead is much less. Thus, it's better for programs like these to be constantly running and taking care of the connections themselves.

Programs like telnetd or ftpd don't need a lot of startup time, so inetd can handle starting up new copies as it needs them.

Network Applications

Now that the network is set up, what are you going to do with it? Most of the standard topics (Web, FTP, email) have already been covered, but the rest of this chapter will cover applications that work across the network for the benefit of everyone. DNS (the nameserver) and NFS (the network file server) are two such applications.

DNS

The nameserver is the program that matches an IP address (208.197.103.125) to a hostname ( wayga.net). It also provides for matching in the opposite direction as well, informing you that the machine that has the address 208.197.103.125 is called wayga.net. Since one of the jobs of a nameserver is to look up and cache DNS requests from client machines, it can be used at one end of a slow link (between two offices perhaps) and reduce the amount of DNS traffic across the link. It also has provisions for forwarding E-mail addressed from one host to another and can provide backups for particular hosts in case one Web server is busy while another is idle.

In any instance where you're connecting to a TCP/IP network, you'll want to use DNS[7] for hostname resolution. The setup of this is easily done by putting a few lines in your /etc/resolv.conf file:

domain wayga.net
nameserver 192.33.4.10

Modify wayga.net to be your domain name and change the IP address to be the nameserver provided to you by your ISP. This IP address is an actual nameserver, and if you don't know your local nameserver, this IP address should work in a pinch to get you up and running. You can also put multiple nameserver entries in here, and it will search in order until it makes a connection to a DNS server.[8]

If you plan on running named (the DNS server software) locally, you should change the IP address to read 127.0.0.1. Be sure to have a few other IP addresses in there in case named goes down.

Should You Be a DNS Server?

You should use the DNS server only in the following cases:

  1. You own a domain and want to control the DNS.

  2. You run a large network over a slow link.

  3. You have no connection to the Internet.

For item 1, many ISPs will offer to handle your DNS serving for you, but if you're in an environment where machines change frequently, it may be easier to do it yourself than wait for the ISP to update their tables. For item 2, named can act as a cache to store frequently used hosts, and this will reduce some of the traffic. In item 3 . . . well . . . if there's no other DNS host on your network, someone should do it, and it may as well be you. If you don't match any of these three, you probably don't need a DNS server running.

If you expect to be the primary or secondary DNS server to the outside world (i.e., the Internet), you'll have to make sure the DNS host is registered with the InterNIC or another top-level domain organization. See the chapter on interacting with Internet agencies for information on getting this set up.

Once you're ready to start serving DNS, you'll have to set things up on your machine to do DNS serving.

named.boot

The named.boot file contains configuration information to give to named once it starts. It really tells named three things:

  1. What directory the configuration files are stored in.

  2. What primary DNS services it provides.

  3. What reverse DNS services it provides.

There are a few other functions that named does, but they are a bit outside the scope of this chapter. A sample configuration file looks like this:

directory       /var/named
;
cache           .                               named.ca
;
primary         wayga.net                       named.wayga
primary         a-muse.org                      named.a-muse
primary         0.0.127.in-addr.arpa            named.local

In this case, named.boot is doing all three things. The directory statement tells named that any references to files are going to be in the /var/named directory. Next, it says that the cache file is going to be for all domains and is kept in the named.ca file. The three primary statements say DNS information for hosts is provided in the wayga.net and a-muse.org domains, and the information about those hosts is stored in named.wayga and named.a-muse, respectively. The third primary statement indicates that any reverse DNS requests on the 127.0.0 network (also known as the loopback device) are to be done looking at the named.local file.

named.ca

The named.ca file contains information about the root nameservers. If the local named program does not have the hostname information locally, it then starts looking for it in the root nameservers. Here's a section out of the wayga.net named.ca file:

.                       3600000 IN      NS      A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET.     3600000         A       198.41.0.4
;
; formerly NS1.ISI.EDU
;
.    3600000 NS    B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET.     3600000         A       128.9.0.107
;
; formerly C.PSI.NET
;
.                       3600000         NS      C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET.     3600000         A      192.33.4.12
;
; formerly TERP.UMD.EDU
;
.                       3600000         NS      D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET.     3600000         A       128.8.10.90
;
; formerly NS.NASA.GOV
;

DNS Database Records

Now let's look at the named.wayga file. This file has an example of many of the features you'll want in your files:

@               IN      SOA     wayga.net. enry.wayga.net. (
                1
                3600
                600
                3600000
                10800 )
                IN      NS      208.197.103.125
                IN      NS      208.197.103.21
wayga.net.      IN      A       208.197.103.125
galileo         IN      A       208.197.103.21
localhost       IN      A       127.0.0.1
wayga.net.      IN      MX      0 wayga.net.
                IN      MX      10 galileo
www             IN      CNAME   wayga.net.
mail            IN      CNAME   wayga.net.
ftp             IN      CNAME   wayga.net.
plan9           IN      CNAME   wayga.net.

The SOA indicates the Start Of Authority line. This line tells named which domain this file is working on. The SOA line is constant up to the point after the SOA. It then has the following information:

  • Machine name acting as the DNS server.

  • Contact name (replace the @ in the email address with a period).

  • Open parenthesis.

  • Serial number, which should be incremented every time you change the file—Since this is the first revision of the file, it has a serial number of 1.

  • Refresh time in seconds, or how often to recheck the SOA record —The 3600 says to refresh once an hour.

  • Retry time, or when a secondary server should retry contacting the primary server if something goes wrong.

  • Expire time, or when the secondary server should flush its cache if it can't contact the primary server.

  • Minimum time to live—This defines how long other servers should keep the records in their cache before flushing it out. If it's too short, named spends too much time requesting addresses it should already know, and if it's too long, the wiring IP information may be reported if a host changes ISPs or even IP addresses.

  • Close parenthesis.

  • NS (to indicate the nameserver).

  • Name of the nameserver host (the local host).

Once the SOA is complete, you can begin adding hosts. This entry has four sections to it:

  1. Name of the domain or hostname—If the name does not end in a period (.), the domain name (in our case, wayga.net) is appended. If the address ends in a period (.), it is assumed it is the Fully Qualified Domain Name (FQDN).

  2. IN—This separates the hostname from the rest of the record.

  3. Type of record—The record type can be any of the following:

    • A—Directly maps a hostname to an IP address. All other records must point to an A record.

    • MX—. Mail exchanger, which lists what hosts will accept E-mail for that host or domain. Before the record contents, you can indicate a number for preference. In the case of wayga.net, the mail host is itself, but if wayga.net is busy or unavailable, galileo will accept the E-mail instead.

    • CNAME—. Also known as an alias, as you can see. Ftp.wayga.net, www.wayga.net, and mail.wayga.net are all pointers to wayga.net. Any DSN requests for these hosts will receive the IP address for wayga.net.

    • HINFO—. May contain host information. This is not used very much, as it can give potential crackers information about your machine.

  4. Record contents—In the case of an A record, it's an IP address. For other records, it can be a hostname or system information.

Reverse DNS

If your machine is doing reverse DNS, the SOA is the same, but the records themselves are slightly different. First, as you can tell with named.boot, the IP address is reversed. Instead of the 127.0.0 network, it becomes 0.0.127.in-addr.arpa. Reverse the network you're using and use that as the domain in /etc/named.boot. Since the network for wayga.net is 208.197.103, the domain becomes 103.197. 208.in-addr.arpa.

The records for wayga.net and galileo.wayga.net would look like this if we were doing reverse DNS:

21     IN   PTR  galileo.wayga.net.
125    IN   PTR  wayga.net.

As you can see, the hostnames need a period (.) at the end, since reverse DNS can span physical IP addresses.[9] The record type is also different—PTR. The IP address needs only the portion of the network not already in the domain listed above.

Once this is complete, you can start named and verify your configuration with nslookup.

Configuring the Berkeley Internet Name Daemon 8.1 (BIND)

If you've decided to be a DNS server, be it a primary, secondary, or a mix of the two, you need to get (possibly compile) and configure BIND. It's very likely that named was installed when Linux was installed; if not, you can retrieve it from the official distribution sites at ftp://ftp.isc.org/isc/bind/ or any Linux distribution site.

As of version 8.1, the configuration filename and format have changed. Since the new version of BIND is or will be shipped with newer versions of every Linux distribution, we will go over the configuration of it.

The basic 8.1-style configuration file is named named.conf and lives in /etc. It has four types of statements: one controlling access, one describing the logging, one describing the more general options, and one or more describing the zone(s) it is a server for. Comments in the file can be delineated using C or C++ style comment syntax.

BIND comes with extensive documentation, but we will try to give the most important details of it here.

The options statement describes what IPs to listen for and what port to use. Firewalls can complicate things and will likely require that you use a privileged port. 53 is the default port and can be specified in this statement. Lastly, the working directory for named specified here, /var/named, is fairly widely used. The zone files and any other files specified in various statements will live here in the absence of any pathing information. There are many other options which can be controlled from here; most of them have reasonable defaults (see the documentation for details).

The logging statement simply controls the verbosity of the logging and where log messages are sent. Each category has various channels to which output is sent, and each channel can be customized with a channel statement. Logging can be controlled to fairly fine detail (consult the documentation for the gory details).

Controlling what clients your server will answer queries from is done via the acl statement. If you have a lot of mobile users, you may need to be pretty loose with access to the name service.

Finally, the guts of the configuration file are the zone statements. They describe what zones the server serves, either as a master or a slave (we ignore the stub type; read about it in the documentation). A master is just that, the master authority for information in that domain (zone). A slave is a secondary disseminator of zone information, but it gets all the zone data from the zone master; no changes can be made at the slave. There is one special type used when specifying the root nameservers. It is called a hint because the named.ca really just supplies a list of servers, some of which will have the current list of root nameservers.

For a slave zone, you must specify at least one master from which BIND can transfer the zone records. More than one can be specified. Only one will be the real master; the others will be other slaves, which will presumably have up-to-date zone records.

Below is a basic /etc/named.conf that will be used for some examples. Currently it will answer queries from any client.

options {
  directory "/var/named";
  /*
   * If there is a firewall between you and nameservers you want
   * to talk to, you might need to uncomment the query-source
   * directive below.  Previous versions of BIND always asked
   * questions using port 53, but BIND 8.1 uses an unprivileged
   * port by default.
   */
  // query-source address * port 53;
  listen-on { 127.0.0.1; 208.197.103.21; };
};


logging {
  category default {default_syslog; default_debug;};
  /* Uncomment to send debugging information to my own set of files */
  /*
  channel this_security_channel {
    file "named_security.log";
    severity info;
  };
  category security { my_security_channel; default_syslog;
  default_debug; };
  */
};

zone "." {
  type hint;
  file "named.ca";
};

zone "0.0.127.IN-ADDR.ARPA" {
  type master;
  file "named.local";
};     

zone "103.197.208.in-addr.arpa" {
  type slave;
  file "named.208.197.103";
  masters {
    208.197.103.2;
  };
};

zone "ratatosk.org" {
  type master;
  file "named.ratatosk";
};

zone "wayga.net" {
  type slave;
  file "named.wayga";
  masters {
    208.197.103.125;
  };
};

The first thing you are probably interested in is restricting the use of your nameserver.

There are five ACLs that named defines for you:

anyAllows all hosts
noneDenies all hosts
localhostAllows the IP addresses of all interfaces on the system
localnetsAllows any host on a network for which the system has an interface

Defining your own is simple; the syntax is acl name { address list }. name is an alphanumeric string and address list is a list of IPs, IP prefixes, or the name of another ACL. It is possible to negate elements with an exclamation point (!).

For instance, to exclude machines on your LAN, you could define this ACL:

acl notlocal { ! localnets; };

It is important to keep in mind that the matches are checked against the list from left to right; as soon as a match is found, the rest of the line is ignored.Consider these two ACL entries:

acl first { 10.10.10/24 ; ! 10.10.10.128; };
acl second { ! 10.10.10.128 ; 10.10.10/24; };

Only second will work the way it was intended: deny the IP 10.10.10.128 name service. Since the IP prefix is tested first and matches 10.10.10.128, the denied IP is never tested. Thus, the host you want to deny will be able to use your DNS server.

Using Your ACLs

Now that you have an idea of how to define ACLs, we'll show you how to use them.

You may want to restrict what hosts can get (transfer) your zone record to only your trusted DNS slaves, one of which we have specified in an acl statement as follows:

acl trusted_slaves {localnets; 205.157.230.253; };

zone "ratatosk.org" {
  type master;
  file "named.ratatosk";
  allow-transfer {trusted_slaves; 208.197.103.125; };
};

Other Important Options

listen-on [port]

This option specifies what IP address and/or port to listen to. The default port is 53. You can specify IP prefixes as well.

listen-on port 7777 { 208.197.103.200; };

If no listen-on is specified, the server will listen on port 53 on all interfaces.

include

This statement is used to include other files that contain valid configuration information, such as:

include "/etc/my_acls";

We've tried to cover the options you will most likely use. However, there are several potentially useful statements we haven't covered. You should spend some time looking at the documentation, which also includes some features that will be implemented in future releases.

nslookup

The nslookup program interacts with the nameserver to give IP information about a host or domain. This program will also allow you to examine things like A, MX, or CNAME records. When run with an option of a hostname, nslookup will contact the local DNS host and return information on that host as follows:

[markk@wayga named]$ nslookup wayga.net
Server:  wayga.net
Address:  208.197.103.125

Name:    wayga.net
Address:  208.197.103.125

[markk@wayga named]$

When run without any options, it puts you in an interactive mode, allowing you to enter hosts, set the kinds of queries, list hosts within a domain, and so on.

Entering a hostname from interactive mode will look up the host and return the results. The set type=X command will tell nslookup to report on only certain types of records (MX, PTR, A, CNAME, HINFO). Setting a type of ANY will search for all records.

[markk@wayga named]$ nslookup
Default Server:  wayga.net
Address:  208.197.103.125

> set type=ANY
> wayga.net
Server:  wayga.net
Address:  208.197.103.125

wayga.net       nameserver = 208.197.103.125.wayga.net
wayga.net       nameserver = 208.197.103.21.wayga.net
wayga.net       preference = 10, mail exchanger = galileo.wayga.net
wayga.net       preference = 0, mail exchanger = wayga.net
wayga.net
        origin = wayga.net
        mail addr = enry.wayga.net
        serial = 1
        refresh = 3600 (1 hour)
        retry   = 600 (10 mins)
        expire  = 3600000 (41 days 16 hours)
        minimum ttl = 10800 (3 hours)
wayga.net       internet address = 208.197.103.125
wayga.net       nameserver = 208.197.103.125.wayga.net
wayga.net       nameserver = 208.197.103.21.wayga.net
galileo.wayga.net       internet address = 208.197.103.21
wayga.net       internet address = 208.197.103.125
>

As you can see, this is a bit more information than you got earlier. The server command will allow you to request information from another server. This is good for debugging, since you can now ask a remote server for information about the domain you just set up and make sure the information is correct. The last command that is rather important is the ls DOMAIN command, which will list all the hosts under DOMAIN.. Using this on the domain you have just set up will verify that all hosts are being listed.

NFS

The Network File System (NFS) allows a server to export a directory or an entire filesystem to other systems. This feature provides for not only getting the most out of hard drives, but it can also allow a user's home directory to exist anywhere on the network, just as if it were local.

Setting up NFS for use is easy, as most Linux installations start up the necessary software at boot time. All that's left is to configure the NFS servers.

If NFS isn't started on bootup, all you need to do is fire up rpc.mountd and rpc.nfsd on startup. This is a script in the /etc/rc.d/rc3.d directory. The one other item that needs to exist is the /etc/exports file. The /etc/exports file lists what directories can be exported to other machines.

The /etc/exports file has a setup of the following:

directory               options

where directory is the directory to be exported, and options are any additional options to work on that export. The options are many and can provide different options per host. Any options not enclosed in a host are assumed to be for any hosts. Options can be the following:

  • insecure—. Allows non-authenticated access.

  • ro—. Mounts read only (good for use with insecure).

  • rw—. Mounts read write.

  • root_squash—. Prevents the root user from having any special access to the NFS drive by mapping UID 0 (root) to UID 65524.[10] This option is off by default.

  • no_root_squash—. Allows the root user to manipulate the partition as if it were local. This is turned on by default.

  • all_squash—. Same as root_squash, but does it for all UIDs.

  • no_all_squash—. No UIDs are squashed (default).

Options can be prefaced with a hostname to apply them to only that host.

/pub wayga(rw)

The wayga machine can mount the directory in read write mode for all users (the default). The ro option means read only.

/pub/foo wayga(noaccess)

The foo subdirectory is not accessible to wayga. The only thing that wayga will see is permissions for the foo directory, and an ls of it will return only "." and "...".

Remember that unless you have a firewall or packet filter up, all NFS access will be TCP/IP-wide, unless you specify a host or group of hosts that can access that particular NFS directory.

From the NFS client, assume root power, and let's mount the /pub directory from above:

mount -t nfs wooba:/pub /mnt/pub

There are only a few changes in the mount command from mounting a hard drive or CD-ROM. The filesystem type is nfs, and the device name is replaced with a host:directory combo.

To have directories mount automatically on startup, you can enter them into the /etc/fstab file, or use the Red Hat fstool to add the mounts. Remember to replace the device file with the host:directory combo, and use the filesystem type of nfs. Once the network is started and NFS service has started, the NFS directories will mount.

One problem with NFS is that if the NFS server goes down, or the network connection between the client and server is broken, the client can effectively stop while trying to do file access. This can even include the situation where an NFS directory is in your $PATH. Running a command that searches through the path will cause your machine to appear to hang. There isn't a cure for it at this point. Just be sure that the server doesn't crash. Other network filesystems are in the works that will prevent some of these problems, but they don't quite work yet. The other important point is to make sure your networking is working correctly.

One additional program you may want to look at if you have a large amount of NFS drives is the amd program. This program is an automount daemon, and it automatically mounts and unmounts drives as needed. It's a bit outside the scope of this chapter, but you can download the program and give it a try if you have a lot of partitions to mount.

AppleTalk

To round out the list of Linux-supported networking/file sharing protocols, we turn to AppleTalk. Using Linux as an Apple fileserver has several advantages, including:

  • No limit on simultaneous users. Apple's AppleTalk, however, sets a limit of 10 concurrent users. To go beyond this limit, you must upgrade to Appleshare, which isn't free.

  • It is extremely versatile. The Linux server can also, as discussed earlier, serve disks (possibly the same disks) via NFS, SMB (Server Message Block, aka Samba, used by the various Windows OSes), and IPX (Novell Netware).

  • You can take advantage of the superior remote access features of Linux, which none of the popular non-Unix-based OSes can rival.

  • Because Linux is truly multitasking and has less overhead than MacOS, performance will generally be better. Mac OS X, with its Unix kernel, will likely narrow this performance gap.

There are a couple of minor disadvantages. First, to provide the full functionality of the MacOS filesystem, AppleTalk and the daemons that manage the file sharing need to write some "hidden" (i.e., starting with a leading "."; MacOS will not see them) files that tend to junk up the filesystem somewhat. It does this to implement the full functionality of the MacOS filesystem.

Second, the MacOS filesystem (HFS) supports a very loose file naming convention. Linux supports this after a fashion. Considering how restrictive traditional UNIX file naming conventions are, it supports it very well. However, some characters must escape or be encoded somehow and thus filenames may look different when viewing them from the Linux side of things.

In addition to making disk volumes available via AppleTalk, netatalk can also make local printers available to your Macs or print to a network AppleTalk printer, which in turn could be made available to non-AppleTalk machines on your local area network (LAN).

Installing netatalk

If you are installing from RPM, which is recommended, installation simply involves downloading the latest netatalk+asun distribution from ftp://contrib.redhat.com or a mirror. Then install/upgrade by running rpm -U <rpm file>.

Configuring netatalk

In AppleTalk, there are two levels of access: guest and registered user. Being a guest user is basically like being the nobody user in UNIX: You have highly limited access to the server and typically can write only to areas that are world-writable. Often the guest account will also have printing privileges.

Under netatalk, users authenticate themselves using the user and password information in /etc/passwd, that is, they must have an account on the machine. If you don't want these users to have shell access, you can give them the shell /bin/false. This is analogous to what is done when setting up FTP-only accounts. If you would like to let your users change their passwords by logging in with ssh, telnet, or something similar, you can give them the shell /bin/passwd. If you choose to do this, be sure to add /bin/passwd to the /etc/shells file so that it is a valid shell.

In the configuration files for netatalk, you define which directories are available at the two levels of access, including the home directory of registered users, if wanted. For each instance of the AppleTalk daemon, you can specify a set of directories for guests and registered users to access.

Netatalk uses five configuration files. The RPM version also uses a sort of "meta" configuration file that serves to collect much of the configuration data in one place.

AppleVolumes.default and AppleVolumes.system

The AppleVolumes.default file lists directories to be shared. An entry of a tilde (~) will share the connected user's home directory. An optional second entry on the line will be used for the name of the volume. Otherwise, the name defaults to the last element of the path. Note that if you edit this in vi, a line with only ~ on it will appear no differently than other unused lines in the vi screen.

 #
 # Sample AppleVolumes.default
 #
 ~   # the user's home dir, will be named whatever the login name is
 /home/ftp/pub  "Public FTP Area"  # Share the public ftp area with an
                                   # appropriate name.
 /usr/local/Archives     # Share   the archive area, will be named
 'Archives'

AppleVolumes.system controls the mapping of file extensions to types that MacOS understands. You shouldn't have to do anything to this file except add new file extensions to it.

afpd.conf

The afpd.conf file holds configuration information for the AppleTalk file protocol daemon. With the RPM version and a small network, you will likely leave this file empty, making any minor configuration changes in /etc/atalk/config.

To set up virtual servers (in the sense that there is only one physical machine), this file is the way to go. Each entry starts with a server name and is followed by various options.

 #
 # Sample afpd.conf
 #
 -                                  # A server going by the hostname
 foobar -address 10.1.1.34          # Server named 'foobar' bound to a
                                   # particular IP

atalkd.conf

atalkd.conf controls the interfaces to which netatalk binds, and any network numbers or zones you want to assign to them. In its simplest, empty form, atalkd.conf lets atalkd bind to every interface it finds. If it can't find all the interfaces you want it to bind to, you will have to specify them here. The simplest entry is just the interface to bind to. Additionally, zone names, network, node, and AppleTalk phase can be specified.

The phase is either 1 or 2, the latter being the default. The important difference is support for multiple zones in phase 2.

If there is more than one interface, it will automatically route between them. If there are other routers on the network, they can give configuration information to the Linux/netatalk router.

If you have more than one network, AppleTalk will break them into zones. In this case, you will want to use atalkd.conf to tell your server what zone to present itself as being in. You can also configure atalkd to listen to multiple interfaces and route AppleTalk packets among them.

Minimal atalkd.conf for use with multiple AppleTalk zones looks like the following:

eth0 -zone "Production"

The zone is basically a free-form string, although it must be 31 characters or less in length.

Unless you are on a very large network, you can also let atalkd set up its AppleTalk address. If this is not the case, you will have to assign one (or get one, if you are not in charge of the assignment of these addresses). Addresses are specified by network and node, like this:

-addr 45.10

In this example, the 45 is the network, while 10 is the node on that network.

The -net option is used to specify which address range is covered in this zone. This option lets you set the address range, which is automatically detected at server startup. If you have no zones, this number is irrelevant. The first number corresponds to the first network address of coverage in this range, and the optional last number corresponds to the last address covered in the address range. The address range should include netatalk's address number set with the -addr net.node option.

For example:

-net 106-110

The -zone option sets the name of the zone that atalkd should represent when talking on the network. This option, as discussed before, is merely a means of classification. It will be authoritatively broadcast if the -seed option is used and there are routers on the network whose zones don't conflict with that given after the -zone option.

papd.conf

The AppleTalk printer daemon reads its configuration information from papd.conf. If the conf file is empty, it will make all entries in /etc/printcap available. If you only want to make a subset of your print queues defined in /etc/printcap, you can specify them in papd.conf.

 #

 # Sample papd.conf
 #
 # We make two print queues available: the default 'lp' and 'lpcolor'
 # a color laser printer
 #
 # For the first printer we also provide the location of the printer
 # device driver file and the operator name for spooling.
 #
 B&W Laser Printer:
   :pr=lp:pd=/usr/share/lib/ppd/HPLJ_4M.PPD:op=nobody:

 Color LP:
   :pr=lpcolor:

Printing to AppleTalk Printers

If you're a sole Linux user on an AppleTalk network, your first priority—and perhaps the reason you're installing netatalk in the first place—might likely be to enable printing to a network Apple printer.

Start netatalk if it's not already running. Next, probe the AppleTalk network to determine the name of the printer.

Running the nbplkup program with no arguments will list all object types in the default zone. This will typically give you a few screens of information, even on a small network:

 # /usr/local/atalk/bin/nbplkup
      HP Color LaserJet 5M:SNMP Agent 150.128:8
      HP Color LaserJet 5M:HP Color LaserJet 5 150.128:158
      HP Color LaserJet 5M:LaserWriter 150.128:157
      HP Color LaserJet 5M:HP Zoner Responder 150.128:155
            CIC-2 BobM 4M+:SNMP Agent 150.151:8
            CIC-2 BobM 4M+:LaserWriter 150.151:157
            CIC-2 BobM 4M+:LaserJet 4 Plus 150.151:158
            CIC-2 BobM 4M+:HP Zoner Responder 150.151:152
     Judith's Laserjet 4mv:SNMP Agent 150.130:8
     Judith's Laserjet 4mv:LaserWriter 150.130:157
     Judith's Laserjet 4mv:LaserJet 4V 150.130:158
     Judith's Laserjet 4mv:HP Zoner Responder 150.130:152
  XRX_DC230ST_08003E30CC89:LaserWriter 150.225:128
     ...

To show only LaserWriters:

 # /usr/local/atalk/bin/nbplkup :LaserWriter
  XRX_DC230ST_08003E30CC89:LaserWriter                      150.225:128
     Judith's Laserjet 4mv:LaserWriter                      150.130:157
            CIC-2 BobM 4M+:LaserWriter                      150.151:157

Let's set up the first printer returned as the default. To be thorough, we will also check the status of the printer:

# /usr/local/atalk/bin/papstatus -p XRX_DC230ST_08003E30CC89
spooler: ready
#

It appears to be okay. Next, let's test the printer by sending a file to it with pap:

# /usr/local/atalk/bin/pap -p XRX_DC230ST_08003E30CC89:LaserWriter
  links.ps
Trying 150.225:128 ...
spooler: ready
Connected to XRX_DC230ST_08003E30CC89:LaserWriter@*.
Connection closed.
#

To use the printer via the Linux lpr command, an entry in /etc/printcap for the printer must be made. (See the chapter on printing for an explanation of the details of printcap entries.) The important items to note are the AppleTalk name of the printer in the first line and the last two lines, which tell the printer daemon which input and output filters to use; in this case, the filters that come with the netatalk distribution.

 lp|LaserWriter 1|XRX_DC230ST_08003E30CC89:
        :sd=/usr/spool/laserwriter1:
        :lp=/dev/null:
        :pl#63:pw#85:
        :mx#0:
        :sh:sf:
        :lf=/var/log/lpd-errs:
        :if=/usr/lib/atalk/filters/ifpap:
        :of=/usr/lib/atalk/filters/ofpap:

The spool directory, status file, and lock file need to be set up next:

 # mkdir /var/spool/tlaserwriter1
 # chown root.lp laserwriter1
 # chmod 775 laserwriter1
 # touch laserwriter1/lock
 # chown root.root laserwriter1/lock
 # chmod 004 laserwriter1/lock
 # touch laserwriter1/status
 # chown root.root laserwriter1/status
 # chmod 664 laserwriter1/status

Now, start (or restart if it is already running) the printer daemon. Do this by running /etc/rc.d/init.d/lpd (re)start.

The "config" Metafile

This file is only present if you installed from RPM. It contains definitions for a number of variables used by the startup script installed at /etc/rc.d/init.d/atalk.

One of the variables you are likely to want to change is the maximum number of simultaneous connections, AFPD_MAX_CLIENTS. The default is 5, which, unless you have a very small network, will likely be too small. Other options you might want to change include enabling the guest account, setting its username, and choosing which daemons to run. If you do not need to share your print queues, set PAPD_RUN to No. Similarly, if you do not want to share any filesystems, set AFPD_RUN to No.

Note that some of the options in config are not actually supported yet and therefore shouldn't be turned on.

Hardware Considerations

There are a few hardware caveats related to Ethernet cards. Netatalk doesn't function on cards based on DEC's Tulip chip, though it appears that activating the interface in promiscuous mode has been reported to fix this problem. Also, the driver for your card must support multicasting; check the Ethernet HOWTO to determine if your card's driver does.

Aside from these functional considerations, the best hardware investment is a good, fast disk. Spend the extra money to buy a faster disk and/or faster disk controller.

Installing from Source

The latest netatalk-1.4b2+asun distribution can always be found at ftp://ftp.u.washington.edu/public/asun/. When you install from source, the installation is rooted at /usr/local/atalk by default. There, a nominal set of directories (bin, etc, include, lib, and man) is created for the netatalk binaries, config files, and so forth.

There are only a few differences between source-based installation and RPM-based installation. The config directory is /usr/local/atalk/etc. It contains the following configuration files: AppleVolumes.default, AppleVolumes.system, atalk. conf, afpd.conf,and papd.conf. There is no config file, so you will have to edit the startup script yourself to change or add options.

Second, the startup script is named rc.atalk. It is installed in /usr/local/atalk/etc/. You will need to add a line to /etc/rc.d/rc.local to call it upon bootup.

Lastly, as is the case for many network services, you will need to make a few entries in /etc/services as well (RPM does this for you), including:

 rtmp         1/ddp   # Routing Table Maintenance Protocol
 nbp          2/ddp   # Name Binding Protocol
 echo         4/ddp   # AppleTalk Echo Protocol
 zip          6/ddp   # Zone Information Protocol

Starting Netatalk

Once you have config files set up, invoke the rc.atalk script:

# /usr/local/atalk/etc/rc.atalk

This will take a minute or two as netatalk scopes out the network, registers itself, and so forth.

Now, go to one of your Mac clients and start the chooser. Select the new AppleTalk server, as shown in Figure 6-1, select the volumes to attach to, and watch them show up on your desktop!

Galileo is a netatalk server.

Figure 6-1. Galileo is a netatalk server.

Network Information Services (NIS and NIS+)

The Network Information Services (NIS) is a set of programs for managing users and various network services from one master server. Recently, an enhanced version of NIS, NIS+ has been introduced. NIS+ is more secure, works better in large networks, but is more difficult to set up.

NIS began life as Yellow Pages. Yellow Pages, however, is a registered trademark of British Telecom, so the name was changed. The original name's legacy is still around since most of the programs associated with NIS begin with "yp".

NIS stores its information in a set of directories and GDBM (GNU Database Management) files rooted in /var/yp. NIS refers to these files as "maps". The maps are then made available to other machines in the NIS domain (not the same thing as a DNS domain!) via RPC (Remote Procedure Calls). NIS also allows for secondary slave servers. Slave servers get their maps from the master and answer requests if the master is slow, much the same way secondary DNS servers work. Each subnet should have one (and only one) NIS server on it. Since clients can request NIS information through an IP broadcast, there should be one NIS slave server per subnet. Each of these slaves points to the master NIS server.

The NIS maps are built from the various setup files found mostly in /etc: passwd, group, hosts, services, aliases, and so on. It is not necessary to use every map. Often only the password and group maps are used, since most of the other files change infrequently.

One of the biggest problems with NIS is the security hole opened by broadcasting NIS requests. Anyone could set up a server that would have a chance of answering the requests. Recent versions of ypbind allow the specification of the domain server either by IP number or name.

NIS Client Setup

It is most likely that your first encounter with NIS will be as a client. Setting up your Linux machine to be an NIS client is fairly straightforward.

Red Hat makes the process of working in an NIS network easy with two scripts included with the system: /etc/rc.d/init.d/ypbind and /etc/rc.d/init.d/autofs. The second script is only needed if you have automount maps in your NIS server. You can also set NIS client configuration during the installation process. See the installation chapter for more information on this.

You should make sure that the time service is enabled in /etc/inetd.conf. If it is not, uncomment it and restart inetd.

You will need to set the NIS domain that you're in. Edit (or create) the /etc/defaultdomain file to have one line—that of the NIS domain you're in. Remember that NIS domains and DNS domains are not the same (did we mention this yet?). Newer versions of Red Hat (like the 6.0 release) use the /etc/yp.conf file to edit the NIS domain or a server to bind to.

By default, ypbind will send an IP broadcast through the network to find an NIS server. If the NIS server is on another network, or you want to prevent spoofing on the network, you can manually specify an NIS server to use. Edit the /etc/yp.conf file and add the hostname for the server. Make sure the host listed here is listed in /etc/hosts:

ypserver nisserver.host.com

In the examples below, we've assumed /etc/passwd is fairly minimal, containing entries for the superuser, various daemons, and so forth, but no mortal user entries.

To append the whole NIS password map to the local /etc/passwd file, add this line:

+::::::

You can customize access by adding additional lines starting with + or −. For example, deny the user cary access, but allow all others (at least to the extent they have on any other NIS client) like this:

+::::::
-cary

The "+::::::" entry is not mandatory. Additionally, you can control access by groups, using "@." This entry:

+cary::::::
+rachel::::::
+@plan9::::::
-paul
-enry

allows access for cary, rachel, and the group plan9. The users paul and enry (who are presumably in the aforementioned group) are denied.

It is also possible to override sections of information in the passwd map entry or to add users that don't exist in the NIS at all. For example, to give paul the shell /bin/tcsh, change rachel's home directory (and allow access to only them), and add a user surya, use entries like this:

+::::::
+paul::::::/bin/tcsh
+rachel:::::/local/home/rachel:
+:*:::::/bin/false
surya:IUg6jkhgT:506:100::/home/surya:/bin/bash

Next, make sure that the portmapper is starting. If you're using NFS, then the portmapper is already started. If not, use /etc/rc.d/init.d/portmap start to get it started. Finally, you can start with ypbind: /etc/rc.d/init.d/ypbind start. This will read the /etc/defaultdomain file, start the ypbind program, and connect you to the NIS server.

The nsswitch.conf File

The /etc/nsswitch.conf file determines the lookup order for all NIS information (unlike /etc/host.conf, which is only for host lookups). The example below is self-explanatory:

#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#          nisplus           Use NIS+ (NIS version 3)
#          nis               Use NIS (NIS version 2), also called YP
#          dns               Use DNS (Domain Name Service)
#          files             Use the local files
#          db                Use the /var/db databases
#          [NOTFOUND=return] Stop searching if not found so far
#
  passwd:     compat
  group:      compat
  shadow:     compat
  passwd_compat: nis
  group_compat: nis
  shadow_compat: nis
  hosts:      nis files dns
  services:   nis [NOTFOUND=return] files
  networks:   nis [NOTFOUND=return] files
  protocols:  nis [NOTFOUND=return] files
  rpc:        nis [NOTFOUND=return] files
  ethers:     nis [NOTFOUND=return] files
  netmasks:   nis [NOTFOUND=return] files
  netgroup:   nis
  bootparams: nis [NOTFOUND=return] files
  publickey:  nis [NOTFOUND=return] files
  automount:  files
  aliases:    nis [NOTFOUND=return] files

Automounter Client Startup

The automounter will (as the name implies) automatically mount partitions over NFS based on an NIS map. The two typical maps used are auto.home and auto.vol, which mount off of /home and /vol, respectively. If you have these maps in your NIS domain, you can start the Linux autofs automounter using the following command:

 /etc/rc.d/init.d/autofs start

It should be noted that the automounter under Linux performs some of the same functions as vold under Solaris. CD-ROMs, floppy disks, local volumes, and NFS filesystems can be automatically mounted when the user changes to a certain directory. By default, Red Hat 6.0 includes /misc/cd and /misc/kernel, which mount /dev/cdrom onto /misc/cd and ftp.kernel.org via NFS onto /misc/kernel. We mention the automounter with NIS, since that is the most frequently used reason for using it.

NIS+

NIS+ is Sun's successor to NIS. It has better security and handles a large number of clients. Historically, support for NIS+ under Linux was poor and limited to the client side only. Fortunately, recent Red Hat versions are based on glibc, which supports NIS+ more fully, though still not completely.

Despite this support, NIS+ is still much more difficult to use, particularly on the server end. We recommend that you only use Linux as an NIS+ client if you have to (if you are on a large network or are concerned about security) and not use Linux as an NIS+ server at all.

If you need to set up an NIS+ client, you will need to make a few changes to your system. First, you will need glibc 2.1 (for 32-bit systems, e.g., Intel machines) or glibc 2.1.1 (for 64-bit systems, e.g., Alpha machines). If you are running Red Hat 6.0, you have glibc 2.1.1 already. If not, you will need to upgrade glibc and recompile gcc/g++ against the new glibc. Both source and binary releases of glibc can be found at ftp://ftp.gnu.org/gnu/glibc.

Second, you need the NIS+ client programs. These programs can be found at ftp://ftp.kernel.org/pub/linux/utils/net/NIS+. You will need two files: nis-tools-1.4.tar.gz and pam_keylogin-1.1.tar.gz. Unpack and compile them.

Assuming your NIS+ server is set up to answer requests for your client (see your Solaris documentation for how to do this), you will need to set the NIS+ domain name as you would for NIS and then run nisinit as follows:

# nisinit -c -H <NIS+ server>

Edit /etc/nsswitch.conf, making sure the only service after publickey is nisplus (publickey: nisplus). Next, start keylogin. You should add keylogin to the rc boot up sequence so that it is the daemon started immediately after portmap:

# keylogin -r

Edit the /etc/pam.d/login file to match this:

#
# /etc/pam.d/login for use with NIS+
#
auth       required     /lib/security/pam_securetty.so
auth       required     /lib/security/pam_keylogin.so
auth       required     /lib/security/pam_unix_auth.so
auth       required     /lib/security/pam_nologin.so
account    required     /lib/security/pam_unix_acct.so
password   required     /lib/security/pam_unix_passwd.so
session    required     /lib/security/pam_unix_session.so

Lastly, edit nisswitch.conf. Basically, you will want to replace nis with nisplus.

Setting Up an NIS Master Server

Make sure that you have the ypserv package installed. If you need to install it, it can be found on the Red Hat CD, FTP site, or one of their mirrors.

Next, edit /var/yp/Makefile to add or remove the maps you will be serving. The line starting with all: contains the list of maps.

Now edit /var/yp/securenets and /etc/ypserv.conf. The first defines the IPs from which the server will answer requests. It is fairly simple and well-commented.

#
# Sample /var/yp/securenets
#
#
# Allow localhost access. This is necessary!
#
host 127.0.0.1
#
# Allow access from machines on the local network
#
255.255.255.0 10.10.10.0
#
# Access from two class C networks 209.1.2.0 and 209.1.3.0
#
255.255.254.0 209.1.2.0

The /etc/ypserv.conf file lets you further customize the server's behavior at the host or network level on a per map basis. There are two types of entries: options and access rules. Options have the simple format of <option>: yes|no, i.e., the option is either on or off. Access rules have the format host : map : security : passwd_mangle. Access rules are read until a match is found for the host and map being requested, then the rule is applied.

An option that is commonly turned on is dns. The following line would tell the NIS master to consult DNS if it finds a host in its host maps.

dns: on

The following lines simulate shadow passwords for a particular network for privileged ports (those numbered under 1024) and deny access to the maps to other hosts:

 10.10.10.0/255.255.255.0   : passwd.byname    : port       : yes
 10.10.10.0/255.255.255.0   : passwd.byuid     : port       : yes
 *                          : passwd.byname    : port       : yes
 *                          : passwd.byuid     : port       : yes

Next, start the portmapper:

# /etc/rc.d/init.d/portmap start

and then ypserv:

# /etc/rc.d/init.d/ypserv start

You can verify that things are running with the following:

# rpcinfo -u localhost ypserv
program 100004 version 1 ready and waiting

Now run ypinit to generate the maps in /var/yp from the files in /etc:

# ypinit -m

If you are setting up a slave server, run:

# ypinit -s master

and you're ready to get the clients connected!

Routing with Linux

To start routing with Linux, you first have to have two Ethernet ports. This doesn't mean two Ethernet cards, but you do need something like an Ethernet port and a PPP connection, or something similar. Routing allows you to connect two Ethernet networks with the Linux machine in the center. Unlike a switch, which connects two physical runs and segregates the two networks on an Ethernet layer, a router segregates at the IP layer. Each side of the router has its own subnet. This is good for things like PPP dialin servers, or to create links to remote offices, to create a safe network that holds the WWW, FTP, and email servers. In the case of Linux, a router can also act as a packet filter and to provide IP masquerade services.

Let's say that you're connecting two physical networks located in the same building (say the first and second floors). You have two Ethernet cables in your hand, hopefully of the 10-BaseT variety. Now what?

Get two Ethernet cards in your system, and use kerneld to load in the modules. You can verify the modules are loaded by using the dmesg command. The two Ethernet cards do not have to be the same type, but it helps if they're different, since this allows you to explicitly know which card is which. The example below has a 3Com 3c503 and a Digital 21140-based card.

The /etc/conf.modules looks like this:

alias eth0 tulip
alias eth1 3c503
alias char-major-14 off
alias sound off

options eth1 xcvr=1

Because of the above setup, we know that eth0 (the first Ethernet port) is going to be the tulip (which is the name for the Digital/Intel chip). The second Ethernet port is the 3C503 card. The last line that starts with options tells kerneld to pass xcvr=1 when loading the 3C503 module. This allows us to use the AUI port instead of the coax port on the card.

You may want to either change /etc/conf.modules and restart kerneld, or load the modules by hand the first few times to make sure you don't have any problems. If you're using kerneld to load modules, they won't get loaded until you actually use them. You can use the Red Hat netcfg program to start up both Ethernet cards on their respective networks.

Routing Using Red Hat netcfg

The netcfg program does many of the routing setups that would normally have to be done by hand automatically and on startup. These files get stored in /etc/sysconfig and are compatible with linuxconf's routing scheme.

Routing by Hand

These commands, entered by hand, will allow you to route between two networks:

/sbin/ifconfig eth0 192.168.1.10
/sbin/route add -net 192.168.1.0
/sbin/ifconfig eth1 192.168.2.10
/sbin/route add -net 192.168.2.0
/sbin/route add default gateway 192.168.1.15

If you use these in a file like rc.local, it will work, but it is not compatible with the way that linuxconf or netcfg stores its routing information. Make sure you're not conflicting with these other methods.

Here the machine is on two networks, 192.168.1.0 and 192.168.2.0, both class C with netmasks of 255.255.255.0 and broadcasts located at the .255 IP address. Since the netmasks and broadcasts are standard for class C, we don't have to tell ifconfig about them. As soon as ifconfig gets the message to start up, it activates the module (if necessary) and configures the device. The route tells the net-working section to pass packets for each kind of network to the specified Ethernet card. The final route designates a default location for packets that don't match any other route to go. In this case, it goes onto the 192.168.1.0 network to the machine with an IP address of 192.168.1.15. If this machine were acting as a company-wide router, this address would point to the router box installed by the ISP. Since Linux now knows how to route packets between the 1.0 and 2.0 networks, any packets that get directed to it to go to a network will automatically be sent there. So, 192.168.1.10 and 192.168.2.10 now become gateways for anyone on those respective networks.

This example only shows how to use static routing. There are other methods of routing, such as RIP (which is handled by routed), and OSPF (handled by gated). Since the networks we administer are not that large, and many configuration issues are only in a few locations, we prefer to use static routes so we know exactly what our networks look like. For some networks, you may need the above programs.

If you replace eth0 with ppp0, you now have a routing PPP dialin. The Linux machine is dialed into another machine, and is able to route data between the local Ethernet network and the remote PPP link. As previously mentioned, this method works for any two (or more) IP connections.

Security Issues

By default, all packets are allowed to pass between connected networks. If you want to implement some sort of security to prevent violation attempts, you'll need to get familiar with the built-in packet filtering tools ipfwadm and ipchains. The older 2.0 and 2.1 kernels used the ipfwadm command to implement packet monitoring, filtering, and accounting. The newer 2.2 and 2.3 kernels use ipchains, which implements all the functionality of ipfwadm plus some. See the next chapter for information on how to boost security between networks.

Internet Agencies

InterNIC

In the early 1990s, domains were free for the taking. If you filled out your template and sent in the form, you got yourself a domain name. Everyone thought this would go on forever, but alas...

In the mid 1990s, the National Science Foundation (NSF) started cutting off funding to the Internet and allowed commercial organizations to begin using the Internet to sell and advertise. The response was an explosive growth in the number of domains being added. This got into the hundreds of thousands per year. To impose some order on this and make up for some of the missing NSF funding, the InterNIC ( http://www.internic.net) was created to provide for a top-level DNS domain and to register new organizations within the United States. The downside to this was a new Internet fee: $70 for the first two years, then $35 each year after. After paying this fee, you are entitled to have your domain registered in the InterNIC database and your domain can be recognized by the rest of the Internet. This doesn't mean that the InterNIC will give you anything else, like DNS services or an Internet link. You will just have your domain name registered and a pointer to a DNS server. You're still responsible for getting Internet service and a DNS server.

The InterNIC only handles U.S. domains: .edu, .net, .org, .com, .gov, and .int. Other domains, such as .us or other country-based domains, are not registered with the InterNIC, and you'll have to find out who handles your regional DNS service to get registered with them. Many of these have a fee, but some (like .us) are free or have a smaller fee than the InterNIC. To register in the .us domain, go to http://www.isi.edu. The .us domain doesn't give the kind of general quality that, for example, .com would give. For example, instead of wayga.net, you'd probably get something like wayga.billerica.ma.us. but I could still build a domain under that such as ftp.wayga. billerica.ma.us. In some ways, this is preferable to just a .com domain since it allows you to specify the location of a site (ibm.armonk.ny.us) directly. Foreign companies have slightly different subdivisions and may subdivide by location, type of organization (commercial, educational, etc.), or a combination of these. To find out the contacts for a particular country's top-level domain, check out http://www.isi.edu/div7/iana/domain-names.html.

One other thing to remember about country codes is that they may not be what you think they are. For example, .ch is Switzerland, not China, and .ca is Canada, not California.

Registering a Domain

You'll need to have a domain name first. Take one that isn't already taken (obviously), and make sure the domain you take isn't a registered trademark of someone else. Sure, you could take mcdonalds.com, but their lawyers get paid more than yours, and there's more of them. The InterNIC does not take sides in these kinds of disputes, so don't think that just because you got a domain that you own it for all time.

There are a few choices when registering a domain. The .edu is for educational institutions (mostly colleges and universities—elementary and secondary schools usually get a state-based domain). The .com is for commercial organizations that don't necessarily provide Internet access or aren't necessarily based on the Web. The .org domain is for organizations, either formal or a group of people getting together (apache.org or linux.org, for example). The .net domain is for groups that resell Internet access or provide access to other groups. And the .gov and .mil are for the government and military, respectively. This leaves you with three probable choices: .com, .net, or .org. Pick the one appropriate for your organization.

Next, you'll need up to three people. One is the technical contact, one is the administrative contact, and the third is the billing contact. The technical contact is the person who typically registers the domain and is the Manager of Information Services (MIS). The administrative contact is probably your boss. The billing contact is the one who gets the bills. They can all be the same person if you wish. These names and addresses will be compiled into the database as well, giving a handle that you can use later at the InterNIC instead of reentering your address, phone number, name, and so on.

The last important items are the primary and secondary DNS servers. Since the InterNIC doesn't provide you with DNS service, you must enter the two hosts that will be able to provide IP addresses for your domain. Two are required so that one can act as a backup, in case the primary is down or busy.

The InterNIC also asks for information such as, "What does your organization do?" Fill in all the information requested and wait. In a few days, you'll get email saying the domain was added. If you're changing a domain, the administrative, technical, and billing contacts will receive requests from the InterNIC to verify the new information. This prevents one contact from changing information without the knowledge of the other two, and it prevents a cracker from changing domain information (for example, if microsoft.com were to point instead to linux.org). This is more a denial-of-service attack and was common until the InterNIC requested verification.

whois

The whois database is a hook directly into the InterNIC hosts and allows you to see domain information and get information on the people who run the domains.

The whois database not only lets you see information about a domain, but also about people. For example, since I own the wayga.net domain, I have an entry in the whois database (MK146). Looking up this information would give my name and E-mail address. Back in the early days, this was a great way to find someone's E-mail address. But since there are millions of people on the Internet now, the only people in the whois database are domain administrators.

Using whois is easy. Just type something like:

whois wayga.net

The original version of whois looked at an inappropriate whois database (nic.ddn.mil, which is for military use only). The Linux version of whois should point at the right server name, but if it doesn't, you'll have to replace whois with:

whois -h rs.internic.net wayga. net

After the whois command, you can list names or domains and get results from the InterNIC database on who owns a particular name or get contact information for the administrators of that domain. This is especially helpful if you're trying to track a cracker in your system and know what domain they're coming from. You can then contact the administrators of the domain and alert them.

CERT

The CERT Coordination Center was founded in 1988 to coordinate security problems on the Internet. It was founded after the great Internet Worm of the late 1980s and is located at Carnegie-Mellon University in Pittsburgh, Pennsylvania. If you don't know anything about the Internet Worm, either read The Cuckoo's Egg by Cliff Stoll or Cyberpunk: Outlaws and Hackers on the Computer Frontier by Katie Hafner and John Markoff. Both are excellent books and show some real-life examples of crackers and those who track them down. Anyway, CERT's purpose is to keep administrators aware of potential security holes in the OS or the software the OS runs. These security alerts often list the type of security hole, how it can be exploited, what versions are affected, and (if available) locations of patches or ways to prevent anyone from taking advantage of those holes. The comp.os.linux.announce group has posts every now and then from CERT related to Linux and programs it runs. Strangely enough, some of the security holes they have are not with Linux itself, but with the way a particular program was compiled, making the hole not a Linux problem at all, but a fault of whoever compiled that program.

If you have an intrusion that you need investigated, you can send an intrusion report to CERT and maybe they can help you track down the person responsible. Their Web site is http://www.cert.org/. It is probably best to give their site a visit before your site gets broken into so you can stay up-to-date with their advisories.

The Computer Incident Advisory Capability (CIAC) is run by the U.S. Department of Energy as something similar to CERT, but it primarily provides services for the U.S. Department of Energy (DOE) and its contractors. However, it does have a number of bulletins and advisory notes that may not be at CERT. It is also worthwhile to take a look at their site to keep up-to-date with security issues.

Summary

  • TCP/IP is the main protocol used by Linux.

  • Ethernet and PPP are the most common ways of using TCP/IP.

  • DNS provides name translation.

  • NFS allows you to share information across a network.

  • Netatalk allows you to communicate over AppleTalk.

  • NIS allows you to distribute login information.



[1] This can be your Internet Service Provider (ISP), employer, or university.

[2] Coincidence or conspiracy? You decide.

[3] There are a few hundred thousand IP addresses that aren't used because they're broadcast or reserved numbers. Don't worry if you think that we're running out of IP addresses too quickly. IPv6 has 128-bit IP addresses (that's a 39-digit number for those of you without calculators).

[4] We lied a bit. Thicknet provides for electrical isolation in areas where you might have a ground loop domain problem; for example, going between different floors in a multi-story building. Some 10-BaseT hubs have this capability as well.

[5] Unless, of course, you are the disconnected user.

[6] You could presumably have the home directory for Pmark and mark in the same location, but be sure to have the .ppprc file unwritable by anyone but root.

[7] Yes, even if you're using NIS.

[8] Note that the search stops after the response from the first DNS server. If the first DNS server replies host not found, the search stops there.

[9] As it is, wayga.net is part of someone else's IP network. That's why we don't do reverse DNS. If someone did a reverse DNS lookup on us, it would report a different domain.

[10] Also known as the nobody user.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.131.47