亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tyt07fi.htm

?? tcpip14study_14天學會TCPIP編程裁減移植_好書啊!
?? HTM
?? 第 1 頁 / 共 4 頁
字號:
<P>TCP/IP requires that each machine on the network have an IP address. Usually, each machine also has a unique symbolic name; otherwise, the IP address must be used for all connections to that machine. Most operating systems have a simple program that identifies the name of the local machine. UNIX systems have the utility hostname for this purpose, as well as the uname program, which can give the node name with the command uname -n. The uname utility is usually supported in System V and compatible operating systems only.

<BR>

<P>The host name is sometimes saved in a separate file that is read when the operating system starts up, or it can be read from one of the configuration files mentioned previously. The hostname is used by most protocols on the system and by many TCP/IP applications, so it is important for proper system operation. The host name can sometimes be changed by editing the system file that contains the name and then rebooting the machine, although many operating systems provide a utility program to ensure that this process is performed correctly.

<BR>

<P>On many UNIX systems, the hostname and uname commands echo back the local machine name, as the following sample session shows:

<BR>

<PRE>

<FONT COLOR="#000080">$ hostname

tpci_sco4.tpci.com

$ uname -n

tpci_sco4</FONT></PRE>

<P>On the SCO UNIX system used in this example, the hostname command returns the fully qualified domain name, whereas the uname command provides the local machine name only. On a Hewlett-Packard workstation running HP-UX, both commands return only the local machine name. The exact behavior of the hostname and uname commands is therefore quite dependent on the implementation.

<BR>

<P>On a Linux system, for example, the hostname command can be used to not only show the current host name setting but also to change it when used with the -S (for set) option. For example, the command

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">hostname -S willow.tree.com</FONT></PRE>

<P>changes the local fully qualified domain name to willow.tree.com. Not all versions of Linux support the -S option of the hostname command.

<BR>

<P>Most TCP/IP suites for other operating systems use a simpler method of setting the host name. For example, on a Windows 3.<I>x</I> machine the NetManage ChameleonNFS package uses the dialog shown in Figure 7.2 to quickly set the host name.

<BR>

<P><B><A HREF="07tyt02.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/07tyt02.gif">Figure 7.2. ChameleonNFS uses this dialog to set </B><B>the host name.</A></B>

<BR>

<P>Windows NT has TCP/IP services built into the basic distribution. On a Windows NT system, the host name is specified through the Network dialog opened from the Control Panel, as shown in Figure 7.3. Both the Windows NT and Windows 3.<I>x</I> systems enable a change in the host name to be made effective immediately, although a system reboot is recommended to clear all configuration information held in memory.

<BR>

<P><B><A HREF="07tyt03.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/07tyt03.gif">Figure 7.3. Setting the host name through the </B><B>Windows NT Network Control Panel.</A></B>

<BR>

<P>A potential problem can occur when the local machine is <I>multihomed,</I> or based in several networks with a different name and IP address for each network. The single name in the configuration file in such an installation might not provide enough information to permit proper routing over all the connected networks. This problem is seldom encountered, but it does require the system administrator to set the hostname for each network carefully.

<BR>

<P>Aside from the simple machine name query shown, the hostname system is a full protocol that enables access to the Network Information Center (NIC) tables to verify addresses and obtain information about the network, gateways, and hosts. It uses TCP port number 101 to connect to the NIC. This type of access is usually restricted to the network administrator.

<BR>

<BR>

<A ID="E68E70" NAME="E68E70"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>The Loopback Driver</B></FONT></CENTER></H3>

<BR>

<P>The <I>loopback driver</I> is probably the most fundamental and often-used diagnostic available to an administrator. A loopback driver acts as a virtual circuit, enabling outgoing information to be immediately rerouted back to an input. This enables testing of the machine's circuits by eliminating any external influences, such as the network itself, gateways, or remote machines. By convention, each machine uses the IP address 127.0.0.1 for the loopback driver (also called the localhost IP address).

<BR>

<P>Every system should have a loopback driver in place whether the machine is on a network or not. This is because some applications insist on having an IP address they can access to function properly. Many license servers on a UNIX machine have this requirement, for example. Although the need for a loopback driver isn't important for non-networked Windows and similar operating system machines, a loopback driver is always installed with a TCP/IP suite.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>

