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

📄 tyt09fi.htm

📁 tcpip 协议学习电子书籍 第一次上传东西
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<HTML>

<HEAD>

<TITLE>tyt09fi.htm</TITLE>

<LINK REL="ToC" HREF="index.htm" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/index.htm">

<LINK REL="Index" HREF="tppmsgs/msgs0.htm#3" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/htindex.htm">

<LINK REL="Next" HREF="tyt10fi.htm" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/tyt10fi.htm">

<LINK REL="Previous" HREF="tyt08fi.htm" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/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" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/tyt08fi.htm" TARGET="_self"><IMG SRC="blanprev.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/blanprev.gif" WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="Previous Page"></A>

<A HREF="index.htm" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/index.htm" TARGET="_self"><IMG SRC="blantoc.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/blantoc.gif" WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="TOC"></A>

<A HREF="tyt10fi.htm" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/tyt10fi.htm" TARGET="_self"><IMG SRC="blannext.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/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" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/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">$ hwconfig

name=fpu vec=13 dma=- type=80387

name=serial base=0x3F8 offset=0x7 vec=4 dma=- unit=0 type=Standard nports=1

name=serial base=0x2F8 offset=0x7 vec=3 dma=- unit=1 type=Standard nports=1

name=floppy base=0x3F2 offset=0x5 vec=6 dma=2 unit=0 type=96ds15

name=floppy vec=- dma=- unit=1 type=135ds18

name=console vec=- dma=- unit=vga type=0 12 screens=68k

name=adapter base=0x2C00 offset=0xFF vec=11 dma=- type=arad ha=0 id=7 fts=st

name=nat base=0x300 offset=0x20 vec=7 dma=- type=NE2000 addr=00:00:6e:24:1e:3e

name=tape vec=- dma=- type=S ha=0 id=4 lun=0 ht=arad

name=disk vec=- dma=- type=S ha=0 id=0 lun=0 ht=arad fts=stdb

name=Sdsk vec=- dma=- cyls=1002 hds=64 secs=32

$

$ hwconfig -h

device          address    vec  dma  comment

======          =======    ===  ===  =======

fpu                -        13   -   type=80387

serial        0x3f8-0x3ff    4   -   unit=0 type=Standard nports=1

serial        0x2f8-0x2ff    3   -   unit=1 type=Standard nports=1

floppy        0x3f2-0x3f7    6   2   unit=0 type=96ds15

floppy             -         -   -   unit=1 type=135ds18

console            -         -   -   unit=vga type=0 12 screens=68k

adapter      0x2c00-0x2cff  11   -   type=arad ha=0 id=7 fts=st

nat           0x300-0x320    7   -   type=NE2000 addr=00:00:6e:24:1e:3e

tape               -         -   -   type=S ha=0 id=4 lun=0 ht=arad

disk               -         -   -   type=S ha=0 id=0 lun=0 ht=arad fts=stdb

Sdsk               -         -   -   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>



⌨️ 快捷键说明

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