計算機(jī)系中英文翻譯---傳輸控制協(xié)議和網(wǎng)際協(xié)議的研究與應(yīng)用_第1頁
已閱讀1頁,還剩26頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、<p>  傳輸控制協(xié)議和網(wǎng)際協(xié)議的研究與應(yīng)用</p><p><b>  簡介</b></p><p>  作為 Internet 的網(wǎng)絡(luò)協(xié)議, TCP/IP 的成功在很大程度上歸功于它將不同大小的網(wǎng)絡(luò)和不同類型的系統(tǒng)連接在一起的能力。這些網(wǎng)絡(luò)被強(qiáng)制定義為具有預(yù)定義大小的三個主要類(還有其他一些類別),每一類都可以由系統(tǒng)管理員分成更小的子網(wǎng)。子網(wǎng)掩碼用于將

2、 IP 地址分成兩個部分。一部分標(biāo)識主機(jī)(計算機(jī)),另一部分標(biāo)識它所屬的網(wǎng)絡(luò)。查看 IP(Internet 協(xié)議)地址并研究它的組織方式可以幫助您更好地理解 IP 地址和子網(wǎng)掩碼的工作方式。</p><p>  在 Microsoft Windows 計算機(jī)上配置 TCP/IP 協(xié)議時, TCP/IP 配置設(shè)置中需要 IP 地址和子網(wǎng)掩碼,通常還需要一個默認(rèn)網(wǎng)關(guān)。要正確配置 TCP/IP ,有必要了解 TCP/I

3、P 網(wǎng)絡(luò)的尋址方式以及網(wǎng)絡(luò)和子網(wǎng)的劃分方式。本文旨在對 IP 網(wǎng)絡(luò)和子網(wǎng)的概念進(jìn)行一般性介紹。本文結(jié)尾包含一個術(shù)語表。</p><p>  IP 地址包括網(wǎng)絡(luò)和主機(jī),它是一個 32 位數(shù)字,它唯一地標(biāo)識 TCP/IP 網(wǎng)絡(luò)上的主機(jī)(計算機(jī)或其他設(shè)備,如打印機(jī)或路由器)。IP 地址通常以點(diǎn)分十進(jìn)制格式表示,四個數(shù)字由句點(diǎn)分隔,例如 192.168.123.132。要了解子網(wǎng)掩碼如何用于區(qū)分不同的主機(jī)、網(wǎng)絡(luò)和子網(wǎng),請

4、查看以二進(jìn)制表示的 IP 地址。例如,點(diǎn)分十進(jìn)制 IP 地址 192.168.123.132 在二進(jìn)制表示法中為 32 位數(shù)字:</p><p>  110000000101000111101110000100</p><p>  此數(shù)字的含義可能很難理解,因此它被分成四個部分,每個部分有八個二進(jìn)制數(shù)字。這些八位部分稱為八位組。示例 IP 地址于是變成:11000000.10101000.

5、01111011.10000100。此數(shù)字表示的含義只是稍微明白了一點(diǎn),因此在大多數(shù)應(yīng)用中,會將二進(jìn)制地址轉(zhuǎn)換為點(diǎn)分十進(jìn)制格式 (192.168.123.132)。點(diǎn)分十進(jìn)制數(shù)字是從二進(jìn)制轉(zhuǎn)換為十進(jìn)制表示法的八位組。</p><p><b>  IP的基本工作原理</b></p><p>  作為參考,請記住,IP是TCP/IP整套協(xié)議中的一個協(xié)議。TCP完成開放系統(tǒng)

6、互連(OSI)模型中傳輸層,即第四層的功能。它的主要責(zé)任是確保端至端之間的可靠連接。IP位于下一層,在OSI的網(wǎng)絡(luò)層,即第三層,把每個包的發(fā)送者和接收者地址告訴一路上各個路由器。路由器和第三層交換器可以讀出IP和其他的第三層協(xié)議。這些信息與路由表以及其他網(wǎng)絡(luò)智能結(jié)合在一起,能通過TCP/IP在整個房間或圍繞地球進(jìn)行傳遞。</p><p>  路由過程始于對發(fā)送端站而言是唯一的一個IP地址,端站可以被分配永久的IP