<IMG SRC="note.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/note.gif" WIDTH = 75 HEIGHT = 46>By using a loopback driver, an administrator can be sure that the local machine is working properly and that any failures are from further out. Also, some applications insist on having a loopback driver IP address in order to function properly.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>Loopback drivers are usually embedded as part of the operating system kernel, or sometimes as an add-on utility program. Most multiuser systems employ an embedded loopback driver. UNIX is a good example: within the kernel is a device driver specifically designed to act as a loopback driver. The loopback driver is almost always added automatically when the operating system is installed, but a few UNIX-based operating systems, including several versions of Linux, don't perform this function, and the loopback driver must be added manually by the system administrator. As previously mentioned, several configuration files on the system contain the address of the loopback's connection, such as /etc/hosts.

<BR>

<P>Using the loopback driver to reroute the output stream, the network interface card (usually an Ethernet card) is bypassed. The loopback driver is useful for testing TCP/IP software installations, because it immediately shows any problems with the local configuration. This can be done before the machine is physically connected to the network or even before the networking hardware and software are installed. For example, you can use the loopback driver to test your TCP/IP configuration before it is connected to a network by using the ping command with the localhost name or IP address, as the following example shows:

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

PING 127.0.0.1 (127.0.0.1): 56 data bytes

64 bytes from localhost (127.0.0.1): icmp_seq=0 ttl=64 time=0 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

--- 127.0.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 I used the ping command with the -c option to specify five pings, first with the localhost name (which /etc/hosts resolves to the IP address 127.0.0.1) and then with the IP address itself. If either command had failed, it would indicate a problem with either the /etc/hosts file (if the name localhost could not be resolved) or with the TCP/IP installation (if both commands failed).

<BR>

<BR>

<A ID="E68E71" NAME="E68E71"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Managing ARP</B></FONT></CENTER></H3>

<BR>

<P>The arp program manages entries in the system's Address Resolution Protocol (ARP) tables. You may recall that ARP provides the link between the IP address and the underlying physical address. For more information, see Day 2, &quot;TCP/IP and the Internet.&quot;

<BR>

<P>Using arp (or its equivalent in other operating systems), the administrator can create, modify, or delete entries in the ARP table. Typically, this has to be performed whenever a machine's network address changes (either because of a change in the network hardware or because of a physical move).

<BR>

<P>The arp program differs considerably between implementations and is seldom used by users, so examples of its use are left to the operating system's configuration and administration documentation.

<BR>

<BR>

<A ID="E68E72" NAME="E68E72"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Using </B><B>ifconfig</B></FONT></CENTER></H3>

<BR>

<P>The ifconfig program, or one like it, enables an administrator to activate and deactivate network interfaces, as well as to configure them. Access to the ifconfig program is generally restricted to a superuser or network administrator. Changes to the configuration can usually be made only before the system is fully operational (such as in single-user mode on a UNIX system). When issued, ifconfig essentially instructs the network layer of the kernel to work with the specified network interface by assigning an IP address, then issuing a command to make the interface active on the system. Only when the interface is active can the operating system kernel send and receive data through the interface.

<BR>

<P>The ifconfig program enables a network administrator to perform several useful functions on most operating systems:

<BR>

<UL>

<UL>

<P>Activate or deactivate an interface

</UL></UL>

<UL>

<UL>

<P>Activate or deactivate ARP on an interface

</UL></UL>

<UL>

<UL>

<P>Activate or deactivate debugging mode on an interface

</UL></UL>

<UL>

<UL>

<P>Assign a broadcast address

</UL></UL>

<UL>

<UL>

<P>Assign a subnetwork mask

</UL></UL>

<BLOCKQUOTE>

<BLOCKQUOTE>

<P>Assign a routing method

<BR>

</BLOCKQUOTE></BLOCKQUOTE>

<P>Examining all the options available to ifconfig would require several dozen pages. Because this material is rarely used and differs with each implementation, administrators are referred to their operating system documentation. As an example, the Linux version of the ifconfig command uses this general format:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">ifconfig <I>interface_type IP_Address</I></FONT></PRE>

