计算机(外文翻译)--tcp—-ip介绍(译文+英文)—-毕业论文设计

更新时间:2024-05-26 09:14:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

附件:1.外文资料翻译译文

TCP/IP介绍

在Microsoft Windows计算机上配置TCP/IP协议时,TCP/IP配置设置中需要IP地址和子网掩码,通常还需要一个默认网关。

要正确配置TCP/IP,有必要了解TCP/IP网络的寻址方式以及网络和子网的划分方式。本文旨在对IP网络和子网的概念进行一般性介绍。本文结尾包含一个术语表。 更多信息

作为Internet的网络协议,TCP/IP的成功在很大程度上归功于它将不同大小的网络和不同类型的系统连接在一起的能力。这些网络被强制定义为具有预定义大小的三个主要类(还有其他一些类别),每一类都可以由系统管理员分成更小的子网。子网掩码用于将IP地址分成两个部分。一部分标识主机(计算机),另一部分标识它所属的网络。查看IP(Internet 协议)地址并研究它的组织方式可以帮助您更好地理解IP地址和子网掩码的工作方式。 TCP的服务

尽管TCP和UDP都使用相同的网络层(IP),TCP却向应用层提供与UDP完全不同的服务。

TCP提供一种面向连接的、可靠的字节流服务。

面向连接意味着两个使用TCP的应用(通常是一个客户和一个服务器)在彼此交换数据之前必须先建立一个TCP连接。这一过程与打电话很相似,先拨号振铃,等待对方摘机说“喂”,然后才说明是谁。

在一个TCP连接中,仅有两方进行彼此通信。广播和多播不能用于TCP。 TCP通过下列方式来提供可靠性:

应用数据被分割成TCP认为最适合发送的数据块。这和UDP完全不同,应用程序产生的数据报长度将保持不变。由TCP传递给IP的信息单位称为报文段或段(segment)TCP如何确定报文段的长度。

当TCP发出一个段后,它启动一个定时器,等待目的端确认收到这个报文段。如果不能及时收到一个确认,将重发这个报文段。在第21章我们将了解TCP协议中自适应的超时及重传策略。

当TCP收到发自TCP连接另一端的数据,它将发送一个确认。这个确认不是立即发送,通常将推迟几分之一秒 TCP将保持它首部和数据的检验和。这是一个端到端的检验和,目的是检测数据在传输过程中的任何变化。如果收到段的检验和有差错,TCP将丢弃这个报文段和不确认收到此报文段(希望发端超时并重发)。

既然TCP报文段作为IP数据报来传输,而IP数据报的到达可能会失序,因此TCP报文段的到达也可能会失序。如果必要,TCP将对收到的数据进行重新排序,将收到的数据以正确的顺序交给应用层。

既然IP数据报会发生重复,TCP的接收端必须丢弃重复的数据。

TCP还能提供流量控制。TCP连接的每一方都有固定大小的缓冲空间。TCP的接收端只允许另一端发送接收端缓冲区所能接纳的数据。这将防止较快主机致使较慢主机的缓冲区溢出。

两个应用程序通过TCP连接交换8bit字节构成的字节流。TCP不在字节流中插入记录标识符。我们将这称为字节流服务(bytestreamservice)。如果一方的应用程序先传10字节,又传20字节,再传50字节,连接的另一方将无法了解发方每次发送了多少字节。收方可以分4次接收这80个字节,每次接收20字节。一端将字节流放到TCP连接上,同样的字节流将出现在TCP连接的另一端。

另外,TCP对字节流的内容不作任何解释。TCP不知道传输的数据字节流是二进制数据,还是ASCII字符、EBCDIC字符或者其他类型数据。对字节流的解释由TCP连接双方的应用层解释。

这种对字节流的处理方式与Unix操作系统对文件的处理方式很相似。Unix的内核对一个应用读或写的内容不作任何解释,而是交给应用程序处理。对Unix的内核来说,它无法区分一个二进制文件与一个文本文件。

TCP是因特网中的传输层协议,使用三次握手协议建立连接。当主动方发出SYN连接请求后,等待对方回答SYN,ACK。这种建立连接的方法可以防止产生错误的连接,TCP使用的流量控制协议是可变大小的滑动窗口协议。第一次握手:建立连接时,客户端发送SYN包(SEQ=x)到服务器,并进入SYN_SEND状态,等待服务器确认。第二次握手:服务器收到SYN包,必须确认客户的SYN(ACK=x+1),同时自己也送一个SYN包(SEQ=y),即SYN+ACK包,此时服务器进入SYN_RECV状态。第三次握手:客户端收到服务器的SYN+ACK包,向服务器发送确认包ACK(ACK=y+1),此包发送完毕,客户端和服务器时入Established状态,完成三次握手。 IP 地址:网络和主机