7、地址,或者按需要從動態(tài)主機(jī)配置協(xié)議(DHCP)服務(wù)器或其他服務(wù)中借用。每個包攜帶一個源地址,在目前(IPv4)規(guī)范下,包長度是32位。在報頭中,每個包也攜帶最終目的地的IP地址。如果發(fā)送端站確定目的地址不在本地,該包就被送到第一跳路由器,一般來說,該路由器是在附近的,并已被預(yù)先分配給發(fā)送者。如果發(fā)送端站確定目的地址不在本地,該包就被送到第一跳路由器,一般來說,該路由器是在附近的,并已被預(yù)先分配給發(fā)送者。該路由器檢查包的IP地址,查找路由

8、表,看看目的端點(diǎn)是否位于本地(物理位置)網(wǎng)絡(luò),它通常叫做IP子網(wǎng),IP子網(wǎng)一般被分配到路由器的每個網(wǎng)絡(luò)接口上。</p><p>  如果目的IP地址為本地的,該路由器就搜尋存儲著IP地址和本地設(shè)備介質(zhì)訪問控制(MAC)地址的內(nèi)部存儲器,這個存儲器叫做地址分辨協(xié)議(ARP)高速緩存。ARP是把IP地址映射到MAC地址的通用工具。如果目的地的MAC地址出現(xiàn)了,該路由器就把這個MAC地址裝進(jìn)包的報頭中(取掉自己的MAC

9、 地址,因?yàn)椴辉傩枰耍?,把該包送到目的端站。萬一目的地的MAC地址沒有出現(xiàn)在ARP高速緩存中(例如,有可能超時了),路由器必須向與包的目的IP地址有關(guān)的子網(wǎng)廣播一個ARP請求,擁有此IP地址的端站就作出響應(yīng),把MAC地址發(fā)送回去,路由器因此更新高速緩存,把新的MAC地址裝進(jìn)包的報頭并發(fā)送該包。</p><p>  如果查找路由表顯示包的目的地不在本地子網(wǎng),路由器就利用下一跳路由器的MAC地址把包轉(zhuǎn)發(fā)給下一跳路

10、由器。路由表由智能發(fā)現(xiàn)協(xié)議,如路由信息協(xié)議或者開放最短路徑優(yōu)先協(xié)議,不斷地被建立和再建立。每個路由器的路由表顯示了到達(dá)目的地址的最佳路徑,對于要有幾跳的地址,它顯示出最佳的下一跳路由器。</p><p>  為了讓 TCP/IP 廣域網(wǎng) (WAN) 以一個網(wǎng)絡(luò)集的形式高效工作,在網(wǎng)絡(luò)間傳遞數(shù)據(jù)包的路由器并不知道信息包的目標(biāo)主機(jī)的確切位置。路由器只知道主機(jī)是哪一個網(wǎng)絡(luò)的成員,并使用存儲在路由表中的信息來確定如何將數(shù)

11、據(jù)包送達(dá)目標(biāo)主機(jī)的網(wǎng)絡(luò)。當(dāng)數(shù)據(jù)包被傳送到目標(biāo)網(wǎng)絡(luò)后,該數(shù)據(jù)包就會被傳送到相應(yīng)的主機(jī)。</p><p>  為了讓此過程順利進(jìn)行, IP 地址分為兩個部分。 IP 地址的前一部分作為網(wǎng)絡(luò)地址,后一部分作為主機(jī)地址。以 192.168.123.132 為例,將它分為這兩個部分之后,會得到:(192.168.123.——網(wǎng)絡(luò),.132——主機(jī))或(192.168.123.0——網(wǎng)絡(luò)地址,0.0.0.132——主機(jī)地址)