<P><I>interface_type</I> is the interface's device driver name (such as lo for loopback, ppp for PPP, and eth for Ethernet), and <I>IP_Address</I> is the IP address used by that interface.

<BR>

<P>When used with only the name of an interface, ifconfig usually returns information about the current state of the interface, as shown in the following example. In this example, a query of both an Ethernet card (called ec0) and the loopback driver (called lo0) is performed. The status flags of the interface are followed by the Internet address, the broadcast address, and optionally a network mask, which defines the Internet address used for address comparison when routing.

<BR>

<PRE>

<FONT COLOR="#000080">tpci_sco1-12&gt; ifconfig ec0

ec0: flags=807&lt;UP,BROADCAST,DEBUG,ARP&gt;

     inet 146.8.12.15 netmask fffff00 broadcast

146.8.12.15

tpci_sco1-13&gt; ifconfig lo0

lo0: flags=49&lt;UP,LOOPBACK,RUNNING&gt;

     inet 127.0.0.1 netmask ff000000</FONT></PRE>

<P>The preceding example shows that the Ethernet connection ec0 is active (UP), able to transmit broadcasts (BROADCAST), and is in debugging mode (DEBUG). Also, the ARP protocol is active (ARP). You may recall that a broadcast message is sent to all machines on the local network by setting the host ID address to all 1s.

<BR>

<P>Once the ifconfig command has been run and an interface is active, many operating systems require the route command to be issued to add or remove routes in the kernel's routing table. This is needed to enable the local machine to find other machines. The general format of the route command on a UNIX or Linux system is this:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">route add|del IP_Address</FONT></PRE>

<P>Either add or del is specified to add or remove the route from the kernel's routing table, and IP_Address is the remote route being affected.

<BR>

<P>The current contents of the kernel's routing table can be displayed on some systems by entering the command route by itself on the command line. For example, on a Linux system that is set up only with the loopback driver, you see an output like this:

<BR>

<PRE>

<FONT COLOR="#000080">$ route

Kernel Routing Table

Destination    Gateway   Genmask   Flags  MSS  Window  Use Iface

loopback         *       255.0.0.0   U    1936  0       16  lo</FONT></PRE>

<P>The important columns are the destination name, which shows the name of the configured target (in this case only loopback), the mask to be used (Genmask), and the interface (Iface, in this case /dev/lo). You can force route to display the IP addresses instead of symbolic names by using the -n option:

<BR>

<PRE>

<FONT COLOR="#000080">$ route -n

Kernel Routing Table

Destination    Gateway   Genmask   Flags  MSS  Window  Use Iface

127.0.0.1         *       255.0.0.0   U    1936  0       16  lo</FONT></PRE>

<P>Not all UNIX and Linux versions show this type of output from the route command.

<BR>

<P>The use of the ifconfig and route programs can be shown in the setup of a Slackware Linux system's Ethernet connection. To make the Ethernet interface active, the ifconfig command is issued with the Ethernet device name (eth0 on a Slackware Linux system) and the local IP address. For example, the command

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">ifconfig eth0 147.123.20.1</FONT></PRE>

<P>sets up the local machine with the IP Address 147.123.20.1. The interface is the Ethernet device /dev/eth0. The interface can then be checked with the ifconfig command using the interface name:

<BR>

<PRE>

<FONT COLOR="#000080">$ ifconfig eth0

eth0    Link encap 10Mps: Ethernet Hwaddr

    inet addr 147.123.20.1 Bcast 147.123.1.255 Mask 255.255.255.0

    UP BROADCAST RUNNING  MTU 1500 Metric 1

    RX packets:0 errors:0 dropped:0 overruns:0

    TX packets:0 errors:0 dropped:0 overruns:0</FONT></PRE>

<P>You may notice in the output that the broadcast address was set based on the local machine's IP address. This is used by TCP/IP to access all machines on the local area network at once. The Message Transfer Unit (MTU) size is usually set to the maximum value of 1500 (for Ethernet networks).

<BR>

