-->
Previous Table of Contents Next


Chapter 8
Linux Networking

This chapter covers:

  TCP/IP
  System administration and networking
  The fwhois command

Networking and Linux

One of the great appeals of the Linux operating system is its built-in networking connectivity. Instead of trying to make an operating system like DOS, Microsoft Windows, or MacOS deal with a network, you can work with Linux, where the network exists at the core of the operating system.

This is accomplished through TCP/IP (Transmission Control Protocol/Internet Protocol), which has become the lingua franca for networking in the UNIX world. Because UNIX-based systems were instrumental in forming the Internet and its predecessors, TCP/IP became the dominant protocol for communication on the Internet. TCP/IP is the major tool for networking UNIX-based computer systems, as most UNIX implementations contain support for TCP/IP. Other operating systems, such as DOS and OS/2, can also connect to TCP/IP networks, although this requires special add-on software.

Linux comes with full support for TCP/IP (provided you installed it when you installed Linux; if not, you’ll need to look at reinstalling Linux or recompiling your kernel). This support comes in the form of the NET-3 set of protocols and programs. On your end, connecting to a UNIX network via TCP/IP is merely a matter of making sure your PC is correctly hooked up to the network via Ethernet card and cabling.


NOTE:  Much of what’s involved with Linux networking is best performed at the sysadm level. If you’re a system administrator, you should follow your own configuration routines at the network level; after all, Linux installs and configures pretty much like any other PC UNIX on the network level. If you’re not a system administrator, we suggest you check out Olaf Kirch’s Linux Network Administrator’s Guide, which can be found on the accompanying CD-ROM or in print at your local bookstore.

In Chapter 1 we covered supported Ethernet cards. If you need more information about setting up your Ethernet card, check out the ETHERNET-HOWTO on the accompanying program CD-ROM, in the docs directory.

Linux also allows you to make a TCP/IP connection via telephone line, using the SLIP or PPP protocol. If you want to connect to the Internet via a dialup connection, you’ll need to use these tools. (We cover this in more depth in Chapter 9.)

Before you try using any of these tools, you should have some background in TCP/IP. We advise checking out Olaf Kirch’s Linux Network Administrator’s Guide, which has been printed by various sources (including the Linux Documentation Project and SSC).

In addition, the CD-ROM contains a very useful, detailed guide to TCP/IP networking and NET-3 in the form of NET-2-HOWTO, in the docs directory.

These guides should form the basis of your networking expertise. However, we’ll provide a short overview of TCP/IP networking here.

TCP/IP Basics

Under a TCP/IP network, every computer on the network is assigned an IP address, including your computer. If your Linux workstation is permanently connected to a TCP/IP network, this address will remain constant. (If you’re using a dialup connection to the Internet through a service provider, your IP address will be dynamically assigned when you login the service.) This address comes in four fields, such as 255.255.0.0. This breaks down to:

subdomain.subdomain.domain.domain

You will find detailed information on IP addresses, how they’re structured, and how you can acquire them on the second accompanying CD-ROM. We’re not going to spend a lot of time on the intricacies of IP addresses; it’s an involved subject beyond the reach of this book.

From your end, IP addresses are important for connecting to another computer on the network. (By this, we mean the entire network, which can include the rest of the world if you’re connected to the Internet.) However, in many situations you don’t need to know the specific IP address to make a connection, as you probably discovered when you see lists of Internet addresses (such as those found in Appendix A) without any IP addresses listed. Why’s that? Because early in the Internet’s development the decision was made to allow a Domain Name Server (DNS) to handle these dirty details. Your TCP/IP network (or your service provider) has a named DNS somewhere on the network. When you enter an Internet address like ftp.x.org or a mail address like reichard@mr.net, a lookup is performed on the DNS, which then makes sure that the mail or request is routed to the proper machine. If you’ve installed TCP/IP on your system, you’ll be running a daemon named named that handles the connections to the DNS.

The fwhois command connects to the DNS and returns information about a specific user or a domain name:


     gilbert:~$ fwhois mr.net

     Minnesota Regional Network (MR-DOM)

          511 11th Avenue South, Box 212

          Minneapolis, MN 55415



          Domain Name: MR.NET



          ....



          Record last updated on 16-Nov-93



          Domain servers in listed order:



          NS.MR.NET               137.192.240.5

          RS0.INTERNIC.NET          198.41.0.5

          RIVERSIDE.MR.NET          137.192.2.5

          SPRUCE.CIC.NET          35.42.1.100



     gilbert:~$ fwhois dfazio@mr.net

     Fazio, Dennis (DF202)          dfazio@mr.net

     Minnesota Regional Network (MR-DOM)

          511 11th Avenue South, Box 212

          Minneapolis, MN 55415



          Record last updated on 16-Dec-91

The fwhois command also lists users on your Linux system, even if you’re not connected to the Internet.


Previous Table of Contents Next