12、。</p><p><b>  子網(wǎng)掩碼</b></p><p>  子網(wǎng)掩碼是 TCP/IP 正常工作所必需的。TCP/IP 協(xié)議使用子網(wǎng)掩碼確定主機(jī)是在本地子網(wǎng)中還是在遠(yuǎn)程網(wǎng)絡(luò)中。在 TCP/IP 中,將哪部分 IP 地址用作網(wǎng)絡(luò)地址和主機(jī)地址并不固定,所以除非您掌握詳細(xì)的信息,否則無法確定上述網(wǎng)絡(luò)地址和主機(jī)地址。此信息在另一個 32 位數(shù)字中提供,稱為子網(wǎng)掩碼。

13、在本例中,子網(wǎng)掩碼為 255.255.255.0。如果您不知道二進(jìn)制表示法中的 255 等于 11111111,可能并不清楚該數(shù)字表示的含義;照此分析,子網(wǎng)掩碼為:</p><p>  11111111.11111111.11111111.0000000。</p><p>  將 IP 地址和子網(wǎng)掩碼排列在一起比較,就可以分清該地址的網(wǎng)絡(luò)部分和主機(jī)部分:</p><p&

14、gt;  11000000.10101000.01111011.10000100--IP 地址(192.168.123.132)</p><p>  11111111.11111111.11111111.00000000--子網(wǎng)掩碼(255.255.255.0)</p><p>  前24位(子網(wǎng)掩碼中的數(shù)字1)被標(biāo)識為網(wǎng)絡(luò)地址,后8位(子網(wǎng)掩碼中剩余的數(shù)字0)被標(biāo)識為主機(jī)地址。據(jù)此可以得

15、到:</p><p>  11000000.10101000.01111011.00000000--網(wǎng)絡(luò)地址(192.168.123.0)</p><p>  00000000.00000000.00000000.10000100-主機(jī)地址(000.000.000.132)</p><p>  這樣,我們就可以知道,在這個使用 255.255.255.0 子網(wǎng)掩碼的

16、示例中,網(wǎng)絡(luò)ID為192.168.123.0,主機(jī)地址為0.0.0.132。當(dāng)數(shù)據(jù)包到達(dá)192.168.123.0子網(wǎng)(從本地子網(wǎng)或遠(yuǎn)程網(wǎng)絡(luò)),而且它的目標(biāo)地址為192.168.123.132時,您的計算機(jī)將從網(wǎng)絡(luò)接收它并對它進(jìn)行處理。幾乎所有十進(jìn)制子網(wǎng)掩碼都轉(zhuǎn)換為左側(cè)全部是一、右側(cè)全部是零的二進(jìn)制數(shù)字。其他一些常見的子網(wǎng)掩碼有:</p><p>  十進(jìn)制 二進(jìn)制</p&g

17、t;<p>  255.255.255.192 1111111.11111111.1111111.11000000</p><p>  255.255.255.224 1111111.11111111.1111111.11100000</p><p>  Internet RFC 1878 描述了 TCP/IP 網(wǎng)絡(luò)中使用的有效子網(wǎng)和子網(wǎng)掩碼。

18、</p><p><b>  網(wǎng)絡(luò)類</b></p><p>  Internet地址由管理Internet的機(jī)構(gòu)Inter NIC來分配。這些IP地址分成若干類。其中最常見的是 A、B 和 C 類。也有 D 和 E類,但是最終用戶通常不會使用。每個地址類都有不同的默認(rèn)子網(wǎng)掩碼??梢酝ㄟ^查看 IP 地址的第一個八位組來識別該 IP 地址的類別。下面是 A、B 和 C

19、類 Internet 地址的范圍,每一類地址都有一個示例:</p><p>  在某些情況下,由于網(wǎng)絡(luò)的物理拓?fù)浠蛞驗(yàn)榫W(wǎng)絡(luò)(或主機(jī))的數(shù)目在默認(rèn)的子網(wǎng)掩碼限制之下并不適用,所以默認(rèn)子網(wǎng)掩碼值可能不適合機(jī)構(gòu)的需要。下一部分將解釋如何使用子網(wǎng)掩碼劃分網(wǎng)絡(luò)。</p><p><b>  子網(wǎng)配置</b></p><p>  系統(tǒng)管理員可以進(jìn)一步劃分A