<P>Next, an entry is added to the kernel routing tables to let the kernel know about the local machine's network address. The IP address that is used with the route command is not your local machine's IP address, but that of the network as a whole without the local identifier. To set the entire local are network at once, the -net option of the route command is used. In the case of the IP addresses shown earlier, the command would be this:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">route add -net 147.123.20.0</FONT></PRE>

<P>This adds all the machines on the network identified by the network address 147.123.20 to the kernel's list of accessible machines. An alternative method is to use the /etc/networks file. Once the route has been added to the kernel routing tables, it can be tested with the ping command.

<BR>

<BR>

<A ID="E68E73" NAME="E68E73"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>The </B><B><I>inetd</I></B><B> Daemon</B></FONT></CENTER></H3>

<BR>

<P>The inetd program is a holdover from the early days of TCP/IP UNIX development. When a UNIX machine was started, it would activate TCP/IP and immediately accept connections at its ports, spawning a process for each. This could result in many identical processes, one for each available port.

<BR>

<P>To control the processes better, the inetd program was developed to handle the port connections itself, offloading that task from the server. The primary difference is that inetd creates a process for each connection that is established, whereas the server creates a process for each port (which leads to many unused processes).

<BR>

<P>On many systems, some of the test programs and status information utilities are run through inetd. Typically, services like echo, discard, and time use inetd.

<BR>

<P>The inetd program uses a configuration file usually called /etc/inetd.cfg, /etc/inetd.conf, or /etc/inetd.cf on UNIX systems. An extract of a sample /etc/inetd.cfg file is shown in the following code:

<BR>

<PRE>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91成人在线精品| 国产精品国产三级国产普通话三级| 91国产福利在线| 91麻豆.com| 91在线观看一区二区| av在线一区二区三区| 不卡视频免费播放| 99在线视频精品| 91成人免费在线视频| 欧洲亚洲国产日韩| 欧美日韩国产免费一区二区| 欧美顶级少妇做爰| 欧美一级免费观看| 日韩三级.com| 久久久精品国产免费观看同学| 国产欧美一区视频| 亚洲免费视频成人| 午夜久久福利影院| 免费人成在线不卡| 国产麻豆视频精品| 99九九99九九九视频精品| 91免费视频观看| 欧美午夜片在线看| 欧美白人最猛性xxxxx69交| 国产午夜精品理论片a级大结局 | 亚洲欧美偷拍三级| 午夜精品福利视频网站| 六月丁香婷婷久久| 成人性色生活片| 欧美无乱码久久久免费午夜一区| 欧美日韩成人一区| 精品国产精品一区二区夜夜嗨 | 国产乱码一区二区三区| 成人app下载| 欧美疯狂性受xxxxx喷水图片| 欧美一卡二卡三卡四卡| 国产清纯在线一区二区www| 国产精品久久久久久一区二区三区| 一区二区高清在线| 精品在线视频一区| 日本韩国欧美三级| 欧美精品一区二区在线观看| 亚洲欧美日韩在线播放| 看电视剧不卡顿的网站| 99久久精品久久久久久清纯| 欧美日本在线观看| 国产女人18毛片水真多成人如厕 | 国产日韩欧美高清| 午夜久久电影网| 成人网页在线观看| 在线电影院国产精品| 国产精品色婷婷| 日韩有码一区二区三区| 成人网在线播放| 欧美一级高清大全免费观看| 亚洲欧洲制服丝袜| 韩国v欧美v日本v亚洲v| 欧美一a一片一级一片| 国产欧美精品国产国产专区| 视频一区二区国产| 99vv1com这只有精品| 精品国产sm最大网站| 亚洲电影欧美电影有声小说| av一区二区久久| 精品国产制服丝袜高跟| 五月天精品一区二区三区| 97se亚洲国产综合自在线观| 欧美精品一区二区三区蜜桃视频| 一区av在线播放| 不卡一区二区在线| 久久久久99精品国产片| 首页国产欧美日韩丝袜| 在线观看亚洲成人| 国产精品国产精品国产专区不片| 国内外精品视频| 欧美一区二区三区啪啪| 亚洲一级二级三级| 99国产精品久| 国产精品久久久久久户外露出| 极品少妇一区二区三区精品视频| 欧美老女人在线| 亚洲一区二区影院| 色婷婷亚洲一区二区三区| 国产精品美女久久久久久久久久久 | 亚洲综合免费观看高清完整版| 成人永久aaa| 久久久美女毛片| 狠狠色2019综合网| 欧美tickling网站挠脚心| 天堂成人免费av电影一区| 欧洲一区二区av| 一区二区三区色| 日本伦理一区二区| 亚洲激情一二三区| 91视频国产观看| 亚洲欧美另类综合偷拍| 色综合久久天天| 亚洲精品乱码久久久久久| 色一情一乱一乱一91av| 亚洲乱码中文字幕| 91官网在线观看| 亚洲一区二区三区中文字幕在线| 91蜜桃婷婷狠狠久久综合9色| 成人欧美一区二区三区小说| 91在线视频官网| 亚洲精品乱码久久久久久日本蜜臀| 97久久精品人人澡人人爽| 亚洲精品免费在线| 欧美日韩视频在线第一区 | 亚洲电影一级黄| 91精品中文字幕一区二区三区| 污片在线观看一区二区| 欧美日本视频在线| 免费成人小视频| 久久蜜桃一区二区| 9人人澡人人爽人人精品| 依依成人综合视频| 7777精品伊人久久久大香线蕉完整版 | 国产精品久久精品日日| 91麻豆文化传媒在线观看| 亚洲乱码国产乱码精品精可以看 | 欧美日韩在线三区| 裸体在线国模精品偷拍| 久久久久久久久久久久久夜| 成人动漫一区二区三区| 一区二区三区蜜桃| 欧美军同video69gay| 久久精品二区亚洲w码| 国产亚洲欧美日韩在线一区| 91在线观看成人| 亚洲va韩国va欧美va| 精品久久久网站| 成人午夜伦理影院| 一区二区三区在线高清| 日韩午夜在线影院| 国产成人免费9x9x人网站视频| 亚洲免费av网站| 日韩一级片在线播放| 风流少妇一区二区| 亚洲一区二区三区视频在线| 欧美mv日韩mv国产| 色综合久久久久| 久久国产综合精品| 亚洲女人小视频在线观看| 91精品国产综合久久国产大片| 国产精品系列在线观看| 亚洲激情六月丁香| 精品少妇一区二区三区日产乱码 | 人人爽香蕉精品| 中文字幕av一区二区三区免费看| 欧美日韩一级二级| 国产成人精品影院| 日韩成人精品在线观看| 国产精品美女久久久久久久久| 欧美日韩成人一区二区| 国产mv日韩mv欧美| 日韩国产一区二| 亚洲欧洲成人自拍| 欧美精品一区二区三区蜜桃视频| 在线观看av不卡| 国产乱人伦精品一区二区在线观看 | 亚洲黄色录像片| 久久久久久久久一| 884aa四虎影成人精品一区| 99久久99久久精品国产片果冻| 九九精品视频在线看| 洋洋av久久久久久久一区| 久久精品视频一区二区| 欧美日韩在线观看一区二区| 成人激情黄色小说| 久久99九九99精品| 日韩精品欧美成人高清一区二区| 综合久久国产九一剧情麻豆| 久久品道一品道久久精品| 欧美欧美欧美欧美首页| 91丨porny丨国产| 成人久久久精品乱码一区二区三区| 麻豆国产精品一区二区三区| 亚洲综合色自拍一区| 亚洲欧洲国产专区| 国产精品网曝门| 久久一区二区三区四区| 欧美一卡在线观看| 欧美精品一二三| 欧美自拍偷拍午夜视频| 色综合久久综合中文综合网| 成人精品国产一区二区4080 | 精品福利在线导航| 欧美一三区三区四区免费在线看| 色欧美日韩亚洲| 91蜜桃传媒精品久久久一区二区| 成人午夜视频在线观看| 国产成人免费视频一区| 精品一区二区三区av| 日本成人在线不卡视频| 午夜欧美在线一二页| 亚洲高清不卡在线| 亚洲成人在线观看视频| 亚洲高清免费一级二级三级| 亚洲香肠在线观看|