IP 地址是一个 32 位数字,它唯一地标识 TCP/IP 网络上的主机(计算机或其他设备,如打印机或路由器)。

IP 地址通常以点分十进制格式表示,四个数字由句点分隔,例如 192.168.123.132。要了解子网掩码如何用于区分不同的主机、网络和子网,请查看以二进制表示的 IP 地址。例如,点分十进制 IP 地址 192.168.123.132 在二进制表示法中为 32 位数字11000000 01010001 11101110 000100。此数字的含义可能很难理解,因此它被分成四个部分,每个部分有八个二进制数字。这些八位部分称为八位组。示例IP 地址于是变成 11000000.10101000.01111011.10000100。此数字表示的含义只是稍微明白了一点,因此在大多数应用中,会将二进制地址转换为点分十进制格式 (192.168.123.132)。点分十进制数字是从二进制转换为十进制表示法的八位组。

为了让 TCP/IP 广域网 (WAN) 以一个网络集的形式高效工作,在网络间传递数据包的路由器并不知道信息包的目标主机的确切位置。路由器只知道主机是

哪一个网络的成员,并使用存储在路由表中的信息来确定如何将数据包送达目标主机的网络。当数据包被传送到目标网络后,该数据包就会被传送到相应的主机。

为了让此过程顺利进行,IP 地址分为两个部分。IP 地址的前一部分作为网络地址,后一部分作为主机地址。以 192.168.123.132 为例,将它分为这两个部分之后,会得到: 192.168.123. 网络,.132 主机,- 或 - ,192.168.123.0 — 网络地址,0.0.0.132 — 主机地址。 子网掩码

第二项是子网掩码,它是TCP/IP正常工作所必需的。TCP/IP协议使用子网掩码确定主机是在本地子网中还是在远程网络中。

在TCP/IP中,将哪部分IP地址用作网络地址和主机地址并不固定,所以除非您掌握详细的信息,否则无法确定上述网络地址和主机地址。此信息在另一个32位数字中提供,称为子网掩码。在本例中,子网掩码为 255.255.255.0。如果您不知道二进制表示法中的255等于11111111,可能并不清楚该数字表示的含义。照此分析,子网掩码为:11111111.11111111.11111111.0000000

将IP地址和子网掩码排列在一起比较,就可以分清该地址的网络部分和主机部分:

11000000.10101000.01111011.10000100 -- IP 地址 (192.168.123.132) 11111111.11111111.11111111.00000000 -- 子网掩码 (255.255.255.0)

前 24位(子网掩码中的数字1)被标识为网络地址,后8位(子网掩码中剩余的数字0)被标识为主机地址,据此可以得到:

11000000.10101000.01111011.00000000 -- 网络地址 (192.168.123.0) 00000000.00000000.00000000.10000100 -- 主机地址 (000.000.000.132)

这样,我们就可以知道,在这个使用 255.255.255.0 子网掩码的示例中,网络ID为192.168.123.0,主机地址为0.0.0.132。当数据包到达192.168.123.0子网(从本地子网或远程网络),而且它的目标地址为192.168.123.132时,您的计算机将从网络接收它并对它进行处理。

几乎所有十进制子网掩码都转换为左侧全部是一、右侧全部是零的二进制数字。其他一些常见的子网掩码有:

十进制 二进制

255.255.255.192 1111111.11111111.1111111.11000000 255.255.255.224 1111111.11111111.1111111.11100000