20、、B或C類TCP/IP網(wǎng)絡(luò)或?qū)@些網(wǎng)絡(luò)進(jìn)行子網(wǎng)配置。當(dāng)您將 Internet 的邏輯地址結(jié)構(gòu)(IP地址和子網(wǎng)的抽象世界)與真實(shí)世界中使用的物理網(wǎng)絡(luò)進(jìn)行協(xié)調(diào)時,就有必要進(jìn)行子網(wǎng)配置。</p><p>  接受IP地址塊分配的系統(tǒng)管理員可以用輕松符合這些地址的方式管理未經(jīng)組織的網(wǎng)絡(luò)。例如,您有一個廣域網(wǎng),在該廣域網(wǎng)中,TCP/IP 路由器連接的三個網(wǎng)絡(luò)(位于不同城市)中有 150 個主機(jī)。這三個網(wǎng)絡(luò)中的每個網(wǎng)絡(luò)都有5

21、0個主機(jī)。向您分配了C類網(wǎng)絡(luò)192.168.123.0。(此地址是為了便于說明,實(shí)際上來自Internet中未分配的范圍。)這意味著可以將地址192.168.123.1至192.168.123.254用于您的150個主機(jī)。</p><p>  在示例中不能使用的兩個地址為192.168.123.0和192.168.123.255,因?yàn)橹鳈C(jī)部分全部為一和全部為零的二進(jìn)制地址無效。零地址無效的原因是使用它在未指定主機(jī)

22、的情況下指定了網(wǎng)絡(luò)。255地址(在二進(jìn)制表示法中全部為一的主機(jī)地址)用來向網(wǎng)絡(luò)中的每個主機(jī)廣播消息。只需記住,任何網(wǎng)絡(luò)或子網(wǎng)中的第一個地址和最后一個地址不能分配給任何單獨(dú)主機(jī)。</p><p>  現(xiàn)在,您應(yīng)該能夠?qū)P地址給予254個主機(jī)。如果所有150臺計算機(jī)都在一個網(wǎng)絡(luò)中,則此操作會進(jìn)行得很順利。但是,您的150臺計算機(jī)位于三個單獨(dú)的物理網(wǎng)絡(luò)中。不用為每個網(wǎng)絡(luò)請求更多地址塊,只需將網(wǎng)絡(luò)分成使您可以在多個物理

23、網(wǎng)絡(luò)中使用一個地址塊的子網(wǎng)。</p><p>  在此情況下,使用使網(wǎng)絡(luò)地址更大和可能的主機(jī)地址范圍更小的子網(wǎng)掩碼將網(wǎng)絡(luò)分成四個子網(wǎng)。也就是說,您正在“借用”某些通常用于主機(jī)地址的位,并將它們用于地址的網(wǎng)絡(luò)部分。子網(wǎng)掩碼 255.255.255.192 給予您四個網(wǎng)絡(luò),每個網(wǎng)絡(luò)有62個主機(jī)。由于用二進(jìn)制表示255.255.255.192與 1111111.11111111.1111111.11000000 相同,

24、所以此操作可以順利進(jìn)行。最后一個八位組的前兩位數(shù)字變?yōu)榫W(wǎng)絡(luò)地址,所以您獲得了附加網(wǎng)絡(luò)00000000(0)、01000000(64)、10000000 (128)和11000000(192)。(某些管理員只使用將255.255.255.192作為子網(wǎng)掩碼的其中兩個子網(wǎng)。有關(guān)此主題的更多信息,請參閱RFC1878。)在這四個網(wǎng)絡(luò)中,最后6個二進(jìn)制數(shù)字可用于主機(jī)地址。</p><p>  使用子網(wǎng)掩碼255.255.

