⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tyt09fi.htm

📁 一个学习tcp/ip协议的教程
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<HTML><HEAD><TITLE>tyt09fi.htm</TITLE><LINK REL=ToC HREF=index-1.htm><LINK REL=Index HREF=tppmsgs/msgs0.htm#37><LINK REL=Next HREF=tyt10fi.htm><LINK REL=Previous HREF=tyt08fi.htm></HEAD><BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#0000FF VLINK=#800080><A ID=I0 NAME=I0></A><P><P ALIGN=CENTER><A HREF=tyt08fi.htm TARGET=_self><IMG SRC=blanprev.gif WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="Previous Page"></A><A HREF=index-1.htm TARGET=_self><IMG SRC=blantoc.gif WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT=TOC></A><A HREF=tyt10fi.htm TARGET=_self><IMG SRC=blannext.gif WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="Next Page"></A><HR ALIGN=CENTER><P><UL><UL><UL><LI><A HREF=#E68E84>The Sample Network</A></LI><LI><A HREF=#E68E85>Configuring TCP/IP Software</A></LI><LI><A HREF=#E68E86>UNIX TCP/IP Configuration</A></LI><UL><LI><A HREF=#E69E128>Configuring SCO UNIX</A></LI><LI><A HREF=#E69E129>Configuring Linux</A></LI><LI><A HREF=#E69E130>Configuring Solaris</A></LI><LI><A HREF=#E69E131>Configuring Windows NT Server</A></LI></UL><LI><A HREF=#E68E87>Testing the Server Configurations</A></LI><LI><A HREF=#E68E88>Pseudo ttys</A></LI><LI><A HREF=#E68E89>User Equivalence</A></LI><LI><A HREF=#E68E90>Anonymous FTP</A></LI><LI><A HREF=#E68E91>Configuring SLIP and PPP</A></LI><LI><A HREF=#E68E92>Remote Printing</A></LI><LI><A HREF=#E68E93>Configuring SNMP</A></LI><LI><A HREF=#E68E94>Summary</A></LI><LI><A HREF=#E68E95>Q&amp;A</A></LI><LI><A HREF=#E68E96>Quiz</A></LI></UL></UL></UL><HR ALIGN=CENTER><A ID=E66E9 NAME=E66E9></A><H1 ALIGN=CENTER><CENTER><FONT SIZE=6 COLOR=#FF0000><B>&#151; 9 &#151;</B><BR><B>Setting Up a Sample TCP/IP Network: Servers</B></FONT></CENTER></H1><BR><P>Over the past eight days I have looked at several aspects of the TCP/IP protocol family. Now it's time to look at how you can actually set up TCP/IP on a network. This chapter explains how the servers for a TCP/IP network are configured, and the next chapter examines client machines. In both chapters, I try to cover a wide range of machines and operating systems.<BR><P>In this chapter I look at how to set up four different types of servers: a Santa Cruz Operation (SCO) OpenServer 5 machine, a Linux machine, a Windows NT machine, and a Sun SPARCstation 5. All four servers are connected to the sample network, and any of them can be accessed by a client machine or other servers. Don't be too concerned if I am not going to use your particular version of UNIX, because most of the details of TCP/IP configuration are either identical or very similar across all UNIX versions. Usually all that changes is the directory name for some of the configuration files.<BR><P>As you know from earlier in this book, UNIX and TCP/IP are intertwined closely because the original implementations of TCP/IP were for UNIX systems. TCP/IP was developed for the BSD UNIX version that originated at the University of California at Berkeley, and much of the language of TCP/IP is hooked into the BSD versions. Most UNIX systems have moved away from BSD UNIX and have embraced System V Release 4, originally developed at AT&amp;T and now owned by the Open Software Foundation. SCO UNIX and SunSoft Solaris 2.4, both of which I use in this chapter, use the System V Release 4 version of UNIX, which provides some backward compatibility with BSD UNIX.<BR><P>In the next chapter I expand the coverage of TCP/IP on the sample network by looking at client implementations. I look specifically at how you can implement TCP/IP for DOS, Windows 3.<I>x</I>, and Windows 95. Any of the operating systems mentioned in this chapter can act as clients to any of the servers, as well.<BR><P>Most of the material covered in this chapter is familiar if you have read through the book in order. Some of it is summarized and shown again for quick reference, as well as for those who read the chapters out of order. If you get lost, you can consult the index for a pointer to more information.<BR><BR><A ID=E68E84 NAME=E68E84></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR=#FF0000><B>The Sample Network</B></FONT></CENTER></H3><BR><P>For this chapter I designed a dedicated TCP/IP network to show the steps you must follow to set up, configure, and test a TCP/IP implementation. The sample network relies on several servers, although many networks have only one. Also, I use several different types of servers to show you how they can be configured, whereas most real networks are not this diverse. All the machines are connected over an Ethernet network. In all, the sample network has four servers and three clients.<BR><P>Each of the seven machines on the network has its own name and IP address. For this sample network, the IP address mask has been randomly chosen as 147.120. The names of the machines have been chosen from my pets, although any unique name would do, of course. The sample network configuration is shown in Figure 9.1. Bear in mind that this network is constructed to show the different types of operating systems I examine in today's and tomorrow's material; it is unlikely that a real network would have such an odd mix of servers and clients.<BR><P><B><A HREF=09tyt01.gif>Figure 9.1. The sample TCP/IP network.</A></B><BR><P>The physical setup of the network is undertaken first. It involves installing a network interface card in each machine (except the SPARCstation, which has the network card as part of the motherboard). On each system you must ensure that any jumpers for interrupt vectors and memory I/O addresses do not conflict with any other card on that system. (Some of the cards are software programmable; some are set by jumpers or DIP switches.) All the boards used in this system are from different manufacturers to show the independent nature of the TCP/IP network.<BR><P>Cable must be run between all the machines, connecting the network interface cards together. In the case of Ethernet, the cables must be properly terminated. The sample network uses thin Ethernet, which closely resembles television coaxial cable. BNC Thin Ethernet connectors resemble a T, with cables attached to both ends of the T and the stem connected to the network card. Two of the machines form the ends of the cable and require a terminating resistor as part of their T. The SPARCstation normally uses an RJ45 connector (which looks like a wide telephone connector, so I used a transceiver to convert it to BNC).<BR><P>To test the physical network, it is easiest to wait until a couple of machines have had their basic software configuration completed. All the machines on the network do not have to be active, as long as the network cable is contiguous from end to end and each BNC connector is attached to a network card to provide electrical termination. If problems are found when the network is tested, the physical network is the first item to check. Some network monitoring devices can supply integrity information prior to installing the network, but these devices are not usually available to system administrators who are just beginning their installation, or who have a small number of machines to maintain (primarily because the network testers tend to be expensive).<BR><BR><A ID=E68E85 NAME=E68E85></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR=#FF0000><B>Configuring TCP/IP Software</B></FONT></CENTER></H3><BR><P>This section follows through the configuration of the TCP/IP software. The discussion applies equally to the UNIX, Windows, and DOS machines on the sample network (as it would to any other type of machine, such as a Macintosh). Filenames can change with different operating systems, but the general approach remains valid.<BR><P>Most operating systems and TCP/IP software packages provide several utilities, including menu-driven scripts that help automate the installation process of the TCP/IP applications. Some operating systems (notably older UNIX systems) still require manual configuration of several files using a text editor. To configure TCP/IP software properly, you must know several pieces of information before you start. The necessary information you need for each machine on the network follows:<BR><UL><LI><B>Domain name:</B> The name the entire network will use.<BR></LI><BR><LI><B>System name:</B> The unique name of each local machine.<BR></LI><BR><LI><B>IP address:</B> The full address of each machine.<BR></LI><BR><LI><B>Driver type:</B> Each interface to the network must be associated with a device driver, instructing the operating system how to talk to the device.<BR></LI><BR><LI><B>Broadcast address:</B> The address used for network-wide broadcasts.<BR></LI><BR><LI><B>Netmask:</B> The network mask that uniquely identifies the local network.<BR></LI><BR><LI><B>Hardware network card configuration information:</B> The interrupt vector and memory address of the network card.<BR></LI><BR></UL><P>The system domain name is necessary if the network is to be connected to other machines outside the local network. Domain names can be invented by the system administrator. If, however, the network is to interface with Internet or one of its service providers, the domain name should be approved by the Internet Network Information Center (InterNIC). Creating and registering a new domain is as simple as filling out a form (and recently, paying a small administration fee). Domain names usually reflect the company name, with the extension identifying the type of organization. The sample network uses the name tpci.com.<BR><P>As seen earlier in this book, the machine name is used for symbolic naming of a machine instead of forcing the full IP address to be specified. The system name must be unique on the local network. Other networks might have machines with the same name, but their network masks are different, so there is no possible confusion during packet routing. In most cases, system names are composed of eight characters (or less) and are usually all lowercase characters (in keeping with UNIX tradition for lowercase). The system name can be a mix of characters and numbers. Larger organizations tend to number their machines, and small companies give their machines more familiar names.<BR><P>The device driver instructs the operating system how to communicate with the network interface (usually either a network card or a serial port). Each interface has its own specific device driver. Most operating systems have device drivers included in their distribution software, although some require software supplied with the network card. Generic drivers are available for most network cards on bulletin board systems.<BR><P>With most operating systems, there are limits to the number of similar devices that are supported. SCO UNIX, for example, enables up to four Ethernet cards, two Token Ring adapters, four Serial Line Internet Protocol (SLIP) lines, and four Point-to-Point Protocol (PPP) lines. These limits should be enough for a machine on any network!<BR><P>The network card configuration must be known in order to install the device driver properly. Network cards usually have several configuration settings, depending on the system for which they are designed. For the PC-based machines in the sample network, each card must have a unique interrupt vector (called an IRQ) and a unique I/O memory address. IRQ and address settings on many of the newer network boards are software-configurable, making the installation and configuration much easier.<BR><P>Most network cards come with default settings that might conflict with other cards in the system. Users must carefully check for conflicts, resorting to a diagnostic program if available. UNIX users have several utilities available, depending on the operating system. SCO UNIX and most System V Release 4 operating systems have the utility hwconfig, which shows the current hardware configuration. The following example shows the hwconfig output and the output from the command with the -h option to provide long formatting with headers (making it is easier to read):<BR><PRE><FONT COLOR=#000080>$ hwconfigname=fpu vec=13 dma=- type=80387name=serial base=0x3F8 offset=0x7 vec=4 dma=- unit=0 type=Standard nports=1name=serial base=0x2F8 offset=0x7 vec=3 dma=- unit=1 type=Standard nports=1name=floppy base=0x3F2 offset=0x5 vec=6 dma=2 unit=0 type=96ds15name=floppy vec=- dma=- unit=1 type=135ds18name=console vec=- dma=- unit=vga type=0 12 screens=68kname=adapter base=0x2C00 offset=0xFF vec=11 dma=- type=arad ha=0 id=7 fts=stname=nat base=0x300 offset=0x20 vec=7 dma=- type=NE2000 addr=00:00:6e:24:1e:3ename=tape vec=- dma=- type=S ha=0 id=4 lun=0 ht=aradname=disk vec=- dma=- type=S ha=0 id=0 lun=0 ht=arad fts=stdbname=Sdsk vec=- dma=- cyls=1002 hds=64 secs=32$$ hwconfig -hdevice          address    vec  dma  comment======          =======    ===  ===  =======fpu                -        13   -   type=80387serial        0x3f8-0x3ff    4   -   unit=0 type=Standard nports=1serial        0x2f8-0x2ff    3   -   unit=1 type=Standard nports=1floppy        0x3f2-0x3f7    6   2   unit=0 type=96ds15floppy             -         -   -   unit=1 type=135ds18console            -         -   -   unit=vga type=0 12 screens=68kadapter      0x2c00-0x2cff  11   -   type=arad ha=0 id=7 fts=stnat           0x300-0x320    7   -   type=NE2000 addr=00:00:6e:24:1e:3etape               -         -   -   type=S ha=0 id=4 lun=0 ht=araddisk               -         -   -   type=S ha=0 id=0 lun=0 ht=arad fts=stdbSdsk               -         -   -   cyls=1002 hds=64 secs=32</FONT></PRE><P>This output is from the SCO UNIX servers set up for the sample network. It has the network Ethernet card already configured as device nat, which uses IRQ 7 (shown under the vec or interrupt vector column). The nat line also shows the memory address as 300&#150;320 (hexadecimal) and the device driver as NE2000 (a Novell NetWare-compatible driver). The address and vec columns show no conflicts between the settings used for the Ethernet card and other devices on the system. (The adapter entry is for a high-speed SCSI-2 card, which controls both the tape and the Sdsk device, the primary SCSI hard drive. All other entries should be self-explanatory.)<BR><P>DOS users can use the Microsoft Diagnostic utility, MSD.EXE, or one of several third-party tools such as Central Point PC Tools or The Norton Utilities to display IRQ vectors and memory addresses in use by the system. Some software even indicates which vectors and addresses are available for use.<BR><P>There is no need to have the same IRQ and memory address for each card on the network, because the network itself doesn't care about these settings. The IRQ and memory addresses are required for the machine to communicate with the network interface card only. The sample network used a different IRQ and memory address for each machine.<BR><P>IRQ and memory addresses are usually set on the network interface card itself using either jumpers on pins or a DIP-switch block. The documentation accompanying the card should provide all the information necessary for setting these values. Some recently introduced network interface cards can be configured through software, enabling the settings to be changed without removing the card from the system. This can be very handy when a user is unsure of the best settings for the card.<BR><P>The IP address is a 32-bit number that must be unique for each machine. If the network is to be connected to the Internet, the IP address must be assigned by the NIC (it is usually given to you when you register your domain name). Even if no access to the Internet is expected, arbitrarily assigning an IP address can cause problems when messages are passed with other networks. If the network is not connected to the outside world, a system administrator can ignore the NIC's numbering system and adopt any IP address. It is worthwhile, however, to consider future expansion and connection to other networks.<BR><P>As you might recall, the NIC has four classes of IP addresses in use depending on the size of the network. Each class has some addresses that are restricted. These are shown in Table 9.1. Most networks are Class B, although a few large corporations require Class A networks.<BR><BR><P ALIGN=CENTER><CENTER><FONT COLOR=#000080><B>Table 9.1. The NIC IP address classes.</B></FONT></CENTER><BR><CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><I>Class</I></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><I>Network Mask </I><I>Bytes</I></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><I>Number of Hosts </I><I>per Network</I></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><I>Valid Addresses</I></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>A<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>16,777,216<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1.0.0.1 to 126.255.255.254<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>B<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>65,534<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>128.0.0.1 to 191.255.255.254<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>C<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>254<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>224.0.0.0 to 255.255.255.254<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>D<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>reserved<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD></TABLE></CENTER><P>The network mask is the IP address stripped of its network identifiers, leaving only the local machine address. For a Class A network, this strips one byte, whereas a Class B network strips two bytes (leaving two). The small Class C network strips three bytes as the network mask, leaving one byte to identify the local machine (hence the limit of 254 machines on the network). The sample network is configured as a Class B machine with the randomly chosen IP address network mask of 147.120 (not NIC-assigned).<BR><P>The broadcast address identifies packets that are to be sent to all machines on the local network. Because a network card usually ignores any incoming packets that don't have its specific IP address in them, a special broadcast address can be set that the card can intercept in addition to locally destined messages. The broadcast address has the host portion (the local machine identifiers) set to either all 0s or all 1s, depending on the convention followed. For convenience, the broadcast address's network mask is usually the same as the local network mask.<BR><P>Broadcast addresses might seem simple because there are only two possible settings. Such addresses, however, commonly cause problems because conflicting settings are used on a network. BSD UNIX used the convention of all 0s for releases 4.1 and 4.2, whereas 4.3BSD and SVR4 (System V Release 4) UNIX moved to all 1s for the broadcast address. The Internet standard specifies all 1s as the broadcast address. If problems are encountered on the network with broadcasts, check all the configurations to ensure they are using the same setting. The sample network uses an all 1s mask for its broadcast address.<BR><P>The steps followed for configuring TCP/IP are straightforward, generally following the information required for each machine. The configuration steps are as follows:<BR><UL><LI><B>Link drivers:</B> TCP/IP must be linked to the operating system's kernel or loaded during the boot stage to enable TCP/IP.<BR></LI><BR><LI><B>Add host information:</B> Provide a list of all machines (hosts) on the network (used for name resolution).<BR></LI><BR><LI><B>Establish routing tables:</B> Provide the information for routing packets properly if name resolution isn't sufficient.<BR></LI><BR><LI><B>Set user access:</B> Configure the system to enable access in and out of the network, as well as establishing permissions.<BR></LI><BR><LI><B>Remote device access:</B> Configure the system for access to remote printers, scanners, CD-ROM carousels, and other shared network devices.<BR></LI><BR><LI><B>Configure the name domain server:</B> If using a distributed address lookup system such as Berkeley Internet Name Domain Server (BIND) or NIS, complete the name server files. (This step is necessary only if you are using BIND or a similar service.)<BR></LI><BR><LI><B>Tune system for performance:</B> Because a system running TCP/IP has different behavior than one without TCP/IP, some system tuning is usually required.<BR></LI><BR><LI><B>Configure NFS:</B> If the Network File System (NFS) is to be used, configure both the file system and the user access.<BR></LI><BR><LI><B>Anonymous FTP:</B> If the system is to enable anonymous FTP access, configure the system and public directories for this service.<BR></LI><BR></UL><P>You will use these steps (not necessarily in the sequence given) as the individual machines on the network are configured. The processes are different with each operating system, but the overall approach remains the same.<BR><BR><A ID=E68E86 NAME=E68E86></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR=#FF0000><B>UNIX TCP/IP Configuration</B></FONT></CENTER></H3><BR><P>Most UNIX TCP/IP operating systems rely on several files for configuration. These are summarized in Table 9.2. Remember that filenames can change with different implementations of the UNIX operating system, but the configuration information is consistent. I look at each of these files in more detail when I look at specific operating systems later today. These files apply only to UNIX usually; Windows NT, for example, uses a different set of tables.<BR><BR><P ALIGN=CENTER><CENTER><FONT COLOR=#000080><B>Table 9.2. TCP/IP UNIX configuration files.</B></FONT></CENTER><BR><CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>File</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Description</I></B></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>/etc/hosts<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Host names<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>/etc/networks<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Network names<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>/etc/services<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>List of known services<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>/etc/protocols<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Supported protocols<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>/etc/hosts.equiv<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>List of trusted hosts<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>/etc/ftpusers<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>List of unwelcome FTP users<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>/etc/inetd.conf<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>List of servers started by inetd</FONT></TABLE></CENTER><BR><P>For the sample network, modifying these files on any of the three UNIX servers (SCO UNIX, Linux, and SPARCstation) is quite easy. An ASCII text editor is all that is required. Verifying the contents is usually quite simple, too, because the tables on one machine are very similar to those on other machines, except for a few entries.<BR><BR><A ID=E69E128 NAME=E69E128></A><H4 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Configuring SCO UNIX</B></FONT></CENTER></H4><BR><P>SCO UNIX and SCO OpenServer 5 include several configuration utilities to help provide information for TCP/IP and to link the driver into the kernel correctly. This does not eliminate the need to edit the many configuration files manually and supply information about the other machines on the network. Most of the information in this section, although specific to SCO UNIX, is generally applicable to most UNIX operating systems, especially SVR4-compliant versions.<BR><P>Most UNIX-based networks have a main server machine that starts the network processes. This machine is sometimes called a <I>super server,</I> because any machine that runs network processes and accepts requests from other machines is a server. UNIX uses the process inetd (Internet daemon) as the master server for all network processes that are to be activated (usually contained in a single file called inetd.conf.) Hardware configuration requires linking information about the network card and protocol to the operating system kernel. The configuration is sometimes called a <I>chain</I>. The process is usually automated by a script file, requiring users to provide the interrupt vector number, the I/O memory address, and the type of card. The device driver for that network card is then rebuilt into the kernel so the driver is active whenever the system boots.<BR><P>On SCO UNIX systems, a utility called netconfig is used, prompting the user for the three pieces of information (IRQ, address, and card type) and then rebuilding the kernel. Under SCO OpenServer 5, you can perform the same tasks through a GUI-driven utility that performs the same tasks. This process is repeated for each network card on the machine. (The sample network has only one card in each machine, which is the most common configuration.) When started, the SCO UNIX netconfig program presents you with this screen:<BR><PRE><FONT COLOR=#000080>$ netconfigCurrently configured chains:  1. nfs-&gt;sco_tcp     nfs       SCO NFS Runtime System for SCO Unix     sco_tcp   SCO TCP/IP for UNIX  2. sco_tcp-&gt;lo0     sco_tcp   SCO TCP/IP for UNIX     lo0       SCO TCP/IP Loopback driverAvailable options:  1. Add a chain  2. Remove a chain  3. Reconfigure an element in a chain  q. QuitSelect option: Please enter a value between 1 and 3 ('q' to quit):</FONT></PRE><P>Because a TCP/IP device driver is being added, option 1 (Add a chain) is selected. Some users confuse the first configured chain in the list with a TCP/IP driver for the network and attempt to reconfigure it. The first driver listed in the previous output is a default value for NFS and should be left alone. It has nothing to do with the addition of a TCP/IP network card. The second chain listed in the configuration is the loopback driver, which should be created automatically for all SCO systems when the operating system software is installed.<BR><P>After indicating that a new chain is to be added, the system asks for the type of chain:<BR><PRE><FONT COLOR=#000080>Num    Name       Description  1.   lmxc       SCO LAN Manager Client  2.   nfs        SCO NFS Runtime System for SCO UNIX  3.   sco_ipx    SCO IPX/SPX for UNIX  4.   sco_tcp    SCO TCP/IP for UNIXSelect top level of chain to Add or 'q' to quit:</FONT></PRE><P>Option 4 is chosen because you are installing TCP/IP. LAN Manager and IPX/SPX are used for integration with DOS-based networks. The NFS Runtime System is added later if NFS is to be used on the network. I look at configuring NFS in more detail on Day 12, &quot;NFS and NIS.&quot;<BR><P>The netconfig utility then presents a list of several dozen network interface cards for which the system has default values. If the card installed in the system is shown, the entry for the card is chosen. If the card is not on the list, a compatible entry must be found. This sometimes requires digging through the network interface card's documentation for emulation or compatible values, or contacting the manufacturer. Drivers are usually available for Ethernet cards.<BR><P>The system then prompts for the IRQ the card is set for, followed by the memory address. After these are entered, the operating system creates the necessary entries in its internal configuration files to include the device driver for the network card. As a final step, the system asks if the user wants to rebuild and relink the kernel. This must be done if the new drivers are to be effective. After a system reboot, the drivers are active and can be tested with a ping command.<BR><P>You can ping the localhost first, followed by the IP address you have assigned for the SCO machine. This does not test the network connection, because the operating system doesn't bother using the network card when pinging itself. The test does, however, verify that the IP address is set properly and that the TCP/IP software is embedded in the operating system kernel. An example of this type of ping testing looks like this:<BR><PRE><FONT COLOR=#000080># ping -c5 localhostPING localhost (127.0.0.1): 56 data bytes64 bytes from localhost (127.0.0.1): icmp_seq=0 ttl=64 time=10 ms64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0 ms64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0 ms64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0 ms64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0 ms--- localhost ping statistics ---5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 0/2/10 ms

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -