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

📄 tyt09fi.htm

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

<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">$ netconfig

Currently 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 driver

Available options:

  1. Add a chain

  2. Remove a chain

  3. Reconfigure an element in a chain

  q. Quit

Select 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 UNIX

Select 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 localhost

PING localhost (127.0.0.1): 56 data bytes

64 bytes from localhost (127.0.0.1): icmp_seq=0 ttl=64 time=10 ms

64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0 ms

64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0 ms

64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0 ms

64 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 loss

round-trip min/avg/max = 0/2/10 ms

# ping -c5 147.120.0.1

PING 147.120.0.1 (147.120.0.1): 56 data bytes

64 bytes from merlin (147.120.0.1): icmp_seq=0 ttl=64 time=0 ms

64 bytes from merlin (147.120.0.1): icmp_seq=1 ttl=64 time=0 ms

64 bytes from merlin (147.120.0.1): icmp_seq=2 ttl=64 time=0 ms

64 bytes from merlin (147.120.0.1): icmp_seq=3 ttl=64 time=0 ms

64 bytes from merlin (147.120.0.1): icmp_seq=4 ttl=64 time=0 ms

--- 147.120.0.1 ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 0/0/0 ms</FONT></PRE>

<P>In the preceding example, issued on the server merlin with IP address 147.120.0.1, I used the ping command with the -c option to specify how many packets to send. As you can see, both the localhost and IP address responded properly, indicating that the TCP/IP software is properly loaded and the IP address is recognized.

<BR>

<P>As you saw earlier today, UNIX TCP/IP networking software relies on several files for configuration. These were summarized in Table 9.2. You can look at each of these files now with respect to the SCO UNIX server on the sample network.

<BR>

<P>The /etc/hosts file contains the names of the other machines on the network and their network addresses. The file looks like this:

<BR>

<PRE>

<FONT COLOR="#000080">#      @(#)hosts    1.2 Lachman System V STREAMS TCP  source

#      SCCS IDENTIFICATION

127.0.0.1           localhost tpci

147.120.0.1         merlin merlin.tpci.com

147.120.0.2         freya freya.tpci.com

147.120.0.3         brutus brutus.tpci.com

147.120.0.4         megan megan.tpci.com_

147.120.0.10        whitney whitney.tpci.com

147.120.0.11        sinbad sinbad.tpci.com

147.120.0.12        pepper pepper.tpci.com</FONT></PRE>

<P>Each line contains the local machine name and its full name with the domain so that either version is recognized by the operating system. As new machines are added to the network, new lines are added to the file. The local machine has two entries in the file: one for the local name and one for localhost.

<BR>

<P>The /etc/networks file holds a list of network names and their addresses. This is an optional file as far as most TCP/IP installations are concerned, and most system administrators use it only when the users need it. The /etc/networks file lets you name networks in the same way as machines. The following example shows some of the SCO network machines as well as two networks that the local machines frequently connect to. Using the name maclean_net as part of a machine identifier supplied by a user is now possible because the operating system can resolve it to its IP address through this file.

<BR>

<PRE>

<FONT COLOR="#000080">#      @(#)networks 1.2 Lachman System V STREAMS TCP  source

#      SCCS IDENTIFICATION

loopback       127

sco            132.147

sco-hq         132.147.128

sco-mfg        132.147.64

sco-engr       132.147.192

sco-slip       132.147.32

sco-tcplab     132.147.160

sco-odtlab     132.147.1

maclean_net    147.50.1

bnr.ca         47</FONT></PRE>

<P>On Day 6 &quot;Telnet and FTP,&quot; you examined the /etc/services file. It includes information about all the TCP and UDP services supported by the system. For the sample network and most small networks, the default values are acceptable. These entries are changed only if a service is being removed from TCP/IP, such as to prevent Telnet access. The file looks like this:

<BR>

<PRE>

<FONT COLOR="#000080">#      @(#)services 5.1 Lachman System V STREAMS TCP  source

#

#    System V STREAMS TCP - Release 4.0

# Network services, Internet style

#

echo            7/tcp

echo            7/udp

discard         9/tcp         sink null

discard         9/udp         sink null

systat          11/tcp        users

daytime         13/tcp

daytime         13/udp

netstat         15/tcp

qotd            17/tcp        quote

chargen         19/tcp        ttytst source

chargen         19/udp        ttytst source

ftp             21/tcp

telnet          23/tcp

smtp            25/tcp        mail

time            37/tcp        timserver

time            37/udp        timserver

rlp             39/udp        resource       # resource location

nameserver      42/tcp        name           # IEN 116

whois           43/tcp        nicname

domain          53/tcp        nameserver     # name-domain server

domain          53/udp        nameserver

mtp             57/tcp                       # deprecated

bootps          67/udp        bootps         # bootp server

bootpc          68/udp        bootpc         # bootp client

tftp            69/udp

rje             77/tcp        netrjs

finger          79/tcp

link            87/tcp        ttylink

supdup          95/tcp

hostnames       101/tcp       hostname        # usually from sri-nic

tsap            102/tcp       osi-tp0 tp0

#csnet-cs       105/?

pop             109/tcp       postoffice

sunrpc          111/tcp

sunrpc          111/udp

auth            113/tcp       authentication

sftp            115/tcp

uucp-path       117/tcp

nntp            119/tcp       readnews untp   # USENET News Transfer Protocol

ntp             123/tcp

ntp             123/udp

nb-ns           137/udp         nbns netbios-nameservice

nb-ns           137/tcp         nbns netbios-nameservice

nb-dgm          138/udp         nbdgm netbios-datagram

nb-dgm          138/tcp         nbdgm netbios-datagram

nb-ssn          139/tcp         nbssn netbios-session

⌨️ 快捷键说明

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