25、255.192,則您的192.168.123.0網(wǎng)絡(luò)變?yōu)樗膫€網(wǎng)絡(luò)192.168.123.0、192.168.123.64、192.168.123.128和192.168.123.192。這四個網(wǎng)絡(luò)將擁有以下有效主機(jī)地址:</p><p>  192.168.123.1-62</p><p>  192.168.123.65-126</p><p>  192.168

26、.123.129-190</p><p>  192.168.123.193-254</p><p>  再次重審,全部為一或全部為零的二進(jìn)制主機(jī)地址無效,所以您不能使用最后一個八位組為0、63、64、127、128、191、192或255的地址。</p><p>  現(xiàn)在,看兩個主機(jī)地址 192.168.123.71 和 192.168.123.133,您就會了解

27、其原理。如果使用默認(rèn) C 類子網(wǎng)掩碼 255.255.255.0,則這兩個地址都位于 192.168.123.0 網(wǎng)絡(luò)中。但是,如果使用子網(wǎng)掩碼 255.255.255.192,則它們位于不同網(wǎng)絡(luò)中;192.168.123.71 位于 192.168.123.64 網(wǎng)絡(luò)中,192.168.123.133 位于 192.168.123.128 網(wǎng)絡(luò)中。</p><p><b>  默認(rèn)網(wǎng)關(guān)</b&g

28、t;</p><p>  如果TCP/IP計算機(jī)需要與另一個網(wǎng)絡(luò)中的主機(jī)進(jìn)行通信,它通常通過稱為路由器的設(shè)備進(jìn)行通信。在TCP/IP術(shù)語中,主機(jī)中指定的、用于將主機(jī)子網(wǎng)鏈接到其他網(wǎng)絡(luò)的路由器稱為默認(rèn)網(wǎng)關(guān)。本節(jié)解釋TCP/IP如何確定是否將數(shù)據(jù)包發(fā)送到其默認(rèn)網(wǎng)關(guān)以到達(dá)網(wǎng)絡(luò)中的另一臺計算機(jī)或設(shè)備。</p><p>  當(dāng)主機(jī)嘗試使用TCP/IP與另一個設(shè)備進(jìn)行通信時,它會使用已定義的子網(wǎng)掩碼和

29、目標(biāo) IP 地址針對子網(wǎng)掩碼和其自己的IP地址進(jìn)行比較。此結(jié)果會告訴計算機(jī)目標(biāo)是本地主機(jī)還是遠(yuǎn)程主機(jī)。</p><p>  如果此過程的結(jié)果確定目標(biāo)是本地主機(jī),則計算機(jī)只將數(shù)據(jù)包發(fā)送到本地子網(wǎng)。如果比較結(jié)果確定目標(biāo)是遠(yuǎn)程主機(jī),則計算機(jī)將數(shù)據(jù)包轉(zhuǎn)發(fā)到其TCP/IP屬性中定義的默認(rèn)網(wǎng)關(guān)。然后,路由器負(fù)責(zé)將數(shù)據(jù)包轉(zhuǎn)發(fā)到正確的子網(wǎng)。</p><p><b>  疑難解答</b>

30、;</p><p>  TCP/IP網(wǎng)絡(luò)問題通常是由計算機(jī)的TCP/IP屬性中三個主要條目的錯誤配置導(dǎo)致的。了解TCP/IP配置中的錯誤如何影響網(wǎng)絡(luò)操作后,您可以解決許多常見TCP/IP問題。</p><p>  錯誤的子網(wǎng)掩碼:如果網(wǎng)絡(luò)將默認(rèn)掩碼外的其他子網(wǎng)掩碼用于其地址類,而客戶端仍使用該地址類的默認(rèn)子網(wǎng)掩碼進(jìn)行配置,則可以與遠(yuǎn)程網(wǎng)絡(luò)進(jìn)行通信但無法與某些附近網(wǎng)絡(luò)進(jìn)行通信。例如,如果創(chuàng)建