Internet RFC 1878(从http://www.internic.net获取)描述了可在TCP/IP网络中使用的有效子网和子网掩码。 网络类

Internet 地址由管理Internet的机构InterNIC(http://www.internic.net) 来分配。这些IP地址分成若干类。其中最常见的是A、B和C类。也有D和E类,但是最终用户通常不会使用。每个地址类都有不同的默认子网掩码。可以通过查看IP地址的第一个八位组来识别该IP地址的类别。下面是A、B和C类Internet

地址的范围,每一类地址都有一个示例:

A类网络使用的默认子网掩码为255.0.0.0,第一个八位组为 0-127。地址10.52.36.11就是一个A类地址。它的第一个八位组为10,介于1 至126之间(包括1和126)。

B类网络使用的默认子网掩码为255.255.0.0,第一个八位组为 128-191。地址 172.16.52.63 就是一个 B 类地址。它的第一个八位组为 172,介于 128 至 191 之间(包括 128 和 191)。

C 类网络使用的默认子网掩码为255.255.255.0,第一个八位组为192-223。地址192.168.123.132就是一个C类地址。它的第一个八位组192,介于192至223之间(包括192和223)。

在某些情况下,由于网络的物理拓扑或因为网络(或主机)的数目在默认的子网掩码限制之下并不适用,所以默认子网掩码值可能不适合机构的需要。下一部分将解释如何使用子网掩码划分网络。 子网配置

系统管理员可以进一步划分A、B或C类TCP/IP网络或对这些网络进行子网配置。当您将Internet的逻辑地址结构(IP地址和子网的抽象世界)与真实世界中使用的物理网络进行协调时,就有必要进行子网配置。接受IP地址块分配的系统管理员可以用轻松符合这些地址的方式管理未经组织的网络。例如,您有一个广域网,在该广域网中,TCP/IP路由器连接的三个网络(位于不同城市)中有150个主机。这三个网络中的每个网络都有50个主机。向您分配了C类网络192.168.123.0。(此地址是为了便于说明,实际上来自Internet中未分配的范围。)这意味着可以将地址192.168.123.1至192.168.123.254用于您的150个主机。在示例中不能使用的两个地址为192.168.123.0和192.168.123.255,因为主机部分全部为一和全部为零的二进制地址无效。零地址无效的原因是使用它在未指定主机的情况下指定了网络。255 地址(在二进制表示法中全部为一的主机地址)用来向网络中的每个主机广播消息。只需记住,任何网络或子网中的第一个地址和最后一个地址不能分配给任何单独主机。

现在,您应该能够将IP地址给予254个主机。如果所有150台计算机都在一个网络中,则此操作会进行得很顺利。但是,您的150台计算机位于三个单独的物理网络中。不用为每个网络请求更多地址块,只需将网络分成使您可以在多个物理网络中使用一个地址块的子网。

在此情况下,使用使网络地址更大和可能的主机地址范围更小的子网掩码将网络分成四个子网。也就是说,您正在“借用”某些通常用于主机地址的位,并将它们用于地址的网络部分。子网掩码255.255.255.192给予您四个网络,每个网络有 62个主机。

由于用二进制表示255.255.255.192与 1111111.11111111.1111111.11000000 相同,所以此操作可以顺利进行。最后一个八位组的前两位数字变为网络地址,所以您获得了附加网络00000000(0)、01000000(64)、10000000(128) 和11000000

(192)。(某些管理员只使用将 255.255.255.192作为子网掩码的其中两个子网。有关此主题的更多信息,请参阅 RFC 1878。)在这四个网络中,最后6个二进制数字可用于主机地址。

使用子网掩码255.255.255.192,则您的192.168.123.0网络变为四个网络 192.168.123.0、192.168.123.64、192.168.123.128和192.168.123.192。这四个网络将拥有以下有效主机地址:

192.168.123.1-62 192.168.123.65-126 192.168.123.129-190 192.168.123.193-254 再次重审,全部为一或全部为零的二进制主机地址无效,所以您不能使用最后一个八位组为0、63、64、127、128、191、192 或 255 的地址。

现在,看两个主机地址192.168.123.71和192.168.123.133,您就会了解其原理。如果使用默认C类子网掩码255.255.255.0则这两个地址都位于 192.168.123.0网络中。但是,如果使用子网掩码255.255.255.192,则它们位于不同网络中;192.168.123.71位于192.168.123.64网络中,192.168.123.133位于 192.168.123.128网络中。 默认网关

如果TCP/IP计算机需要与另一个网络中的主机进行通信,它通常通过称为路由器的设备进行通信。在TCP/IP 语中,主机中指定的、用于将主机子网链接到其他网络的路由器称为默认网关。本节解释TCP/IP如何确定是否将数据包发送到其默认网关以到达网络中的另一台计算机或设备。

当主机尝试使用TCP/IP与另一个设备进行通信时,它会使用已定义的子网掩码和目标IP地址针对子网掩码和其自己的IP地址进行比较。比较结果会告诉计算机目标是本地主机还是远程主机。

如果此过程的结果确定目标是本地主机,则计算机只将数据包发送到本地子网。如果比较结果确定目标是远程主机,则计算机将数据包转发到其TCP/IP属性中定义的默认网关。然后,路由器负责将数据包转发到正确的子网。 TCP/IP协议组件中不同层次的协议

TCP和UDP是两种最为著名的运输层协议,二者都使用IP作为网络层协议。虽然TCP使用不可靠的IP服务,但它却提供一种可靠的运输层服务;UDP为应用程序发送和接收数据报。一个数据报是指从发送方传输到接收方的一个信息单元(例如,发送方指定的一定字节数的信息)。但是与TCP不同的是,UDP是不可靠的,它不能保证数据报能安全无误地到达最终目的。SNMP(简单网络管理协议)也使用了UDP协议,但是它还要处理许多其他的协议,IP是网络层上的主要协议,同时被TCP和UDP使用。TCP和UDP的每组数据都通过端系统和每个中间路由器中的IP层在互连网中进行传输。直接访问IP的应用程序是很少见的,但也是可能的。(一些较老的路由选择协议就是以这种方式来实现的。当

然新的运输层协议也有可能试用这种方式。)

ICMP是IP协议的附属协议。IP层用它来与其他主机或路由器交换错误报文和其他重要信息。尽管ICMP主要被IP使用,但应用程序也有可能访问它。我们将分析两个流行的诊断工具,Ping和Traceroute,它们都使用了ICMP。

IGMP是Internet组管理协议。它用来把一个UDP数据报多播到多个主机。ARP(地址解析协议)和RARP(逆地址解析协议)是某些网络接口(如以太网和令牌环网)使用的特殊协议,用来转换IP层和网络接口层使用的地址。 疑难解答

TCP/IP网络问题通常是由计算机的TCP/IP属性中三个主要条目的错误配置导致的。了解 TCP/IP 配置中的错误如何影响网络操作后,您可以解决许多常见 TCP/IP 问题。

错误的子网掩码:如果网络将默认掩码外的其他子网掩码用于其地址类,而客户端仍使用该地址类的默认子网掩码进行配置,则可以与远程网络进行通信但无法与某些附近网络进行通信。例如,如果创建四个子网(例如在子网配置示例中),但是在TCP/IP配置中使用错误的子网掩码255.255.255.0,则主机将无法确定某些计算机是否在与它们自己的子网不同的子网中。当发生此情况时,发送到作为相同C类地址一部分的不同物理网络中的主机的数据包将不会发送到默认网关来进行传送。此问题的常见症状是计算机可以与其本地网络中的主机以及所有远程网络进行通信,但无法与位置在附近并具有相同的A、B 或C类地址的网络进行通信。要解决此问题,只需在该主机的TCP/IP配置中输入正确的子网掩码。

错误的IP 址:如果将那些IP地址在本地网络的不同子网中的计算机放在一起,则它们无法进行通信。它们会尝试通过路由器相互发送数据包,而该路由器却无法正确转发这些数据包。此问题的症状是计算机可以与远程网络中的主机进行通信,但是无法与其本地网络中的某些或全部计算机通信。要解决此问题,请确保同一物理网络中的所有计算机具有同一IP子网中的IP地址。如果一个网段中的IP地址已用完,还可使用一些解决方案进行处理,但已超出本文范围。

错误的默认网关:使用错误的默认网关配置的计算机能够与其自己网段中的主机进行通信,但是无法与某些或全部远程网络中的主机进行通信。如果一个物理网络有多个路由器,且将错误的路由器配置为默认网关,则主机能够与某些远程网络进行通信,但是无法与其他远程网络进行通信。如果组织中有一个路由器连接到内部TCP/IP网络,另一个路由器连接到Internet,则此问题很常见。 参考

TCP/IP 中的两个常用参考是:

Richard Stevens, Addison Wesley. TCP/IP Illustrated, Volume 1:The Protocols[M]. 1994.

Douglas E. Comer, Prentice Hall. Internetworking with TCP/IP, Volume 1:Principles, Protocols, and Architecture[M]. 1995.

极力建议负责 TCP/IP 网络的系统管理员至少使用其中一个参考。 术语表

广播地址 -- 主机部分全部为一的IP地址。 主机 -- TCP/IP 网络中的计算机或其他设备。

Internet -- 连接在一起并共享公共范围的IP地址的全球网络集合。 InterNIC -- 负责管理 Internet 中的IP地址的机构。

IP -- 用于在TCP/IP网络或Internet上发送网络数据包的网络协议。 IP 地址 -- TCP/IP网络或Internet主机的唯一32位地址。

网络 -- 在本文中,“网络”一词有两种含义。一种含义是指单一物理网段上的计算机组,另一种含义是指系统管理员分配的IP网络地址范围。

网络地址 -- 主机部分全部为零的 IP 地址。 八位组 -- 一个8位数字,4个八位组构成一个32位IP地址。它们的范围是 00000000-11111111,对应于十进制值 0- 255。

数据包 -- 通过TCP/IP网络或广域网传输的数据单位。 RFC(Request for Comment,征求意见文件)-- 用于定义Internet标准的文档。

路由器 -- 在不同IP网络间传输网络通信的设备。

子网掩码 -- 一个32位数字,用于区分IP地址的网络部分和主机部分。 子网 -- 通过将较大的网络分成相等的部分而创建的较小网络。 TCP/IP -- 通常在Internet和大型网络中广泛使用的协议、标准和实用工具的集合。

广域网 (WAN) -- 大型网络,它是路由器分隔的较小网络的集合。例如,Internet 就是一个非常大的广域网。

附件:2.外文原文

TCP/IP INTRODUCTION

When you configure the TCP/IP protocol on a Microsoft Windows computer, an IP address, subnet mask, and usually a default gateway are required in the TCP/IP configuration settings.

To configure TCP/IP correctly, it is necessary to understand how TCP/IP networks are addressed and divided into networks and subnetworks. This article is intended as a general introduction to the concepts of IP networks and subnetting. A glossary is included at the end of article. MORE INFORMATION

The success of TCP/IP as the network protocol of the Internet is largely because of its ability to connect together networks of different sizes and systems of different types. These networks are arbitrarily defined into three main classes (along with a few others) that have predefined sizes, each of which can be divided into smaller subnetworks by system administrators. A subnet mask is used to divide an IP address into two parts. One part identifies the host (computer), the other part identifies the network to which it belongs. To better understand how IP addresses and subnet masks work, look at an IP (Internet Protocol) address and see how it is organized. TCP services

Although the TCP and UDP are using the same network layer (IP), TCP has provided to the application layer and UDP completely different services.

TCP provides a connection-oriented, reliable stream of bytes services.

For the use of TCP connection means that two of the application (usually a client and a server) in the mutual exchange of data must be before the establishment of a TCP connection. This process is very similar with the call, first dial-up ring, waiting for the other side pick said, \

In a TCP connection, only two parties to communicate with each other. Broadcast and Multicast can not be used for TCP.

TCP adoption of the following ways to provide reliability: Application data Beifengecheng suited to TCP that sent most of the block. This is completely different from UDP, the application of the data on the length will remain the same. TCP from the information passed to the IP unit known as the text of the report or paragraph (segment) TCP on how to determine the length of the text.

When the TCP send a paragraph later, it started a timer, wait for the end purpose of this newspaper that on receipt of the text. If not received a confirmation in time, will be re-issued the text of the report. In Chapter 21 we will understand TCP protocol in the overtime and adaptive re-strategy.

When the TCP received from the other side of the TCP connection data, it will send a confirmation. This confirmation is not sent immediately, usually a fraction of a second will be postponed.

TCP will maintain its first data and the testing and. This is an end-to-end testing and to detect the transmission of data in the course of any changes. If you receive the test of the errors and, TCP will be discarded this message, and do not acknowledge receipt of this message (hope that both the originator of the overtime).

Since the TCP packet of data as reported to transmit IP, and IP data on the disorder may be reached, TCP packet of the disorder may also be reached. If necessary, TCP will receive the data re-order, will receive the data to the correct sequence to the application layer.

Since the IP data will be reported duplication, TCP the receiving end must be disposed of duplication of data.

TCP also provides flow control. TCP connection of each side have a fixed-size buffer space. TCP receiver allows only the other side of the buffer zone to send the receiver to accept the data. This will prevent the rapid host a result of slower host a buffer overflow.

Two applications through TCP connection exchange of 8 bit bytes a stream of bytes. TCP is not inserted in the record-byte identifier. We see this as byte-service (byte stream service). If the application is one of the first 10-byte, 20-byte, 50 bytes longer, connected to the other party will not be able to understand each side sent a number of bytes. Receiver can receive four times this 80-byte, each receiving 20 bytes. Will be banished to the end byte TCP connection, the same stream of bytes will appear in the other end of TCP connection.

In addition, TCP byte flow of the content not to make any explanation. TCP do not know bytes of data transmission flow is binary data, or ASCII characters, EBCDIC character or other types of data. The flow of bytes explained by the TCP connection the two sides to explain the application layer.

This stream of bytes of the Unix operating system and the handling of the document's approach is very similar. Unix kernel of an application read or write the content not to make any explanation, but to the application procedures. The core of Unix, it can not distinguish between a binary file with a text file.

TCP is the Internet in Transport Layer protocol, shook hands with the use of three agreements establish a connection. When the initiative to connect a SYN request and wait for the other side to answer SYN, ACK. This connection method can prevent a wrong connection, TCP flow control the use of the agreement is the size of variable sliding window protocol. The first handshake: establish a connection, the client sent SYN packet (SEQ = x) to the server and access SYN_SEND state, waiting for the

server to confirm. Second handshake: Server received SYN packet, customers must confirm the SYN (ACK = x +1), while its own package also send a SYN (SEQ = y), that is, SYN + ACK packet, then enter the server SYN_RECV state. Third handshake: client server received the SYN + ACK packet, send confirmation to the server package ACK (ACK = y +1), this package sent completed, the client and server-Established state, complete the three shook hands. IP addresses: Networks and hosts

An IP address is a 32-bit number that uniquely identifies a host (computer or other device, such as a printer or router) on a TCP/IP network.

IP addresses are normally expressed in dotted-decimal format, with four numbers separated by periods, such as 192.168.123.132. To understand how subnet masks are used to distinguish between hosts, networks, and subnetworks, examine an IP address in binary notation.

For example, the dotted-decimal IP address 192.168.123.132 is (in binary notation) the 32 bit number 110000000101000111101110000100. This number may be hard to make sense of, so divide it into four parts of eight binary digits.

These eight bit sections are known as octets. The example IP address, then, becomes 11000000.10101000.01111011.10000100. This number only makes a little more sense, so for most uses, convert the binary address into dotted-decimal format (192.168.123.132). The decimal numbers separated by periods are the octets converted from binary to decimal notation.

For a TCP/IP wide area network (WAN) to work efficiently as a collection of networks, the routers that pass packets of data between networks do not know the exact location of a host for which a packet of information is destined. Routers only know what network the host is a member of and use information stored in their route table to determine how to get the packet to the destination host's network. After the packet is delivered to the destination's network, the packet is delivered to the appropriate host.

For this process to work, an IP address has two parts. The first part of an IP address is used as a network address, the last part as a host address. If you take the example 192.168.123.132 and divide it into these two parts you get the following: 192.168.123. Network .132 Host -or- 192.168.123.0 - network address.0.0.0.132 - host address. Subnet mask

The second item, which is required for TCP/IP to work, is the subnet mask. The subnet mask is used by the TCP/IP protocol to determine whether a host is on the local subnet or on a remote network.

In TCP/IP, the parts of the IP address that are used as the network and host

addresses are not fixed, so the network and host addresses above cannot be determined unless you have more information. This information is supplied in another 32-bit number called a subnet mask. In this example, the subnet mask is 255.255.255.0. It is not obvious what this number means unless you know that 255 in binary notation equals 11111111; so, the subnet mask is: 11111111.11111111.11111111.0000000

Lining up the IP address and the subnet mask together, the network and host portions of the address can be separated:

11000000.10101000.01111011.10000100 -- IP address (192.168.123.132) 11111111.11111111.11111111.00000000 -- Subnet mask (255.255.255.0) The first 24 bits (the number of ones in the subnet mask) are identified as the network address, with the last 8 bits (the number of remaining zeros in the subnet mask) identified as the host address. This gives you the following:

11000000.10101000.01111011.00000000 -- Network address (192.168.123.0) 00000000.00000000.00000000.10000100 -- Host address (000.000.000.132)

So now you know, for this example using a 255.255.255.0 subnet mask, that the network ID is 192.168.123.0, and the host address is 0.0.0.132. When a packet arrives on the 192.168.123.0 subnet (from the local subnet or a remote network), and it has a destination address of 192.168.123.132, your computer will receive it from the network and process it.

Almost all decimal subnet masks convert to binary numbers that are all ones on the left and all zeros on the right. Some other common subnet masks are: Decimal Binary

255.255.255.192 1111111.11111111.1111111.11000000 255.255.255.224 1111111.11111111.1111111.11100000 Internet RFC 1878 (available from http://www.internic.net ) describes the valid subnets and subnet masks that can be used on TCP/IP networks. Network classes

Internet addresses are allocated by the InterNIC (http://www.internic.net ), the organization that administers the Internet. These IP addresses are divided into classes. The most common of these are classes A, B, and C. Classes D and E exist, but are not generally used by end users. Each of the address classes has a different default subnet mask. You can identify the class of an IP address by looking at its first octet. Following are the ranges of Class A, B, and C Internet addresses, each with an example address:

Class A networks use a default subnet mask of 255.0.0.0 and have 0-127 as their first octet. The address 10.52.36.11 is a class A address. Its first octet is 10, which is between 1 and 126, inclusive.

Class B networks use a default subnet mask of 255.255.0.0 and have 128-191 as their first octet. The address 172.16.52.63 is a class B address. Its first octet is 172, which is between 128 and 191, inclusive.

Class C networks use a default subnet mask of 255.255.255.0 and have 192-223 as their first octet. The address 192.168.123.132 is a class C address. Its first octet is 192, which is between 192 and 223, inclusive.

In some scenarios, the default subnet mask values do not fit the needs of the organization, because of the physical topology of the network, or because the numbers of networks (or hosts) do not fit within the default subnet mask restrictions. The next section explains how networks can be divided using subnet masks. Subnetting

Class A, B, or C TCP/IP network can be further divided, or subnetted, by a system administrator. This becomes necessary as you reconcile the logical address scheme of the Internet (the abstract world of IP addresses and subnets) with the physical networks in use by the real world.

A system administrator who is allocated a block of IP addresses may be administering networks that are not organized in a way that easily fits these addresses. For example, you have a wide area network with 150 hosts on three networks (in different cities) that are connected by a TCP/IP router. Each of these three networks has 50 hosts. You are allocated the class C network 192.168.123.0. (For illustration, this address is actually from a range that is not allocated on the Internet.) This means that you can use the addresses 192.168.123.1 to 192.168.123.254 for your 150 hosts.

Two addresses that cannot be used in your example are 192.168.123.0 and 192.168.123.255 because binary addresses with a host portion of all ones and all zeros are invalid. The zero address is invalid because it is used to specify a network without specifying a host. The 255 address (in binary notation, a host address of all ones) is used to broadcast a message to every host on a network. Just remember that the first and last address in any network or subnet cannot be assigned to any individual host.

You should now be able to give IP addresses to 254 hosts. This works fine if all 150 computers are on a single network. However, your 150 computers are on three separate physical networks. Instead of requesting more address blocks for each network, you divide your network into subnets that enable you to use one block of addresses on multiple physical networks.

In this case, you divide your network into four subnets by using a subnet mask that makes the network address larger and the possible range of host addresses smaller. In other words, you are 'borrowing' some of the bits usually used for the host address, and using them for the network portion of the address. The subnet mask 255.255.255.192 gives you four networks of 62 hosts each.

This works because in binary notation, 255.255.255.192 is the same as 1111111.11111111.1111111.11000000. The first two digits of the last octet become network addresses, so you get the additional networks 00000000 (0), 01000000 (64), 10000000 (128) and 11000000 (192). (Some administrators will only use two of the subnetworks using 255.255.255.192 as a subnet mask. For more information on this topic, see RFC 1878.) In these four networks, the last 6 binary digits can be used for host addresses.

Using a subnet mask of 255.255.255.192, your 192.168.123.0 network then becomes the four networks 192.168.123.0, 192.168.123.64, 192.168.123.128 and 192.168.123.192. These four networks would have as valid host addresses: 192.168.123.1-62,192.168.123.65-126,192.168.123.129-190 ,192.168.123.193-254 Remember, again, that binary host addresses with all ones or all zeros are invalid, so you cannot use addresses with the last octet of 0, 63, 64, 127, 128, 191, 192, or 255.

You can see how this works by looking at two host addresses, 192.168.123.71 and 192.168.123.133. If you used the default Class C subnet mask of 255.255.255.0, both addresses are on the 192.168.123.0 network. However, if you use the subnet mask of 255.255.255.192, they are on different networks; 192.168.123.71 is on the 192.168.123.64 network, 192.168.123.133 is on the 192.168.123.128 network. Default gateways

If a TCP/IP computer needs to communicate with a host on another network, it will usually communicate through a device called a router. In TCP/IP terms, a router that is specified on a host, which links the host's subnet to other networks, is called a default gateway. This section explains how TCP/IP determines whether or not to send packets to its default gateway to reach another computer or device on the network.

When a host attempts to communicate with another device using TCP/IP, it performs a comparison process using the defined subnet mask and the destination IP address versus the subnet mask and its own IP address. The result of this comparison tells the computer whether the destination is a local host or a remote host.

If the result of this process determines the destination to be a local host, then the computer will simply send the packet on the local subnet. If the result of the comparison determines the destination to be a remote host, then the computer will forward the packet to the default gateway defined in its TCP/IP properties. It is then the responsibility of the router to forward the packet to the correct subnet. TCP / IP protocol components in different levels

TCP and UDP are the two most famous transport layer protocol, both of which use IP as a network layer protocol.

Although the use of TCP reliable IP services, it provides a reliable transport layer

services; UDP for applications to send and receive data. Reportedly refers to a data sent from the transmission to receiving a unit of information (for example, sent to the designated a certain number of bytes of information). But the difference is that TCP, UDP is not reliable, it can not guarantee the safety data was correct to reach the ultimate goal. SNMP (SNMP) also used the UDP protocol, but it would also like to address many of the other agreement, IP network layer is the main agreement, while the use of TCP and UDP. TCP and UDP data through the end of each system and each router in the middle of the IP in the Internet in the transfer. Direct access to IP applications is rare, but it is also possible. (Some older routing agreement is in this way to achieve it. Of course, new transport layer protocol may also try this approach.). ICMP is a subsidiary of IP protocol agreement. IP layer and use it to other host or router to exchange the wrong message and other important information. Although ICMP mainly IP, but applications may also access it. We will analyse the two popular diagnostic tool, Ping and Traceroute, they all use the ICMP.

IGMP is the Internet Group Management Protocol. It used to a UDP data on multicast to multiple hosts. ARP (ARP) and RARP (Inverse ARP) is a certain network interface (such as Ethernet and Token Ring) the use of the special protocol that is used to convert IP network interface layer and the use of the address. Trouble shooting

TCP/IP network problems are often caused by incorrect configuration of the three main entries in a computer's TCP/IP properties. By understanding how errors in TCP/IP configuration affect network operations, you can solve many common TCP/IP problems.

Incorrect Subnet Mask: If a network uses a subnet mask other than the default mask for its address class, and a client is still configured with the default subnet mask for the address class, communication will fail to some nearby networks but not to distant ones. As an example, if you create four subnets (such as in the subnetting example) but use the incorrect subnet mask of 255.255.255.0 in your TCP/IP configuration, hosts will not be able to determine that some computers are on different subnets than their own. When this happens, packets destined for hosts on different physical networks that are part of the same Class C address will not be sent to a default gateway for delivery. A common symptom of this is when a computer can communicate with hosts that are on its local network and can talk to all remote networks except those that are nearby and have the same class A, B, or C address. To fix this problem, just enter the correct subnet mask in the TCP/IP configuration for that host.

Incorrect IP Address: If you put computers with IP addresses that should be on separate subnets on a local network with each other, they will not be able to

communicate. They will try to send packets to each other through a router that will not be able to forward them correctly. A symptom of this problem is a computer that can talk to hosts on remote networks, but cannot communicate with some or all computers on their local network. To correct this problem, make sure all computers on the same physical network have IP addresses on the same IP subnet. If you run out of IP addresses on a single network segment, there are solutions that go beyond the scope of this article.

Incorrect Default Gateway: A computer configured with an incorrect default gateway will be able to communicate with hosts on its own network segment, but will fail to communicate with hosts on some or all remote networks. If a single physical network has more than one router, and the wrong router is configured as a default gateway, a host will be able to communicate with some remote networks, but not others. This problem is common if an organization has a router to an internal TCP/IP network and another router connected to the Internet.

REFERENCES

Two popular references on TCP/IP are:

\Illustrated, Volume 1: The Protocols,\Richard Stevens, Addison Wesley, 1994

\with TCP/IP, Volume 1: Principles, Protocols, and Architecture,\

It is strongly recommended that a system administrator responsible for TCP/IP networks have at least one of these references available. Glossary

Broadcast address -- An IP address with a host portion that is all ones. Host -- A computer or other device on a TCP/IP network.

Internet -- The global collection of networks that are connected together and share a common range of IP addresses.

InterNIC -- The organization responsible for administration of IP addresses on the Internet.

IP -- The network protocol used for sending network packets over a TCP/IP network or the Internet.

IP Address -- A unique 32-bit address for a host on a TCP/IP network or internetwork.

Network -- There are two uses of the term network in this article. One is a group of computers on a single physical network segment; the other is an IP network address range that is allocated by a system administrator.

Network address -- An IP address with a host portion that is all zeros.

Octet -- An 8-bit number, 4 of which comprise a 32-bit IP address. They have a

本文来源:https://www.bwwdw.com/article/rnr7.html

Top