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

📄 tyt09fi.htm

📁 一个学习tcp/ip协议的教程
💻 HTM
📖 第 1 页 / 共 5 页
字号:
# ping -c5 147.120.0.1PING 147.120.0.1 (147.120.0.1): 56 data bytes64 bytes from merlin (147.120.0.1): icmp_seq=0 ttl=64 time=0 ms64 bytes from merlin (147.120.0.1): icmp_seq=1 ttl=64 time=0 ms64 bytes from merlin (147.120.0.1): icmp_seq=2 ttl=64 time=0 ms64 bytes from merlin (147.120.0.1): icmp_seq=3 ttl=64 time=0 ms64 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 lossround-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 IDENTIFICATION127.0.0.1           localhost tpci147.120.0.1         merlin merlin.tpci.com147.120.0.2         freya freya.tpci.com147.120.0.3         brutus brutus.tpci.com147.120.0.4         megan megan.tpci.com_147.120.0.10        whitney whitney.tpci.com147.120.0.11        sinbad sinbad.tpci.com147.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 IDENTIFICATIONloopback       127sco            132.147sco-hq         132.147.128sco-mfg        132.147.64sco-engr       132.147.192sco-slip       132.147.32sco-tcplab     132.147.160sco-odtlab     132.147.1maclean_net    147.50.1bnr.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/tcpecho            7/udpdiscard         9/tcp         sink nulldiscard         9/udp         sink nullsystat          11/tcp        usersdaytime         13/tcpdaytime         13/udpnetstat         15/tcpqotd            17/tcp        quotechargen         19/tcp        ttytst sourcechargen         19/udp        ttytst sourceftp             21/tcptelnet          23/tcpsmtp            25/tcp        mailtime            37/tcp        timservertime            37/udp        timserverrlp             39/udp        resource       # resource locationnameserver      42/tcp        name           # IEN 116whois           43/tcp        nicnamedomain          53/tcp        nameserver     # name-domain serverdomain          53/udp        nameservermtp             57/tcp                       # deprecated

⌨️ 快捷键说明

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