31、四個子網(wǎng)(例如在子網(wǎng)配置示例中),但是在TCP/IP配置中使用錯誤的子網(wǎng)掩碼255.255.255.0,則主機(jī)將無法確定某些計算機(jī)是否在與它們自己的子網(wǎng)不同的子網(wǎng)中。當(dāng)發(fā)生此情況時,發(fā)送到作為相同C類地址一部分的不同物理網(wǎng)絡(luò)中的主機(jī)的數(shù)據(jù)包將不會發(fā)送到默認(rèn)網(wǎng)關(guān)來進(jìn)行傳送。此問題的常見癥狀是計算機(jī)可以與其本地網(wǎng)絡(luò)中的主機(jī)以及所有遠(yuǎn)程網(wǎng)絡(luò)進(jìn)行通信,但無法與位置在附近并具有相同的A、B或C類地址的網(wǎng)絡(luò)進(jìn)行通信。要解決此問題,只需在該主機(jī)的TC

32、P/IP配置中輸入正確的子網(wǎng)掩碼。</p><p>  錯誤的IP地址:如果將那些IP地址在本地網(wǎng)絡(luò)的不同子網(wǎng)中的計算機(jī)放在一起,則它們無法進(jìn)行通信。它們會嘗試通過路由器相互發(fā)送數(shù)據(jù)包,而該路由器卻無法正確轉(zhuǎn)發(fā)這些數(shù)據(jù)包。此問題的癥狀是計算機(jī)可以與遠(yuǎn)程網(wǎng)絡(luò)中的主機(jī)進(jìn)行通信,但是無法與其本地網(wǎng)絡(luò)中的某些或全部計算機(jī)通信。要解決此問題,得保證同一物理網(wǎng)絡(luò)中的所有計算機(jī)具有同一IP子網(wǎng)中的IP地址。如果一個網(wǎng)段中的IP

33、地址已用完,還可使用一些解決方案進(jìn)行處理,但已超出本文范圍。</p><p>  錯誤的默認(rèn)網(wǎng)關(guān):使用錯誤的默認(rèn)網(wǎng)關(guān)配置的計算機(jī)能夠與其自己網(wǎng)段中的主機(jī)進(jìn)行通信,但是無法與某些或全部遠(yuǎn)程網(wǎng)絡(luò)中的主機(jī)進(jìn)行通信。如果一個物理網(wǎng)絡(luò)有多個路由器,且將錯誤的路由器配置為默認(rèn)網(wǎng)關(guān),則主機(jī)能夠與某些遠(yuǎn)程網(wǎng)絡(luò)進(jìn)行通信,但是無法與其他遠(yuǎn)程網(wǎng)絡(luò)進(jìn)行通信。如果組織中有一個路由器連接到內(nèi)部TCP/IP網(wǎng)絡(luò),另一個路由器連接到 Inter

34、net,則此問題很常見。</p><p><b>  參考</b></p><p>  TCP/IP 中的兩個常用參考是:</p><p>  “TCP/IP Illustrated, Volume 1:The Protocols”,Richard Stevens、Addison Wesley,1994</p><p>

35、  “Internetworking with TCP/IP, Volume 1:Principles, Protocols, and Architecture”,Douglas E. Comer、Prentice Hall,1995</p><p>  極力建議負(fù)責(zé)TCP/IP網(wǎng)絡(luò)的系統(tǒng)管理員至少使用其中一個參考。</p><p><b>  術(shù)語表</b><

36、/p><p>  廣播地址--主機(jī)部分全部為一的IP地址。</p><p>  主機(jī)--TCP/IP網(wǎng)絡(luò)中的計算機(jī)或其他設(shè)備。</p><p>  Internet -- 連接在一起并共享公共范圍的IP地址的全球網(wǎng)絡(luò)集合。</p><p>  Inter NIC--負(fù)責(zé)管理Internet中的IP地址的機(jī)構(gòu)。</p><p&g

