TCP/IP是如何工作的
TCP/IP是如何工作的
TCP/IP不是一個協(xié)議,而是一個協(xié)議族的統(tǒng)稱。里面包括IP協(xié)議、IMCP協(xié)議、TCP協(xié)議。下面是小編為您收集整理的TCP/IP是如何工作的,供大家參考!
TCP/IP是如何工作的
How TCP/IP Works
Over the past few years, one of the most written-about network topics has been IP. But even with all this attention, few, if any, stories have traced the protocol/'s basic workings, that is, how routers and Layer 3 switches act upon IP information to move Ethernet packets across the network.
As a point of referenced, bear in mind that IP 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 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 information, combined with routing tables and other network intelligence, is all it takes to get across the room or around the world via TCP/IP.
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 from 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 of the final destination.
If the sending end station determines that the destination address is not local, the packet goes to a first-hop router, typically one that is close and has been preassigned to the sender.
The router inspects the packet/'s IP address and performs a route table lookup to see if the destination end station resides on the local(physically connected)network, typically called an IP subnet .An IP subnet usually is assigned to each of the router/'s network interfaces.
If the destination IP address is local, the router searches an internal store of IP addresses and 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 address 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 the event that the destination MAC address does not appear in the ARP cache ―it might have timed out, for instance― the router must broadcast an ARP request to the subnet referenced by the packet/'s destination IP address. The end station with that IP address responds, sending back its MAC address .The router updates its cache, installs the new MAC address into the packet header and launches the packet. If the route table lookup shows that the packet is destined for a non-local subnet, the router forwards the packet to the next-hop router using the next-hop router/'s MAC address. Routing tables are continuously built and 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 may be several hops away, it shows the best next-hop router.
在過去幾年中,寫得最多的網(wǎng)絡(luò)題目之一就是IP。但是,即使引起了這么多的注意,仍很少有(如果有的話)文章介紹此協(xié)議的基本工作原理,即路由器和第三層交換器是如何對IP信息起作用,以便在整個網(wǎng)絡(luò)中傳遞以太網(wǎng)包的。
作為參考,請記住,IP是TCP/IP整套協(xié)議中的一個協(xié)議。
TCP完成開放系統(tǒng)互連(OSI)模型中傳輸層,即第四層的功能。它的主要責(zé)任是確保端至端之間的可靠連接。IP位于下一層,在OSI的網(wǎng)絡(luò)層,即第三層,把每個包的發(fā)送者和接收者地址告訴一路上各個路由器。路由器和第三層交換器可以讀出IP和其他的第三層協(xié)議。這些信息與路由表以及其他網(wǎng)絡(luò)智能結(jié)合在一起,能通過TCP/IP在整個房間或圍繞地球進(jìn)行傳遞。
路由過程始于對發(fā)送端站而言是唯一的一個IP地址,端站可以被分配永久的IP地址,或者按需要從動態(tài)主機(jī)配置協(xié)議(DHCP)服務(wù)器或其他服務(wù)中借用。
每個包攜帶一個源地址,在目前(IPv4)規(guī)范下,包長度是32位。在報(bào)頭中,每個包也攜帶最終目的地的IP地址。
如果發(fā)送端站確定目的地址不在本地,該包就被送到第一跳路由器,一般來說,該路由器是在附近的,并已被預(yù)先分配給發(fā)送者。
該路由器檢查包的IP地址,查找路由表,看看目的端點(diǎn)是否位于本地(物理位置)網(wǎng)絡(luò),它通常叫做IP子網(wǎng),IP子網(wǎng)一般被分配到路由器的每個網(wǎng)絡(luò)接口上。
如果目的IP地址為本地的,該路由器就搜尋存儲著IP地址和本地設(shè)備介質(zhì)訪問控制(MAC)地址的內(nèi)部存儲器,這個存儲器叫作地址分辨協(xié)議(ARP) 高速緩存。ARP是把IP地址映射到MAC地址的通用工具。如果目的地的MAC地址出現(xiàn)了,該路由器就把這個MAC地址裝進(jìn)包的報(bào)頭中(取掉自己的MAC 地址,因?yàn)椴辉傩枰?,把該包送到目的端站。
萬一目的地的MAC地址沒有出現(xiàn)在ARP高速緩存中(例如,有可能超時了),路由器必須向與包的目的IP地址有關(guān)的子網(wǎng)廣播一個ARP請求,擁有此IP地址的端站就作出響應(yīng),把MAC地址發(fā)送回去,路由器因此更新高速緩存,把新的MAC地址裝進(jìn)包的報(bào)頭并發(fā)送該包。
如果查找路由表顯示包的目的地不在本地子網(wǎng),路由器就利用下一跳路由器的MAC地址把包轉(zhuǎn)發(fā)給下一跳路由器。路由表由智能發(fā)現(xiàn)協(xié)議,如路由信息協(xié)議或者開放最短路徑優(yōu)先協(xié)議,不斷地被建立和再建立。每個路由器的路由表顯示了到達(dá)目的地址的最佳路徑,對于要有幾跳的地址,它顯示出最佳的下一跳路由器。
電子墨水與紙
Electronic Ink and Paper
Cambridge, Mass.-based E Ink Corp.is a leader in the development of electronic ink and “paper”that could replace newspapers and books as we know them today.
The use of electronic ink and two-way wireless communication could lead to the creation of electronic books that will renew themselves with new selections when readers are finished with the current book——or newspapers that update themselves with the latest news while being read.
Electronic ink, as devised by E Ink, is a clear, liquid plastic in which there are microcapsules that contain white chips in a blue dye.The microcapsules are suspended in a substance similar to vegetable cooking oil.The white chips are negatively charged so they react to electrical stimulus.
This ink can be spread on any surface——from walls to computer screens——says Russell Wilcox, vice president and general manager at E Ink.However, the writing surface would look similar to a very thin laptop display screen with a clear surface on the front and circuitry on the back.
A positive charge applied on the top surface of the ink will allow the white to show, making the surface as white as a sheet of paper.If the charge moves to the bottom, the dark particles will show, giving the appearance of blue ink.Electronic ink uses less power than a PalmPilot, and the message remains displayed even after the power is turned off.
The ultimate goal is for the electronic pages to look and feel like paper.However, for the foreseeable future, these new books are likely to be bulkier than paperback books.
Electronic ink will have interactive qualities, although E Ink isn't sure people will be able to write with it for a while——they will mainly receive messages.Xerox Corp.is also working on a technology that could replace paper as portable, renewable reading matter.
The Xerox technology is called Gyricon.It's composed of a silicon rubber compound with the thickness and flexilility of poster board.The Gyricon sheets have thousands of plastic balls suspended in oil.Each ball is black on one side and white on the other and together they act as pixels to display images.Images can be updated much the same way as with a monitor.The beads are embedded in a large sheet, with each microcapsule suspended in oil to allow the beads to rotate in their orbits, says Robert Sprague, manager of the document hardware lab and electronic paper projects at Xerox's Palo Alto Research Center.The paper could be powered by a matrix of transistors, such as those in laptop computer screens.Gyricon uses reflective light, like real paper, so it would use less electricity.
A Gyricon book will eventually be connected with a wireless device that will enable a reader to download content from the Internet.
Xerox will also make the Gyricon interactive, so a user could write on it and reuse it.
(美國) 麻省坎布里奇市的E Ink公司是開發(fā)電子墨水和“紙”的先導(dǎo),這種墨水和紙將替代今天我們所知道的報(bào)紙與書籍。
利用電子墨水和雙向無線通信有可能導(dǎo)致產(chǎn)生電子書籍 (當(dāng)讀者看完當(dāng)前的書本時,可以選擇新書刷新) 或者產(chǎn)生能邊讀邊用最新消息自我更新的報(bào)紙。
由E Ink公司發(fā)明的電子墨水是一種透明的液體塑料,里面有微型封裝塊,封裝塊內(nèi)含有在藍(lán)色染料中的白色小片。微型封裝塊懸浮在像食用油那樣 的物質(zhì)中。白色小片帶負(fù)電荷,因而它們能對電刺激作出反應(yīng)。
據(jù)E Ink公司的副總裁兼總經(jīng)理Russell Wilcox稱,這種墨水可以涂在任何表面,從墻到計(jì)算機(jī)屏幕。然而,書寫面看上去很像極薄的便攜機(jī)顯示屏, 在正面有一透明的表面,在背面有線路。
加上墨水表面上方的正電荷將使白色顯現(xiàn)出來,使表面像一張紙那樣白。如果正電荷加到下方,黑粒子將顯現(xiàn)出來,給出藍(lán)墨水的痕跡。
電子墨水耗電比PalmPilot掌上型電腦還要少,甚至在斷電之后信息仍能顯示出來。
這種電子頁面的最終目標(biāo)是看上去和感覺上都像紙。但在可預(yù)見到的未來,這些新型書很可能比真正紙的書體積更大。
電子墨水具有交互的品性,雖然E Ink公司吃不準(zhǔn)人們是否會用它寫字—它們主要用來接收信息。
施樂公司也在對一種能替代紙的技術(shù)——便攜式、可刷新的讀物,進(jìn)行研究。
施樂的這項(xiàng)技術(shù)叫Gyricon。它由硅膠化合物組成,具有像廣告宣傳牌那樣的厚度和柔軟性。Gyricon片有成千上萬個懸浮在油中的塑料球。每個球一面是黑的,另一面是白的,兩者共同起到顯示圖形的像素的作用。圖形能以監(jiān)示器那樣的 同樣方法進(jìn)行更新。
施樂的Palo Alto研究中心文檔硬件實(shí)驗(yàn)室和電子紙項(xiàng)目經(jīng)理Robert Sprague稱,小球被嵌在很大的片子中,每個微型封裝塊懸浮在油中,允許小球在自己的軌道中旋轉(zhuǎn)。這種紙能由晶體管陣列供電,如便攜機(jī)屏幕那樣。 Gyricon像真正的 紙那樣利用反射光,因而它用較少的電。
Gyricon書最終將與無線設(shè)備相連,能使讀者從因特網(wǎng)上下載內(nèi)容。
施樂也將使Gyricon具有交互功能,因而用戶能在它上面寫字和反復(fù)使用。