版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、chapter 5 the network layer01 introduction 6h02 physical layer6h03 data link layer6h04 mac sublayer8h05 network layer6h06 transport layer6h07 application layer6h08 network security4htotal 48hcontentsip layer (end-to-end packets) 應(yīng)用層運(yùn)輸層網(wǎng)絡(luò)層表示層會(huì)話層數(shù)據(jù)鏈路層物理層7654321osi應(yīng)用層網(wǎng)絡(luò)接口層網(wǎng)際層 ip (各種應(yīng)用層協(xié)議如telnet, ftp, s
2、mtp 等)運(yùn)輸層(tcp 或 udp)tcp/ip應(yīng)用層物理層網(wǎng)絡(luò)層 ip (各種應(yīng)用層協(xié)議如telnet, ftp, smtp 等)運(yùn)輸層(tcp 或 udp)數(shù)據(jù)鏈路層hybrid model(textbook model)the network layer is the lowest layer that deals with end-to-end transmission. it must: -know about the topology of the communication subnet ; -take care to choose routes, and -deal wit
3、h data exchange between different networks.5.1 network layer design issuesstore-and-forward packet switchingservices provided to the transport layerimplementation of connectionless serviceimplementation of connection-oriented servicecomparison of virtual-circuit and datagram subnetsstore-and-forward
4、 packet switchingthe environment of the network layer protocols.a host with a packet to send transmits it to the nearest router, either on its own lan or over a point-to-point link to the carrier. the packet is stored there until it has fully arrived so the checksum can be verified. then it is forwa
5、rded to the next router along the path until it reaches the destination host. fig 5-1services provided to the transport layerthe network services to the transport layer goals: the services should be independent of the router technology. the transport layer should be shielded from the routers present
6、. the uniform addresses plan across lans and wans.connection-oriented or connectionless?- the routers job is moving packets around. the subnet is inherently unreliable. therefore, the hosts should do error control and flow control themselves. the conclusion is connectionless, with primitives send pa
7、cket and receive packet and little else.- the subnet service should be reliable, connection-oriented.these two camps are exemplified by the internet and atm. implementation of connectionless servicerouting within a diagram subnet.implementation of connection-oriented servicerouting within a virtual-
8、circuit subnet.comparison of virtual-circuit and datagram subnets5-4trade-offs1. router memory space and bandwidth: vc allow packets to contain circuit numbers instead of full destination addresses. it saves bandwidth. the price paid is the table space within the routers. 2. setup time versus addres
9、s parsing time: using vcs requires a setup phase, need time and resources. however, routing in a vc subnet is easy. in a datagram subnet, a more complicated lookup procedure is required.3. amount of table space required in router memory: a datagram subnet needs an entry for every possible destinatio
10、n, whereas a virtual-circuit subnet just needs an entry for each virtual circuit.4. quality of service and avoiding congestion: vcs have some advantages when the connection is established. with a datagram subnet, congestion avoidance is more difficult.5. overhead required to set up and clear a vc: i
11、f the majority of the traffic is expected to be transaction, the use of vc is not wise. (permanent vc may be useful here.6. loss of a communication line is fatal to virtual circuits using it but can be easily compensated for if datagrams are used. datagrams also allow the routers to balance the traf
12、fic throughout the subnet, since routes can be changed partway through a long sequence of packet transmissions.中間設(shè)備又稱為中間系統(tǒng)或中繼(relay)系統(tǒng)。 物理層中繼系統(tǒng):轉(zhuǎn)發(fā)器(repeater)。 數(shù)據(jù)鏈路層中繼系統(tǒng):網(wǎng)橋或橋接器(bridge)。 網(wǎng)絡(luò)層中繼系統(tǒng):路由器(router)。 網(wǎng)橋和路由器的混合物:橋路器(brouter)。 網(wǎng)絡(luò)層以上的中繼系統(tǒng):網(wǎng)關(guān)(gateway)。 網(wǎng)絡(luò)互相連接起來要使用一些中間設(shè)備網(wǎng)絡(luò)互相連接起來要使用一些中間設(shè)備 當(dāng)中繼系統(tǒng)是轉(zhuǎn)發(fā)器或
13、網(wǎng)橋時(shí),一般并不稱之為網(wǎng)絡(luò)互連,因?yàn)檫@僅僅是把一個(gè)網(wǎng)絡(luò)擴(kuò)大了,而這仍然是一個(gè)網(wǎng)絡(luò)。 網(wǎng)關(guān)由于比較復(fù)雜,目前使用得較少?;ヂ?lián)網(wǎng)都是指用路由器進(jìn)行互連的網(wǎng)絡(luò)。由于歷史的原因,許多有關(guān) tcp/ip 的文獻(xiàn)將網(wǎng)絡(luò)層使用的路由器稱為網(wǎng)關(guān)。 網(wǎng)絡(luò)互連使用路由器 直接交付和間接交付直接交付和間接交付 間接交付間接交付間接交付abc直接交付直接交付直接交付不需要使用路由器但間接交付就必須使用路由器typical router 路由選擇路由選擇處理機(jī)路由選擇協(xié)議路由表3輸入端口3交換結(jié)構(gòu)輸入端口輸出端口分組轉(zhuǎn)發(fā)轉(zhuǎn)發(fā)表分組處理輸出端口11133122223網(wǎng)絡(luò)層2數(shù)據(jù)鏈路層1物理層“轉(zhuǎn)發(fā)轉(zhuǎn)發(fā)”和和“路由選擇路由
14、選擇”的區(qū)別的區(qū)別 “轉(zhuǎn)發(fā)”(forwarding)就是路由器根據(jù)轉(zhuǎn)發(fā)表將用戶的 ip 數(shù)據(jù)報(bào)從合適的端口轉(zhuǎn)發(fā)出去?!奥酚蛇x擇”(routing)則是按照分布式算法,根據(jù)從各相鄰路由器得到的關(guān)于網(wǎng)絡(luò)拓?fù)涞淖兓?情況,動(dòng)態(tài)地改變所選擇的路由。路由表是根據(jù)路由選擇算法得出的。而轉(zhuǎn)發(fā)表是從路由表得出的。在討論路由選擇的原理時(shí),往往不去區(qū)分轉(zhuǎn)發(fā)表和路由表的區(qū)別, 輸入端口對(duì)線路上輸入端口對(duì)線路上收到的分組的處理收到的分組的處理 數(shù)據(jù)鏈路層剝?nèi)撞亢臀膊亢?,將分組送到網(wǎng)絡(luò)層的隊(duì)列中排隊(duì)等待處理。這會(huì)產(chǎn)生一定的時(shí)延。 物理層處理數(shù)據(jù)鏈路層處理網(wǎng)絡(luò)層處理 分組排隊(duì) 交換結(jié)構(gòu) 輸入端口的處理從線路接收分組查
15、表和轉(zhuǎn)發(fā)輸出端口將交換結(jié)構(gòu)傳送來的分組發(fā)送到輸出端口將交換結(jié)構(gòu)傳送來的分組發(fā)送到線路線路 當(dāng)交換結(jié)構(gòu)傳送過來的分組先進(jìn)行緩存。數(shù)據(jù)鏈路層處理模塊將分組加上鏈路層的首部和尾部,交給物理層后發(fā)送到外部線路。 物理層處理數(shù)據(jù)鏈路層處理網(wǎng)絡(luò)層處理 分組排隊(duì) 輸出端口的處理向線路發(fā)送分組緩存管理交換結(jié)構(gòu)分組丟棄分組丟棄 若路由器處理分組的速率趕不上分組進(jìn)入隊(duì)列的速率,則隊(duì)列的存儲(chǔ)空間最終必定減少到零,這就使后面再進(jìn)入隊(duì)列的分組由于沒有存儲(chǔ)空間而只能被丟棄。路由器中的輸入或輸出隊(duì)列產(chǎn)生溢出是造成分組丟失的重要原因。 5.2 routing algorithmsthe optimality principl
16、eshortest path routingfloodingdistance vector routinglink state routinghierarchical routingbroadcast routingmulticast routingrouting for mobile hostsrouting in ad hoc networksconflict between fairness and optimalitycorrectness, simplicity, robustness, stability, fairness, and optimality are properti
17、es desirable in a routing algorithm. however, some of them are often contradictory goals. reducing the number of hops tends to improve the delay and also reduce the amount of bandwidth consumed, which tends to improve the throughput as well. routing algorithms can be grouped into two major classes:
18、1. in nonadaptive algorithms, the choice of the route is computed in advance, off-line, and downloaded to the routers when the network is booted. also called static routing. 2. adaptive algorithms change their routing decisions to reflect changes in the network (topology and traffic). adaptive algor
19、ithms differ in where they get their information (e.g. from adjacent routers, or from all routers), when they change the routes, and what metric is used for optimization (e.g., distance, number of hops, or estimated transit time). also called dynamic routing.the optimality principle(a) a subnet. (b)
20、 a sink tree for router b.“if router j is on the optimal path from router i to router k, then the optimal path from j to k also falls along the same route”. consequently the set of optimal routes from all sources to a given destination form a tree rooted at the destination. such a tree is called a s
21、ink tree. the goal of all routing algorithms is to discover and use the sink trees for all routers.i最佳路由最佳路由 不存在一種絕對(duì)的最佳路由算法。所謂“最佳”只能是相對(duì)于某一種特定要求下得出的較為合理的選擇而已。實(shí)際的路由選擇算法,應(yīng)盡可能接近于理想的算法。 路由選擇是個(gè)非常復(fù)雜的問題它是網(wǎng)絡(luò)中的所有結(jié)點(diǎn)共同協(xié)調(diào)工作的結(jié)果。路由選擇的環(huán)境往往是不斷變化的,而這種變化有時(shí)無法事先知道。 從路由算法從路由算法 的自適應(yīng)性考慮的自適應(yīng)性考慮靜態(tài)路由選擇策略即非自適應(yīng)路由選擇,其特點(diǎn)是簡(jiǎn)單和開銷較小,
22、但不能及時(shí)適應(yīng)網(wǎng)絡(luò)狀態(tài)的變化。 動(dòng)態(tài)路由選擇策略即自適應(yīng)路由選擇,其特點(diǎn)是能較好地適應(yīng)網(wǎng)絡(luò)狀態(tài)的變化,但實(shí)現(xiàn)起來較為復(fù)雜,開銷也比較大。 shortest path routingthe first 5 steps used in computing the shortest path from a to d. the arrows indicate the working node.1425361112223355stepnd(2)d(3)d(4)d(5)d(6)initialization125111,424221,4,5231431,2,4,5312441,2,3,4,5212451,2
23、,3,4,5,6231214253611122destinationnext hopdistance1-222343441542644結(jié)點(diǎn)1 上路由表q: 計(jì)算以結(jié)點(diǎn)2為起點(diǎn),到其他結(jié)點(diǎn)的最短路由以及相應(yīng)的轉(zhuǎn)發(fā)表。 another static algorithm is flooding, in which every incoming packet is sent out on every outgoing line. flooding can generates vast numbers of duplicate packets. one measure to control the du
24、plication is hop counter. an alternative technique is to keep track of packets flooded, to avoid sending them out a second time. then needs a list per source router telling which sequence numbers has already been seen. any incoming packet on the list is not flooded. a variation is selective flooding
25、. the routers send only on those lines that are going approximately in the right direction. flooding is not practical, but the tremendous robustness of flooding does have some uses. in military, in distributed database applications, in wireless networks and in use as a metric against which other rou
26、ting algorithms can be compared. because flooding always chooses the shortest. floodingmodern computer networks generally use dynamic routing algorithms rather than the static ones because static algorithms do not take the current network load into account. two dynamic algorithms in particular, dist
27、ance vector routing and link state routing, are the most popular. distance vector routing algorithms operate by having each router maintain a table (i.e, a vector) giving the best known distance to each destination and which line to use to get there. these tables are updated by exchanging informatio
28、n with the neighbors. the algorithm was the original arpanet routing algorithm and was also used in the internet under the name rip.1) distance vector routinga routing table indexed by one entry for each router in the subnet. this entry contains two parts: the line to use for that destination and an
29、 estimate of the time/distance to that destination. the metric used might be hops, time delay, total number of packets queued etc.assume that delay is used as a metric. once every t msec each router sends to each neighbor a list of its estimated delays to each destination. it also receives a similar
30、 list from each neighbor. if the router knows that the delay to x is m msec, it also knows that it can reach router i via x in xi + m msec. by performing this calculation for each neighbor, a router can find out which estimate seems the best and use that estimate and the corresponding line in its ne
31、w routing table. note that the old routing table is not used in the calculation.距離向量算法距離向量算法收到相鄰路由器(其地址為 x)的一個(gè) rip 報(bào)文:(1) 先修改此 rip 報(bào)文中的所有項(xiàng)目:將“下一跳”字段中的地址都改為 x,并將所有的“距離”字段的值加 1。(2) 對(duì)修改后的 rip 報(bào)文中的每一個(gè)項(xiàng)目,重復(fù)以下步驟:若項(xiàng)目中的目的網(wǎng)絡(luò)不在路由表中,則將該項(xiàng)目加到路由表中。 否則 若下一跳字段給出的路由器地址是同樣的,則將收到的項(xiàng)目替換原路由表中的項(xiàng)目。 否則 若收到項(xiàng)目中的距離小于路由表中的距離,則進(jìn)
32、行更新,否則,什么也不做。(3) 若 3 分鐘還沒有收到相鄰路由器的更新路由表,則將此相鄰路由器記為不可達(dá)的路由器,即將距離置為16(距離為16表示不可達(dá))。(4) 返回。rip(routing information protocol)rip基于distance-vector,使用udp報(bào)文進(jìn)行路由信息的交換。rip每隔30秒鐘發(fā)送一次路由刷新報(bào)文,如果在180秒內(nèi)收不到從某一網(wǎng)絡(luò)鄰居發(fā)來的路由刷新報(bào)文,則將該網(wǎng)絡(luò)鄰居的所有路由標(biāo)記為不可達(dá)。如果在300秒之內(nèi)收不到從某一鄰居發(fā)來的路由刷新報(bào)文,則將該網(wǎng)上鄰居的路由從路由表中清除。rip-1不具備報(bào)文加密驗(yàn)證功能,而在rip-2中實(shí)現(xiàn)了該功能
33、。rip使用跳數(shù)(hop count)來衡量到達(dá)信宿機(jī)的距離,稱為路由權(quán)(routing metric)。在rip中,路由器到與它直接相連網(wǎng)絡(luò)的跳數(shù)為1,通過n個(gè)路由器可達(dá)的網(wǎng)絡(luò)的跳數(shù)為n+1,其余依此類推。為限制收斂時(shí)間,rip規(guī)定metric取值015之間的整數(shù),大于或等于16的跳數(shù)被定義為無窮大,即目的網(wǎng)絡(luò)或主機(jī)不可達(dá)。1 1 2 1 3 1 fedcba5 1 6 1 2 1 5 1 3 1 4 1 4 1 6 1 1 1 5 1 一開始,各路由表只有到相鄰路由器的信息網(wǎng) 3網(wǎng) 2網(wǎng) 4網(wǎng) 6網(wǎng) 5網(wǎng) 1“4”表示“從本路由器到網(wǎng) 4”“1”表示“距離是 1”“”表示“直接交付”1 1
34、 2 1 3 1 fedcba5 1 6 1 2 1 5 1 3 1 4 1 4 1 6 1 1 1 5 1 路由器 b 收到相鄰路由器 a 和 c 的路由表網(wǎng) 3網(wǎng) 2網(wǎng) 4網(wǎng) 6網(wǎng) 5網(wǎng) 11 1 2 1 3 1 4 1 6 1 1 2 a2 2 a3 1 4 1 6 2 c更新后a 說:“我到網(wǎng) 1 的距離是 1。”因此 b 現(xiàn)在也可以到網(wǎng) 1,距離是 2,經(jīng)過 a?!? 1 2 1 3 1 fedcba5 1 6 1 2 1 5 1 3 1 4 1 4 1 6 1 1 1 5 1 路由器 b 收到相鄰路由器 a 和 c 的路由表網(wǎng) 3網(wǎng) 2網(wǎng) 4網(wǎng) 6網(wǎng) 5網(wǎng) 11 1 2 1 3 1
35、 4 1 6 1 1 2 a2 2 a3 1 4 1 6 2 c更新后a 說:“我到網(wǎng) 2 的距離是 1。”因此 b 現(xiàn)在也可以到網(wǎng) 2,距離是 2,經(jīng)過 a?!弊罱K所有的路由器的路由表都更新了fedcba1 1 2 1 3 1 4 2 b5 2 e6 3 b1 1 2 2 a3 2 a4 3 a5 1 6 2 f1 2 e2 2 d3 3 c4 2 c5 1 6 1 1 3 b2 3 b3 2 b4 1 5 2 f6 1 網(wǎng) 2網(wǎng) 6網(wǎng) 5網(wǎng) 1網(wǎng) 3網(wǎng) 41 2 a2 1 3 2 a4 3 a5 1 6 2 f1 2 a2 2 a3 1 4 1 5 3 c6 2 crip 協(xié)議的優(yōu)缺點(diǎn)協(xié)議
36、的優(yōu)缺點(diǎn) rip 存在的一個(gè)問題是當(dāng)網(wǎng)絡(luò)出現(xiàn)故障時(shí),要經(jīng)過比較長(zhǎng)的時(shí)間才能將此信息傳送到所有的路由器。 rip 協(xié)議最大的優(yōu)點(diǎn)就是實(shí)現(xiàn)簡(jiǎn)單,開銷較小。rip 限制了網(wǎng)絡(luò)的規(guī)模,它能使用的最大距離為 15(16 表示不可達(dá))。路由器之間交換的路由信息是路由器中的完整路由表,因而隨著網(wǎng)絡(luò)規(guī)模的擴(kuò)大,開銷也就增加。 r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2正常情況1 1 1 2 r1r1 說:“我到網(wǎng) 1 的距離是 1,是直接交付?!薄?”表示“從本路由器到網(wǎng) 1”“1”表示“距離是 1”“ ”表示“直接交付”r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2正常情況1 1 1 2 r1r2 說:“我到網(wǎng) 1 的距離是 2,是經(jīng)過 r1
37、?!薄?”表示“從本路由器到網(wǎng) 1”“2”表示“距離是 2”“r1”表示經(jīng)過 r1r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2網(wǎng) 1出了故障正常情況1 1 1 16 1 2 r11 2 r1r1 說:“我到網(wǎng) 1 的距離是 16 (表示無法到達(dá)), 是直接交付?!钡?r2 在收到 r1 的更新報(bào)文之前,還發(fā)送原來的報(bào)文,因?yàn)檫@時(shí) r2 并不知道 r1 出了故障。r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2網(wǎng) 1出了故障正常情況1 1 1 16 1 2 r11 2 r1r1 收到 r2 的更新報(bào)文后,誤認(rèn)為可經(jīng)過 r2 到達(dá)網(wǎng)1,于是更新自己的路由表,說:“我到網(wǎng) 1 的距離是
38、3,下一跳經(jīng)過 r2”。然后將此更新信息發(fā)送給 r2。1 3 r2r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2網(wǎng) 1出了故障正常情況1 1 1 16 1 2 r11 2 r1r2 以后又更新自己的路由表為“1, 4, r1”,表明 “我到網(wǎng) 1 距離是 4,下一跳經(jīng)過 r1”。 1 3 r21 4 r1r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2r2r1網(wǎng) 1網(wǎng) 3網(wǎng) 2網(wǎng) 1出了故障正常情況1 1 1 16 1 3 r21 5 r21 16 r21 2 r11 2 r11 4 r11 16 r1這樣不斷更新下去,直到 r1 和 r2 到網(wǎng) 1 的距離都增大到 16 時(shí),r1 和 r2 才知道網(wǎng)1是不可
39、達(dá)的。 這就是好消息傳播得快,而壞消息傳播得慢。網(wǎng)絡(luò)出故障的傳播時(shí)間往往需要較長(zhǎng)的時(shí)間(例如數(shù)分鐘)。這是 rip 的一個(gè)主要缺點(diǎn)。 ref: igrp協(xié)議協(xié)議cisco公司在1980年代中期開發(fā)了igrp (interior gateway routing protocol,內(nèi)部網(wǎng)關(guān)路由協(xié)議),是一個(gè)距離矢量路由協(xié)議,與rip相比,igrp具有以下特點(diǎn): 與rip一樣,從所有配置接口上定期發(fā)出路由更新;igrp使用的復(fù)合度量值來建立路由最佳路徑;支持單個(gè)目的地的非同等成本負(fù)載均衡:最多6條; 缺省情況下,igrp每90秒發(fā)送一次路由更新廣播; 默認(rèn)最大跳數(shù)為100,但可以設(shè)置為255; 快速
40、收斂:觸發(fā)更新。igrp復(fù)合度量值復(fù)合度量值igrp協(xié)議使用的復(fù)合度量值使它可以比rip協(xié)議更加精確的評(píng)價(jià)路由。度量值包括的指標(biāo)有:bandwidth帶寬,單位是kbpsdelay累積的接口延遲,單位是10微秒reliability數(shù)據(jù)包傳輸?shù)某晒β?,取值?0 到 255.loading有效帶寬mtu最大傳輸單元.2) link state routingthe idea behind link state routing can be stated as five parts. each router must do the following:discover its neighbors
41、, learn their network address.measure the delay or cost to each of its neighbors.construct a packet telling all it has just learned.send this packet to all other routers.compute the shortest path to every other router.in effect, the complete topology and all delays are experimentally measured and di
42、stributed to every router. then dijkstras algorithm can be run to find the shortest path to every other router.learning about the neighbors(a) nine routers and a lan. (b) a graph model of (a).when a router is booted, its first task is to learn neighbors. it sends a special hello packet on each line.
43、 the router on the other end is expected to send back a reply telling who it is. building link state packets(a) a subnet. (b) the link state packets for this subnet.distributing the link state packetsthe packet buffer for router b in the previous slide.the idea is to use flooding to distribute the l
44、ink state packets. to keep in check, each packet contains a sequence number that is incremented for each new packet sent. once a router has accumulated a full set of link state packets, it construct the entire subnet graph using dijkstras algorithm. 鏈路狀態(tài)數(shù)據(jù)庫(kù)鏈路狀態(tài)數(shù)據(jù)庫(kù)(link-state database) 由于各路由器之間頻繁地交換鏈
45、路狀態(tài)信息,因此所有的路由器最終都能建立一個(gè)鏈路狀態(tài)數(shù)據(jù)庫(kù)。這個(gè)數(shù)據(jù)庫(kù)實(shí)際上就是全網(wǎng)的拓?fù)浣Y(jié)構(gòu)圖,它在全網(wǎng)范圍內(nèi)是一致的(這稱為鏈路狀態(tài)數(shù)據(jù)庫(kù)的同步)。ospf 的鏈路狀態(tài)數(shù)據(jù)庫(kù)能較快地進(jìn)行更新,使各個(gè)路由器能及時(shí)更新其路由表。ospf 的更新過程收斂得快是其重要優(yōu)點(diǎn)。 the five types of ospf messeges5-66ospf (open shortest path first)ospf 的特點(diǎn)的特點(diǎn) ospf 規(guī)定每隔一段時(shí)間( 30 分鐘),要刷新一次數(shù)據(jù)庫(kù)中的鏈路狀態(tài)。 由于一個(gè)路由器的鏈路狀態(tài)只涉及到與相鄰路由器的連通狀態(tài),因而與整個(gè)互聯(lián)網(wǎng)的規(guī)模并無直接關(guān)系。因此
46、當(dāng)互聯(lián)網(wǎng)規(guī)模很大時(shí),ospf 協(xié)議要比距離向量協(xié)議 rip 好得多。 ospf 沒有“壞消息傳播得慢”的問題,據(jù)統(tǒng)計(jì),其響應(yīng)網(wǎng)絡(luò)變化的時(shí)間小于 100 ms。 ospf 不用 udp 而是直接用 ip 數(shù)據(jù)報(bào)傳送,可見 ospf 的位置在網(wǎng)絡(luò)層。 數(shù)據(jù)報(bào)很短的另一好處是可以不必將長(zhǎng)的數(shù)據(jù)報(bào)分片傳送。分片傳送的數(shù)據(jù)報(bào)只要丟失一個(gè),就無法組裝成原來的數(shù)據(jù)報(bào),而整個(gè)數(shù)據(jù)報(bào)就必須重傳。 ospf 的其他特點(diǎn)的其他特點(diǎn) ospf 對(duì)不同的鏈路可根據(jù) ip 分組的不同服務(wù)類型 tos 而設(shè)置成不同的代價(jià)。因此,ospf 對(duì)于不同類型的業(yè)務(wù)可計(jì)算出不同的路由。 如果到同一個(gè)目的網(wǎng)絡(luò)有多條相同代價(jià)的路徑,那么
47、可以將通信量分配給這幾條路徑。這叫作多路徑間的負(fù)載平衡。 所有在 ospf 路由器之間交換的分組都具有鑒別的功能。 支持可變長(zhǎng)度的子網(wǎng)劃分和無分類編址 cidr。 每一個(gè)鏈路狀態(tài)都帶上一個(gè) 32 bit 的序號(hào),序號(hào)越大狀態(tài)就越新。distance vector versus link-state packetsrouting table in athe subnet the link state packets distance vectorfrom a a - b 4 c 6 d 9 e 5 f 10 a - b b 4 c b 6d b 9e e 5f b 10forwarding ta
48、bled-v和和l-s 的比較的比較 d-v算法規(guī)定每隔一段時(shí)間( 30 秒),與相鄰路由器交換一次d-v; ospf 規(guī)定環(huán)境改變才通知所有路由器發(fā)送一次l-s。不過隔一段時(shí)間( 30 分鐘),要刷新發(fā)送l-s。 d-v算法只考慮下一跳,沒有全局的概念,交給下一跳就完成任務(wù),所以容易產(chǎn)生環(huán)路; l-s算法每個(gè)路由器可以根據(jù)網(wǎng)絡(luò)整體結(jié)構(gòu)決定路徑,所以不會(huì)產(chǎn)生環(huán),ospf 也沒有“壞消息傳得慢”的問題。 rip用 udp 數(shù)據(jù)報(bào)傳送;而ospf 直接用 ip 數(shù)據(jù)報(bào)傳送。hierarchical routing(分層次的路由選擇協(xié)議分層次的路由選擇協(xié)議)as network grow in si
49、zes, the routers are divided into what we will call regions, with each router knowing its own region, but nothing about other regions. for huge networks, it may be necessary to group the regions into clusters, the clusters into zones, the zones into groups, and so on.next is an example of routing in
50、 a two-level hierarchy with five regions. the full routing table for router 1a has 17 entries. there are entries for all the local routers, and all other regions condensed into a single router, so all traffic for region 2 goes via the 1b -2a line, but the rest of the remote traffic goes via the 1c -
51、3b line. hierarchical routing has reduced the table from 17 to 7 entries. hierarchical routing因特網(wǎng)采用分層次的路由選擇協(xié)議。因特網(wǎng)的規(guī)模非常大。如果讓所有的路由器知道所有的網(wǎng)絡(luò)應(yīng)怎樣到達(dá),則這種路由表將非常大,處理起來也太花時(shí)間。而所有這些路由器之間交換路由信息所需的帶寬就會(huì)使因特網(wǎng)的通信鏈路飽和。許多單位不愿意外界了解自己?jiǎn)挝痪W(wǎng)絡(luò)的布局細(xì)節(jié)和本部門所采用的路由選擇協(xié)議(這屬于本部門內(nèi)部的事情),但同時(shí)還希望連接到因特網(wǎng)上。 3)自治系統(tǒng))自治系統(tǒng)(autonomous system) intern
52、et是以路由器為基礎(chǔ)的網(wǎng)絡(luò)(router based network)internet將整個(gè)互聯(lián)網(wǎng)劃分為許多較小的自治系統(tǒng) as。一個(gè)自治系統(tǒng)是一個(gè)互聯(lián)網(wǎng),其最重要的特點(diǎn)就是自治系統(tǒng)有權(quán)自主地決定在本系統(tǒng)內(nèi)應(yīng)采用何種路由選擇協(xié)議。 一個(gè)自治系統(tǒng)內(nèi)的所有網(wǎng)絡(luò)都屬于一個(gè)行政單位(例如,一個(gè)公司,一所大學(xué),政府的一個(gè)部門,等等)來管轄。 一個(gè)自治系統(tǒng)的所有路由器在本自治系統(tǒng)內(nèi)都必須是連通的。 內(nèi)部網(wǎng)關(guān)協(xié)議 igp:具體的協(xié)議有多種,如 rip 和 ospf 等。外部網(wǎng)關(guān)協(xié)議 egp:目前使用的協(xié)議就是 bgp。r1h1h2內(nèi)部網(wǎng)關(guān)協(xié)議igp(例如,rip)自治系統(tǒng) a自治系統(tǒng) b自治系統(tǒng) cigpi
53、gpigpigpigpigpigpigpigpigpigpigpegpegpegp內(nèi)部網(wǎng)關(guān)協(xié)議igp(例如,ospf)外部網(wǎng)關(guān)協(xié)議egp(例如,bgp-4)igpr3r2自治系統(tǒng)和自治系統(tǒng)和內(nèi)部網(wǎng)關(guān)協(xié)議、外部網(wǎng)關(guān)協(xié)議內(nèi)部網(wǎng)關(guān)協(xié)議、外部網(wǎng)關(guān)協(xié)議 因特網(wǎng)有兩大類路由選擇協(xié)議因特網(wǎng)有兩大類路由選擇協(xié)議 內(nèi)部網(wǎng)關(guān)協(xié)議 igp (interior gateway protocol) 即在一個(gè)自治系統(tǒng)內(nèi)部使用的路由選擇協(xié)議。目前這類路由選擇協(xié)議使用得最多,如 rip 和 ospf 協(xié)議。外部網(wǎng)關(guān)協(xié)議egp (external gateway protocol) 若源站和目的站處在不同的自治系統(tǒng)中,當(dāng)數(shù)據(jù)報(bào)
54、傳到一個(gè)自治系統(tǒng)的邊界時(shí),就需要使用一種協(xié)議將路由選擇信息傳遞到另一個(gè)自治系統(tǒng)中。這樣的協(xié)議就是外部網(wǎng)關(guān)協(xié)議 egp。在外部網(wǎng)關(guān)協(xié)議中目前使用最多的是 bgp-4。 4) bgp (border gateway protocol) the exterior gateway routing protocol(a) a set of bgp routers. (b) information sent to f.bgp 使用的環(huán)境卻不同使用的環(huán)境卻不同 因特網(wǎng)的規(guī)模太大,使得自治系統(tǒng)之間路由選擇非常困難。 對(duì)于自治系統(tǒng)之間的路由選擇,要尋找最佳路由是很不現(xiàn)實(shí)的。 自治系統(tǒng)之間的路由選擇必須考慮有關(guān)策
55、略。因此,邊界網(wǎng)關(guān)協(xié)議 bgp 只能是力求尋找一條能夠到達(dá)目的網(wǎng)絡(luò)且比較好的路由(不能兜圈子),而并非要尋找一條最佳路由。 bgp 發(fā)言人發(fā)言人 每一個(gè)自治系統(tǒng)的管理員要選擇至少一個(gè)路由器作為該自治系統(tǒng)的“bgp 發(fā)言人” 。一般說來,兩個(gè) bgp 發(fā)言人都是通過一個(gè)共享網(wǎng)絡(luò)連接在一起的,而 bgp 發(fā)言人往往就是 bgp 邊界路由器,但也可以不是 bgp 邊界路由器。 一個(gè) bgp 發(fā)言人與其他自治系統(tǒng)中的 bgp 發(fā)言人要交換路由信息,就要先建立 tcp 連接,然后在此連接上交換 bgp 報(bào)文以建立 bgp 會(huì)話(session),利用 bgp 會(huì)話交換路由信息。使用 tcp 連接能提供可
56、靠的服務(wù),也簡(jiǎn)化了路由選擇協(xié)議。使用 tcp 連接交換路由信息的兩個(gè) bgp 發(fā)言人,彼此成為對(duì)方的鄰站或?qū)Φ日尽B酚陕酚蓃outingstatic動(dòng)態(tài)動(dòng)態(tài)dynamic/adaptiveegp (bgp-4) 外部網(wǎng)關(guān)協(xié)議外部網(wǎng)關(guān)協(xié)議igp內(nèi)部網(wǎng)內(nèi)部網(wǎng)關(guān)協(xié)議關(guān)協(xié)議 rip/igrp(距離向量法)距離向量法)ospf(鏈路狀態(tài)法)(鏈路狀態(tài)法)routing summary(flooding)5)routing for mobile hostsa wan to which lans, mans, and wireless cells are attached.each area has one
57、 or more foreign agents, keeping track of all mobile hosts visiting the area. each area has a home agent, keeping track of hosts whose home in the area, but visiting another area. hosts have a permanent home location and address. a mobile host entering an area must first register itself with the for
58、eign agent there, like this: -periodically, each foreign agent broadcasts its existence and address. a newly-arrived mobile host may broadcast asking for any foreign agents. -the mobile host registers with the foreign agent, giving its home address, current data link layer address, and some security
59、 information. -the foreign agent contacts the mobile hosts home agent, telling own address and also the security information. -the home agent examines the security information and a timestamp. if it is fresh, it tells the foreign agent to proceed. -then the foreign agent makes an entry in its tables
60、 and informs the mobile host that it is now registered. -ideally, leaving an area with a deregistration.when a packet is sent to a mobile host, it is routed to the hosts home lan. the home agent then finds the mobile hosts new location via the foreign agent handling him.packet routing for mobile use
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 水庫(kù)承包垂釣合同范例
- 投資運(yùn)營(yíng)收費(fèi)合同范例
- 天津?yàn)I海職業(yè)學(xué)院《美術(shù)課程標(biāo)準(zhǔn)與教材研究》2023-2024學(xué)年第一學(xué)期期末試卷
- 物流工期延期合同范例
- 公司融資合同范例餐飲
- 格式加工合同范例
- 產(chǎn)品打版合同范例
- N3層級(jí)護(hù)士三基+臨床實(shí)踐練習(xí)題(含參考答案)
- 2025年張掖考從業(yè)資格證貨運(yùn)試題
- 充值會(huì)員轉(zhuǎn)讓合同范例
- 2024-2025學(xué)年上學(xué)期天津初中地理七年級(jí)期末模擬卷1
- 病理學(xué)知到智慧樹章節(jié)測(cè)試課后答案2024年秋溫州醫(yī)科大學(xué)
- 2023年湖北交投智能檢測(cè)股份有限公司社會(huì)招聘筆試真題
- 2024企業(yè)所得稅培訓(xùn)
- 眼科考試題含答案
- 共話五千年傳承根與魂主題團(tuán)日活動(dòng)
- 小學(xué)校門口突發(fā)問題應(yīng)急預(yù)案(5篇)
- 2024年危險(xiǎn)品貨車租賃合同條款
- 2024年大型風(fēng)力發(fā)電項(xiàng)目EPC總承包合同
- 植物學(xué)#-形考作業(yè)4-國(guó)開(ZJ)-參考資料
- 環(huán)保監(jiān)測(cè)數(shù)據(jù)質(zhì)量控制預(yù)案
評(píng)論
0/150
提交評(píng)論