37、t;  IP--用于在TCP/IP網(wǎng)絡(luò)或Internet上發(fā)送網(wǎng)絡(luò)數(shù)據(jù)包的網(wǎng)絡(luò)協(xié)議。</p><p>  IP地址--TCP/IP網(wǎng)絡(luò)或Internet主機(jī)的唯一32位地址。</p><p>  網(wǎng)絡(luò)--在本文中,“網(wǎng)絡(luò)”一詞有兩種含義。一種含義是指單一物理網(wǎng)段上的計算機(jī)組,另一種含義是指系統(tǒng)管理員分配的IP網(wǎng)絡(luò)地址范圍。</p><p>  網(wǎng)絡(luò)地址 -- 主機(jī)部

38、分全部為零的IP地址。</p><p>  八位組--一個8位數(shù)字,4個八位組構(gòu)成一個32位IP地址。它們的范圍是 00000000-11111111,對應(yīng)于十進(jìn)制值0-255。</p><p>  數(shù)據(jù)包--通過TCP/IP網(wǎng)絡(luò)或廣域網(wǎng)傳輸?shù)臄?shù)據(jù)單位。</p><p>  RFC(Request for Comment,征求意見文件)--用于定義Internet標(biāo)

39、準(zhǔn)的文檔。</p><p>  路由器--在不同IP網(wǎng)絡(luò)間傳輸網(wǎng)絡(luò)通信的設(shè)備。</p><p>  子網(wǎng)掩碼--一個32位數(shù)字,用于區(qū)分IP地址的網(wǎng)絡(luò)部分和主機(jī)部分。</p><p>  子網(wǎng)--通過將較大的網(wǎng)絡(luò)分成相等的部分而創(chuàng)建的較小網(wǎng)絡(luò)。</p><p>  TCP/IP -- 通常在 Internet 和大型網(wǎng)絡(luò)中廣泛使用的協(xié)議、標(biāo)準(zhǔn)

40、和實(shí)用工具的集合。</p><p>  廣域網(wǎng)(WAN)--大型網(wǎng)絡(luò),它是路由器分隔的較小網(wǎng)絡(luò)的集合。例如,Internet就是一個非常大的廣域網(wǎng)。</p><p>  The Research and Application on Transmission Control Protocol and Internet Protocol</p><p>  Intro

41、duction</p><p>  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

42、 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

43、 address into two parts. One part identifies the host (computer), the other part identifie</p><p>  When you configure the TCP/IP protocol on a Microsoft Windows computer, an IP address, subnet mask, and usu

44、ally 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 arti

45、cle is intended as a general introduction to the concepts of IP networks and subnetting. A glossary is included at the end of article.</p><p>  IP addresses included networks and hosts, An IP address is a 3

46、2-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 period

47、s, 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.16<

48、;/p><p>  110000000101000111101110000100</p><p>  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 exa

49、mple 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 numbe

50、rs separated by periods are the octets converted from binary to decimal notation.</p><p>  The basic working principle of Internet Protocol</p><p>  As a point of referenced, bear in mind that I

51、P is a member of the TCP/IP protocol suite. TCP functions at the Open Systems Interconnection(OSI)transport layer, or Layer 4.Its chief responsibility is to ensure reliable end-to-end connectivity. IP, located one layer

52、down, at the OSI network layer, or Layer 3, communicates the addresses of each packet/'s sender and receiver to the routers along the way. Routers and Layer 3 switches can read IP and other Layer 3 protocols .This in

53、formation, combined</p><p>  The routing process begins with an IP address that is unique to the sending end station .End stations may be assigned permanent IP addresses or they may borrow them as needed fro

54、m a Dynamic Host Configuration Protocol(DHCP)server or other service. Each packet carries a source address, which under current(IPv4)specifications is 32 bits long .In its header, each packet also carries the IP address

55、of the final destination. If the sending end station determines that the destination address is not lo</p><p>  If the destination IP address is local, the router searches an internal store of IP addresses a

56、nd local-device Media Access Control(MAC)addresses. This store is known as the Address Resolution Protocol(ARP)cache. ARP is the universal tool for matching IP addresses to MAC addresses. If the destination's MAC add

57、ress appears, the router installs that MAC address in the packet header(removing its own MAC address because that/'s no longer needed)and sends the packet to the destination end station. In</p><p>  If t

58、he route table lookup shows that the packet is destined for a non-local subnet, the router forwards the packet to the next-h(huán)op router using the next-h(huán)op router's MAC address. Routing tables are continuously built and

59、 rebuilt by intelligent discovery protocols, such as Routing Information Protocol or Open Shortest Path First(OSPF). Each router/'s routing table shows the best route to the destination address; for addresses that ma

60、y be several hops away, it shows the best next-h(huán)op router.</p><p>  For a TCP/IP wide area network (WAN) to work efficiently as a collection of networks, the routers that pass packets of data between network

61、s 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

62、 packet to the destination host's network. After the packet is delivered to the destination's network, the packet is delivered to the appropr</p><p>  For this process to work, an IP address has two

63、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.--Netwo

64、rk,.132--Host)or(192.168.123.0--network-address,0.0.0.132--host address).</p><p>  Subnet mask</p><p>  Which is required for TCP/IP to work, is the subnet mask. The subnet mask is used by the T

65、CP/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 addr

66、esses 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</p><p>  1111111

67、1.11111111.11111111.0000000.</p><p>  Lining up the IP address and the subnet mask together, the network and host portions of the address can be separated:</p><p>  11000000.10101000.01111011.10

68、000100--IP address(192.168.123.132)</p><p>  11111111.11111111.11111111.00000000--Subnet mask(255.255.255.0)</p><p>  The first 24 bits (the number of ones in the subnet mask) are identified as

69、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:</p><p>  11000000.10101000.01111011.00000000--Networ

70、k address(192.168.123.0)</p><p>  00000000.00000000.00000000.10000100--Host address(000.000.000.132)</p><p>  So now you know, for this example using a 255.255.255.0 subnet mask, that the networ

71、k 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

72、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 </p><p>  D

73、ecimal Binary</p><p>  255.255.255.192 1111111.11111111.1111111.11000000</p><p>  255.255.255.224 1111111.11111111.1111111.11100000</p><p>  Internet

74、 RFC 1878 describes the valid subnets and subnet masks that can be used on TCP/IP networks.</p><p>  Network classes</p><p>  Internet addresses are allocated by the InterNIC the organization th

75、at 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

76、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:</p><p

77、>  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 defau

78、lt subnet mask restrictions. The next section explains how networks can be divided using subnet masks.</p><p>  Subnetting</p><p>  A Class A, B, or C TCP/IP network can be further divided, or s

79、ubnetted, 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

80、.</p><p>  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 ne

81、twork 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

82、address is actually from a range that is not allocated on the Internet.) This means </p><p>  Two addresses that cannot be used in your example are 192.168.123.0 and 192.168.123.255 because binary addresses

83、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) i

84、s 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 h</p><p>  You should now be able to give

85、 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, y

86、ou divide your network into subnets that enable you to use one block of addresses on multiple physical networks.</p><p>  In this case, you divide your network into four subnets by using a subnet mask that m

87、akes 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

88、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 t</p><p

89、>  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 add

90、resses:</p><p>  192.168.123.1-62</p><p>  192.168.123.65-126</p><p>  192.168.123.129-190</p><p>  192.168.123.193-254</p><p>  Remember again, that binar

91、y 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.</p><p>  You can see how this works by looking at two host a

92、ddresses, 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 ar

93、e 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.</p><p>  Default gateways</p><p>  If a TCP/IP computer needs to comm

94、unicate 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

95、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.</p><p>  When a host attempts to commu

96、nicate 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 th

97、e computer whether the destination is a local host or a remote host.</p><p>  If the result of this process determines the destination to be a local host, then the computer will simply send the packet on the

98、 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 responsibil

99、ity of the router to forward the packet to the correct subnet.</p><p>  Troubleshooting</p><p>  TCP/IP network problems are often caused by incorrect configuration of the three main entries in

100、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.</p><p>  Incorrect Subnet Mask: If a network uses

101、 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 on

102、es. 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 a

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論