版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、1Chapter 5 LAN & MAC Sub layern5.1 傳統(tǒng)LAN的基本概念n5.2 多路訪問(wèn)協(xié)議n5.3 局域網(wǎng)的數(shù)據(jù)鏈路層n5.4 以太網(wǎng)的MAC協(xié)議n5.5 無(wú)線LANn5.6 網(wǎng)橋n5.7 交換式局域網(wǎng)25.1傳統(tǒng)LAN的基本概念n5.1.1LAN的模型n局域網(wǎng)(LAN)是在一個(gè)小區(qū)域范圍內(nèi)對(duì)各種數(shù)據(jù)通信設(shè)備提供了互連的信息網(wǎng)。n決定局域網(wǎng)特性的主要技術(shù):n用以傳輸數(shù)據(jù)的傳輸媒體n用以連接各種設(shè)備的拓?fù)浣Y(jié)構(gòu)n用以共享資源的媒體訪問(wèn)控制方法3nOSI LANNetwork LayerData Link LayerPhysical LayerLLCMACPhysica
2、l傳統(tǒng)的LAN大多是共享媒體的LAN(即采用廣播信道),不需要路由選擇功能,因此只具備OSI的第1、2層功能。在數(shù)據(jù)鏈路層,重點(diǎn)要解決媒體訪問(wèn)控制功能,所以,數(shù)據(jù)鏈路層又分為邏輯鏈路控制子層(LLC)和媒體訪問(wèn)控制子層(MAC)。4IEEE 802 Architecture55.1.2LAN的傳輸媒體n雙絞線n同軸電纜n光纖n無(wú)線電波n紅外65.1.3局域網(wǎng)的拓?fù)浣Y(jié)構(gòu)n星型(Star)n環(huán)型(Ring)n總線型(Bus)n樹型(Tree)Ring networkRing networkBus networkBus networkCentralCentralserverserverConcent
3、rator (or hub)Network backboneNetwork backbone7星型(Star)拓?fù)浣Y(jié)構(gòu)n特點(diǎn):n集中控制n中心交換節(jié)點(diǎn)功能復(fù)雜,但其他通信節(jié)點(diǎn)負(fù)荷相對(duì)較輕。n建設(shè)成本較大n可擴(kuò)展性好CentralCentralserverserver8環(huán)型(Ring)n由一組轉(zhuǎn)發(fā)器通過(guò)點(diǎn)對(duì)點(diǎn)連接成環(huán)路構(gòu)成。n有源網(wǎng)絡(luò)n分散控制n常采用令牌方式控制媒體訪問(wèn)n單個(gè)節(jié)點(diǎn)的故障有可能波及全網(wǎng)Ring networkRing network9總線型(Bus)n通信網(wǎng)絡(luò)只是傳輸媒體n成本低n無(wú)源網(wǎng)絡(luò)n分散控制n常采用CSMA/CD或Token方式進(jìn)行媒體訪問(wèn)控制n廣播型網(wǎng)絡(luò)Bus netw
4、orkBus network對(duì)于共享媒體型網(wǎng)絡(luò),網(wǎng)絡(luò)的拓?fù)浣Y(jié)構(gòu)和媒體訪問(wèn)控制協(xié)議很重要。設(shè)計(jì)一個(gè)好的媒體訪問(wèn)控制協(xié)議有三個(gè)基本要求:簡(jiǎn)單、有效的通道利用率、對(duì)用戶的公平合理。10樹型Concentrator (or hub)Network backboneNetwork backbone11其它網(wǎng)絡(luò)拓?fù)浣Y(jié)構(gòu)-網(wǎng)狀(Mesh)12Star Layout - Bus Topology13Star layout - Ring Topology145.2 多路訪問(wèn)協(xié)議n對(duì)于廣播信道,需要解決信道分配問(wèn)題,信道的分配方案有:n靜態(tài)分配:如傳統(tǒng)的FDM或TDM,如果有N個(gè)用戶,把帶寬或時(shí)間分成N份,每個(gè)用
5、戶靜態(tài)地占用一個(gè)。缺點(diǎn)是不能有效地處理突發(fā)數(shù)據(jù),有的用戶無(wú)通信量時(shí)白白浪費(fèi)資源。n動(dòng)態(tài)分配:異步時(shí)分多路復(fù)用。分為兩種:n隨機(jī)訪問(wèn)(爭(zhēng)用,contention):只要有數(shù)據(jù),就可直接發(fā)送,發(fā)生沖突后再采取措施解決沖突。適用于負(fù)載輕的網(wǎng)絡(luò),負(fù)載重時(shí)效率低。n控制訪問(wèn):發(fā)送站點(diǎn)必須先獲得發(fā)送的權(quán)利,再發(fā)送數(shù)據(jù),不會(huì)發(fā)生沖突。在負(fù)載重的網(wǎng)絡(luò)中可獲得很高的信道利用率。主要有輪轉(zhuǎn)(round-robin)和預(yù)約(reservation)兩種方式。15爭(zhēng)用協(xié)議一:ALOHA協(xié)議n20世紀(jì)70年代,美國(guó)夏威夷大學(xué)的ALOHA網(wǎng)通過(guò)無(wú)線廣播信道將分散在各個(gè)島嶼上的遠(yuǎn)程終端連接到本部的主機(jī)上,是最早采用爭(zhēng)用協(xié)議
6、的網(wǎng)絡(luò)。n有兩個(gè)版本:n純ALOHA協(xié)議(Pure ALOHA):每個(gè)站點(diǎn)只要有數(shù)據(jù)就可發(fā)送;通過(guò)監(jiān)聽信道來(lái)發(fā)現(xiàn)是否發(fā)生沖突;若沖突,則等待一段隨機(jī)時(shí)間,再重新發(fā)送。n時(shí)隙ALOHA協(xié)議(Slotted ALOHA):將信道時(shí)間分為離散的時(shí)間片,每個(gè)時(shí)間片可以用來(lái)發(fā)送一個(gè)幀。一個(gè)站點(diǎn)有數(shù)據(jù)發(fā)送時(shí),必須等到下個(gè)時(shí)間片的開始才能發(fā)送。與純ALOHA相比信道的利用率提高一倍。16爭(zhēng)用協(xié)議二:CSMA協(xié)議n載波偵聽多路訪問(wèn)(Carrier Sense Multiple Access)協(xié)議中,各站點(diǎn)不是隨意發(fā)送數(shù)據(jù)幀,而是先要監(jiān)聽一下信道,根據(jù)信道的狀態(tài)來(lái)調(diào)整自己的動(dòng)作,只有發(fā)現(xiàn)信道空閑后再可發(fā)送數(shù)據(jù)。
7、即“講前先聽”n常見的四種CSMA協(xié)議:n1-堅(jiān)持式CSMA(1-persistent CSMA)n非堅(jiān)持式CSMA(non-persistent)np-堅(jiān)持式CSMA(p-persistent CSMA)n帶有沖突檢測(cè)的CSMA(CSMA with Collision Detection)171-堅(jiān)持式CSMAn當(dāng)一個(gè)站點(diǎn)要發(fā)送數(shù)據(jù)時(shí),首先監(jiān)聽信道,若信道忙,就堅(jiān)持監(jiān)聽,一旦發(fā)現(xiàn)信道空閑,就立即發(fā)送數(shù)據(jù)(發(fā)送數(shù)據(jù)的概率為1)。若發(fā)生沖突,就等待一隨機(jī)長(zhǎng)時(shí)間,再重新開始監(jiān)聽信道。n兩種發(fā)生沖突的可能:n信號(hào)傳輸?shù)难舆t造成的沖突。n多個(gè)站點(diǎn)在監(jiān)聽到信道空閑時(shí),同時(shí)發(fā)送。n此協(xié)議的性能高于ALOH
8、A協(xié)議。18非堅(jiān)持式CSMAn當(dāng)一個(gè)站點(diǎn)要發(fā)送數(shù)據(jù)時(shí),首先監(jiān)聽信道,若信道忙,就隨機(jī)等待一段時(shí)間后再開始監(jiān)聽信道(非堅(jiān)持);一旦發(fā)現(xiàn)信道空閑,就立即發(fā)送數(shù)據(jù)。n此協(xié)議的信道利用率高于1-堅(jiān)持式CSMA協(xié)議。n網(wǎng)絡(luò)的延遲增大。19p-堅(jiān)持式CSMAn用于時(shí)隙信道。當(dāng)一個(gè)站點(diǎn)要發(fā)送數(shù)據(jù)時(shí),首先監(jiān)聽信道,若信道忙則等到下個(gè)時(shí)間片再開始監(jiān)聽信道;若信道空閑便以概率p發(fā)送數(shù)據(jù),而以概率q=1-p推遲到下個(gè)時(shí)間片再重復(fù)上述過(guò)程,直到數(shù)據(jù)被發(fā)送。n概率p的目的就是試圖降低1-堅(jiān)持式協(xié)議中多個(gè)站點(diǎn)同時(shí)發(fā)送而造成沖突的概率。n采用堅(jiān)持監(jiān)聽是試圖克服非堅(jiān)持式協(xié)議中造成的時(shí)間延遲。np的選擇直接關(guān)系到協(xié)議的性能。2
9、0CSMA/CDnCS協(xié)議的“講前先聽”對(duì)ALOHA系統(tǒng)進(jìn)行了有效的改進(jìn),但在發(fā)送過(guò)程中若發(fā)生沖突,仍要將剩余的無(wú)效數(shù)據(jù)發(fā)送完,既浪費(fèi)了時(shí)間又浪費(fèi)了帶寬。nCD協(xié)議的“邊講邊聽”可對(duì)CSMA作進(jìn)一步的改進(jìn)。發(fā)送過(guò)程中,仍然監(jiān)聽信道,通過(guò)檢測(cè)回復(fù)信號(hào)的能量或脈沖寬度并將之與發(fā)送的信號(hào)作比較,就可判斷是否發(fā)生沖突。一旦發(fā)生沖突,立即取消發(fā)送,等待一隨機(jī)時(shí)間后再重新嘗試發(fā)送。21無(wú)沖突(collision-free)協(xié)議n顧名思義無(wú)沖突協(xié)議就是不會(huì)產(chǎn)生沖突的協(xié)議。n兩種無(wú)沖突協(xié)議:n位圖(bit-map)協(xié)議也叫比特映像協(xié)議n二進(jìn)制倒計(jì)數(shù)(binary countdown)協(xié)議也叫二進(jìn)制地址相加協(xié)議
10、22位圖協(xié)議n假設(shè)有N個(gè)站點(diǎn)(編號(hào)為0 N-1),下圖中N=8。n將信道時(shí)間劃分成一系列交替的預(yù)約周期(位圖)和數(shù)據(jù)傳輸周期:n一個(gè)預(yù)約周期由N個(gè)1比特的競(jìng)爭(zhēng)時(shí)隙組成,每個(gè)時(shí)隙對(duì)應(yīng)一個(gè)站點(diǎn)。任何一個(gè)站點(diǎn)有數(shù)據(jù)發(fā)送時(shí),必須在它的競(jìng)爭(zhēng)時(shí)隙期間發(fā)送“1”進(jìn)行預(yù)約。n預(yù)約周期結(jié)束后,預(yù)約過(guò)的站點(diǎn)按編號(hào)順序進(jìn)行發(fā)送,永不沖突。最后一站點(diǎn)發(fā)完數(shù)據(jù)后,開始新一輪的預(yù)約周期。23二進(jìn)制倒計(jì)數(shù)協(xié)議n每個(gè)站點(diǎn)的地址用等長(zhǎng)的二進(jìn)制數(shù)表示。每個(gè)要發(fā)送數(shù)據(jù)的站點(diǎn)先廣播發(fā)送它們的二進(jìn)制地址(按高位到低位的順序)。這些地址在信道上被按位相加(邏輯或)。各站點(diǎn)在發(fā)送地址時(shí)監(jiān)聽信道,當(dāng)發(fā)現(xiàn)自己地址中的某個(gè)“0”在信道上變?yōu)椤?
11、”時(shí),即退出競(jìng)爭(zhēng)。最后參與競(jìng)爭(zhēng)的地址最高的站點(diǎn)獲得發(fā)送權(quán)。發(fā)送結(jié)束后,重新進(jìn)入下一輪競(jìng)爭(zhēng)。24有限爭(zhēng)用(limited-contention)協(xié)議n爭(zhēng)用協(xié)議在輕負(fù)荷時(shí)延遲特性好,但重負(fù)荷時(shí)信道效率低;而無(wú)沖突協(xié)議在輕負(fù)荷時(shí)延遲特性差,但重負(fù)荷時(shí)信道效率高。n將爭(zhēng)用協(xié)議和無(wú)沖突協(xié)議結(jié)合起來(lái),在輕負(fù)荷時(shí)使用爭(zhēng)用策略,而在重負(fù)荷時(shí)使用無(wú)沖突策略,即有限爭(zhēng)用協(xié)議。25無(wú)線局域網(wǎng)(Wireless LAN)協(xié)議nWLAN最基本使用CSMA協(xié)議,但由于各個(gè)站點(diǎn)發(fā)出的信號(hào)范圍有限(不像有線網(wǎng)絡(luò)中一個(gè)站點(diǎn)發(fā)出的信號(hào)可到達(dá)所有的站點(diǎn)),因此會(huì)造成:n隱藏站點(diǎn)問(wèn)題(hidden station problem):
12、圖(a)中,A向B發(fā)送時(shí),由于C聽不到誤以為可發(fā)送數(shù)據(jù),造成B接收失敗。n暴露站點(diǎn)問(wèn)題(exposed station problem):圖(b)中,B向A發(fā)送時(shí),C聽到信道忙誤認(rèn)為它不能向D發(fā)送數(shù)據(jù),實(shí)際上并不影響A和D兩站的接收。26CSMA with Collision Avoidance協(xié)議nCSMA/CA(避免沖突的CSMA協(xié)議)是WLAN采用的介質(zhì)訪問(wèn)控制協(xié)議,其相應(yīng)的國(guó)際標(biāo)準(zhǔn)為IEEE 802.11。n發(fā)送方先激發(fā)(RTS)接收方發(fā)送一個(gè)短幀(CTS),使接收方周圍的站點(diǎn)不會(huì)在即將到來(lái)的數(shù)據(jù)幀期間發(fā)送數(shù)據(jù)而導(dǎo)致沖突(避免沖突)。n當(dāng)多個(gè)站點(diǎn)同時(shí)向一個(gè)站點(diǎn)激發(fā)時(shí)仍會(huì)發(fā)生沖突,在預(yù)定
13、時(shí)間內(nèi)沒(méi)有收到CTS的發(fā)送方采用二進(jìn)制指數(shù)退避算法,在等待一隨機(jī)時(shí)間后再次重試。27CSMA/CA的分析nA首先向B發(fā)送一包含后繼數(shù)據(jù)幀長(zhǎng)度的RTS短幀(30字節(jié))。B回復(fù)一個(gè)也包含數(shù)據(jù)幀長(zhǎng)度(從RTS中得到)的CTS短幀。A一旦收到CTS,就開始發(fā)送數(shù)據(jù)。n偵聽到RTS的其它站點(diǎn)均向A關(guān)閉,并保持足夠長(zhǎng)的沉默時(shí)間使A可無(wú)沖突地收到CTS。偵聽到CTS的其它站點(diǎn)均向B關(guān)閉,并在后繼數(shù)據(jù)到來(lái)期間(從CTS中可知)保持沉默。nC位于A范圍內(nèi), B范圍外:聽不到CTS,可隨意地在A發(fā)送數(shù)據(jù)幀時(shí)發(fā)送自己的幀。nD和E都位于B范圍內(nèi):聽到CTS后,關(guān)閉所有的發(fā)送,直到A到B的幀被認(rèn)為發(fā)送完畢。285.3
14、局域網(wǎng)中的數(shù)據(jù)鏈路層n局域網(wǎng)的數(shù)據(jù)鏈路層n邏輯鏈路控制子層(LLC)n必須能支持鏈路的多路訪問(wèn)特性n可利用MAC子層來(lái)擺脫與底層有關(guān)的某些操作,如拓?fù)浣Y(jié)構(gòu)、媒體、媒體訪問(wèn)控制訪問(wèn)n媒體訪問(wèn)控制子層(MAC)n根據(jù)網(wǎng)絡(luò)的拓?fù)浣Y(jié)構(gòu),不同的局域網(wǎng)采用不同的媒體訪問(wèn)控制方法n成幀nCRC校驗(yàn)29LLC的功能n提供三種服務(wù):n無(wú)連接的服務(wù)n有確認(rèn)的無(wú)連接服務(wù)n面向連接的服務(wù)n復(fù)用n差錯(cuò)控制與流量控制n類似于HDLC協(xié)議30Typical Frame FormatLLC - Logical Link ControlPDU - Packet Data UnitDSAP - Destination Servi
15、ce Access PointSSAP - Source Service Access PointSAP indicates the user31控制字段n類似于HDLC協(xié)議,定義了三種格式:n信息幀n監(jiān)控幀n無(wú)編號(hào)幀32Operation of higher layers over LAN335.4 以太網(wǎng)的MAC協(xié)議n傳輸媒體n拓?fù)浣Y(jié)構(gòu)n媒體訪問(wèn)控制方法n簡(jiǎn)單n有效的通道利用率n公平合理決定了傳統(tǒng)局域網(wǎng)的響應(yīng)時(shí)間、吞吐量和效率345.4.1 IEEE 802.3 CSMA/CDnHistorynDeveloped by Bob Metcalfe and others at Xerox PA
16、RC in mid-1970snStandardized by Xerox, DEC, and Intel in 1978nLAN standards define MAC and physical layer connectivitynIEEE 802.3 (CSMA/CD - Ethernet) standard originally 2MbpsnIEEE 802.3u standard for 100Mbps EthernetnIEEE 802.3z standard for 1,000Mbps EthernetnCSMA/CD: Ethernets Media Access Contr
17、ol (MAC) policynCS = carrier sensenSend only if medium is idlenMA = multiple accessnCD = collision detectionnStop sending immediately if collision is detected35CSMA/CD技術(shù)Two nodes transmitat the same time1Node detect therehas been a collision2Nodes transmit ajamming signal3Nodes wait a randomperiod b
18、efore retransmitting4All computers have access toa common bus at the same time是一種隨機(jī)爭(zhēng)用的媒體訪問(wèn)控制方法36CSMA/CD 流程圖37碰撞檢測(cè)碰撞域:不同站點(diǎn)同時(shí)發(fā)送數(shù)據(jù)可能產(chǎn)生碰撞的最大網(wǎng)段38退避時(shí)間n從發(fā)送數(shù)據(jù)幀到能檢測(cè)出是否碰撞的最大所需時(shí)間2 ?稱為間隙時(shí)間。n退避時(shí)間=r 間隙時(shí)間,r是隨機(jī)整數(shù),在(0,2k -1 )區(qū)間內(nèi)均勻取值,k=Min(嘗試次數(shù),10)。n對(duì)于10BASE-5局域網(wǎng),規(guī)定網(wǎng)段的最大長(zhǎng)度500米,允許最多4個(gè)中繼器延長(zhǎng),最長(zhǎng)2500米,間隙時(shí)間為51.2微秒。n對(duì)10Mbps
19、的以太網(wǎng),能檢測(cè)出碰撞的最小幀長(zhǎng)為10Mbps*51.2微秒=512bit=64字節(jié)。39Binary Backoff40802.3幀格式Others:Others:4 bytes for the CRC (32 bits) and 2 bytes for the LLC length (16 bits). The LLC part may be up to 1500 bytes long. PreamblePreamble (seven bytes) precedes the Ethernet 802.3 frame. Each byte of the preamble has a fixe
20、d b i n a r y p a t t e r n o f 10101010 and each node on the network uses it to synchronise their clock and transmission timings. It also informs nodes that a frame is to be sent and for them to check the destination address in the frame.Start delimiter fieldStart delimiter field (SDF) is a single
21、byte (or octet) of 10101011. It follows the preamble and identifies that there is a valid frame being transmitted. Source/destination addressesSource/destination addresses (2 or 6 bytes, Most Ethernet systems use a 48-bit MAC address for the sending and receiving node. Each Ethernet node has a uniqu
22、e MAC address, which is normally defined as hexadecimal digits, such as:4C-31-22-10-F1-32 (4C31 : 2210: F132)A 48-bit address field allows 248 different addresses (or approximately 281474976710000 different addresses).IPTCPHTTPDataE.g.Preamble(7B)Startdelimiter (1B)Dest.address (6B)Src.Address (6B)L
23、en(2B)FCS(4 B)Data field(Logical link control)0 to 1500 bytesPad0 to 46 bytes41Ethernet MAC Address42Baseband IEEE 802.343(a) 10Base5, (b) 10Base2, (c) 10Base-T44IEEE 802.3與Ethernet幀格式的比較45Frame Reception465.4.2Fast EthernetnIEEE 802.3u工作組規(guī)范(1995,6)n特點(diǎn):n采用CSMA/CD媒體訪問(wèn)控制方式和802.3幀格式n100BASE-TX采用兩對(duì)5類雙絞線
24、n100BASE-T4采用四對(duì)3類雙絞線n網(wǎng)絡(luò)最大長(zhǎng)度250m(10M以太網(wǎng)是2500m,51.2x10-6x10 x106=512bits)47485.4.3 Gigabit EthernetnIEEE 802.3z(1998)和802.3ab工作組規(guī)范n問(wèn)題:n在采用CSMA/CD的MAC子層中,碰撞檢測(cè)時(shí)間與網(wǎng)絡(luò)的最大距離成正比,在10BASE-5中,最大距離為2500m,間隙時(shí)間為51.2微秒,最小幀長(zhǎng)為512比特。在100BASE-T中,最大距離為250m,幀格式不變,即間隙時(shí)間為5.12微秒。按此規(guī)律,千兆比以太網(wǎng)的最大距離為25m,這顯然不行。n解決方案n載波擴(kuò)展:n最小幀長(zhǎng)為5
25、12字節(jié)n網(wǎng)絡(luò)最大距離200mn幀突發(fā)功能:允許在一定時(shí)間內(nèi)連續(xù)發(fā)送多個(gè)MAC幀,最大突發(fā)長(zhǎng)度為8192字節(jié)。n全雙工49Gigabit Ethernet的物理規(guī)范505.5 無(wú)線LANn802.11,Adopted in 1997.nDefines:nMAC sublayer nMAC management protocols and servicesnPhysical (PHY) layers, 1M,2MbpsnIR 紅外:nFHSS跳頻擴(kuò)頻:79信道,每個(gè)信道寬1MHz,從2.4GHz開始往上nDSSS直接序列擴(kuò)頻: 51Channel Overlapping52IEEE 802.11
26、 ProtocolsHR-DSSSIEEE 802 .11 TerminologyBasic Service Set (BSS):基本服務(wù)集nA set of stations controlled by a single “Coordination Function(協(xié)調(diào)功能)” (=the logical function that determines when a station can transmit or receive)nSimilar to a “cell” in pre IEEE terminologynA BSS can have an Access-Point(接入點(diǎn))
27、, or can run without Access-PointnDiameter of the cell is twice the coverage-distance between two wireless stationsBSSIEEE 802 .11 TerminologyExtended Service Set (ESS):nA set of one or more Basic Service Sets interconnected by a Distribution System (DS)nTraffic always flows via Access-PointDistribu
28、tion System (DS):nA system to interconnect a set of Basic Service SetsnIntegrated; A single Access-Point in a standalone networknWired; Using cable to interconnect the Access-PointsnWireless; Using wireless to interconnect the Access-PointsExtended Service Set (ESS) BSSs with wired Distribution Syst
29、em (DS) BSSBSSDistribution SystemBSSBSSDistribution SystemExtended Service Set (ESS) BSSs and wireless Distribution System (DS)IEEE 802 .11 TerminologyIndependent Basic Service Set (IBSS):nA Basic Service Set (BSS) which forms a self-contained network in which no access to a Distribution System is a
30、vailablenA BSS without an Access-PointnOne of the stations in the IBSS can be configured to “initiate” the network and assume the Coordination Function nDiameter of the cell determined by coverage distance between two wireless stationsIBSS自組織網(wǎng)絡(luò)(Ad hoc)58Overview, 802.11 ArchitectureSTASTASTASTASTAST
31、ASTASTAAPAPESSBSSBSSBSSBSSExisting Wired LANInfrastructure NetworkAd Hoc NetworkAd Hoc NetworkIEEE 802 .11 TerminologyBasic Service Set Identifier (BSSID)n“cell identifier”n6 octets long (MAC address format)nOne BSS has one SSID nValue of BSSID is the same as the MAC address of the radio in the Acce
32、ss-Point802.11 MAC子層nthe problem“Hidden stations”BACA sends to BC doesnt detect that, so C might also start sending to BCollision of messages at B: both messages lost“Hidden stations” the solutionnIEEE 802.11 defines:nMAC level RTS/CTS protocol (Request to Send / Clear to Send) nCan be switched off
33、to reduce overhead (when no hidden nodes exist)nMore robustness, and increased reliabilitynNo interruptions when large files are transmittedABRTS: I want to send to B 500 bytesCTS: OK A, go ahead, so everybody quietData: the 500 bytes of data from A to BACK: B received the data OK, so an ACKC62802.1
34、1支持的兩種操作模式 n點(diǎn)協(xié)調(diào)功能(PCF, Point Coordination Function)n由基站周期性地(每秒10100次)廣播一個(gè)信標(biāo)幀(beacon frame),邀請(qǐng)站點(diǎn)申請(qǐng)服務(wù)n分布式協(xié)調(diào)功能(DCF, Distributed Coordination Function)nCSMA/CA(CSMA with Collision Avoidance) nDCF是必須的,PCF是可選的63DIFSContention WindowSlot timeDefer AccessBackoff-WindowNext FrameSelect Slot and Decrement Bac
35、koff as long as medium is idle.SIFSPIFSDIFSFree access when mediumis free longer than DIFSBusy MediumOperational processesInter-Frame SpacingnInter frame spacing required for MAC protocol trafficnSIFS = Short interframe space,發(fā)送控制幀或下一個(gè)分片的間隔(28s)nPIFS = PCF interframe space,PCF幀發(fā)送間隔(50s)nDIFS = DCF i
36、nterframe space,DCF幀發(fā)送間隔(128s)nEIFS = Extended interframe space ,壞幀的報(bào)告間隔nBack-off timer:退避時(shí)間,當(dāng)信道由忙轉(zhuǎn)為空閑時(shí),各站就要執(zhí)行退避算法,減少碰撞概率,第i次退避就在22+i個(gè)時(shí)隙中隨機(jī)選擇一個(gè)。64RTSCTS802.11MAC幀格式FrameControlDurationIDAddr 1Addr 2Addr 3Addr 4SequenceControlCRCFrameBody22666620-23124802.11 MAC HeaderBytes:ProtocolVersionTypeSubType
37、ToDSRetryPwrMgtMoreDataWEPRsvdFrame Control FieldBits: 22411111111DSFromMoreFragControl Frames Management FramesData FramesRTS or CTS重發(fā)幀?休眠or 喚醒加密?分片編號(hào)持續(xù)時(shí)間,表示該幀和其確認(rèn)幀所占用時(shí)間Address Field DescriptionAddr. 1 = All stations filter on this address.Addr. 2 = Transmitter Address (TA), Identifies transmitter
38、to address the ACK frame to.Addr. 3 = Dependent on To and From DS bits.Addr. 4 = Only needed to identify the original source of WDS (Wireless Distribution System)framesProtocolVersionTypeSubTypeToDSRetryPwrMgtMoreDataWEPRsvdFrame Control FieldBits: 22411111111DSFromMoreFragTo DS0011From DS0101Addres
39、s 1DADABSSIDRAAddress 2SABSSIDSATAAddress 3BSSIDSADADAAddress 4N/AN/AN/ASAWLAN內(nèi)LANWLANWLANLANLANAP1-AP2-LAN無(wú)線鏈路上接收者的地址(AP或無(wú)線終端)67AP的作用68無(wú)線Mesh網(wǎng)絡(luò) 和WMN混合結(jié)構(gòu) 695.5 網(wǎng)橋n網(wǎng)橋是用來(lái)連接局域網(wǎng)的互連設(shè)備,工作在數(shù)據(jù)鏈路層。n轉(zhuǎn)發(fā)局域網(wǎng)之間的數(shù)據(jù)幀,必要時(shí)進(jìn)行幀格式轉(zhuǎn)換n能隔離以太網(wǎng)中的碰撞域,但不能隔離廣播域n丟棄出錯(cuò)幀70網(wǎng)橋的工作原理71網(wǎng)橋所存在的問(wèn)題n在連接不同類型的局域網(wǎng)時(shí),網(wǎng)橋的轉(zhuǎn)發(fā)存在以下主要問(wèn)題(以802.3和802.11為例
40、):n不同的幀格式n由于幀格式的不同,需要重新組幀,某些域需要丟棄或產(chǎn)生(如802.11幀的持續(xù)時(shí)間),還需要重新生成檢驗(yàn)和。n不同的數(shù)據(jù)速率(802.11速率較低)n由于速率不同,網(wǎng)橋需要用緩沖區(qū)存儲(chǔ)來(lái)不及傳輸?shù)膸?2網(wǎng)橋所存在的問(wèn)題(續(xù))n最大幀的長(zhǎng)度n由于802標(biāo)準(zhǔn)本身不提供把長(zhǎng)幀分片的功能,因此對(duì)于太長(zhǎng)的幀只好丟棄。n安全性問(wèn)題n802.11可以支持加密,以太網(wǎng)不支持n服務(wù)質(zhì)量問(wèn)題n802.11采用PCF可以支持QoS,802.3不支持。73網(wǎng)橋的類型n透明網(wǎng)橋(transparent bridge)n源路由選擇網(wǎng)橋(source routing bridge)74透明網(wǎng)橋(tran
41、sparent bridge)n當(dāng)網(wǎng)橋連接局域網(wǎng)的初期,網(wǎng)橋的地址查找表的所有表項(xiàng)均為空。n采用逆向?qū)W習(xí)法(backward learning)產(chǎn)生目的地址查找表。n如果數(shù)據(jù)幀的源地址和目的地址屬于同一個(gè)LAN,則丟棄該幀。n當(dāng)數(shù)據(jù)幀的目的地址在網(wǎng)橋地址表上查找不到時(shí),采用擴(kuò)散法進(jìn)行轉(zhuǎn)發(fā),即向除接收端口以外的所有端口轉(zhuǎn)發(fā)。n網(wǎng)橋的地址查找表定期更新。75BridgeBridgePort1Port2A1A2A3A4B1B2B3B4C1C2C3A1A2A3A4B1B2B3B4Port1Port2A1A2A3A4C1C2C3Port1Port2Address tables whichassign M
42、AC addresseswith portsTransparent bridges with address tables76并行(parallel)透明網(wǎng)橋的問(wèn)題n為了提高可靠性,可設(shè)置并行的兩個(gè)或多個(gè)網(wǎng)橋,但會(huì)在拓?fù)浣Y(jié)構(gòu)上產(chǎn)生回路,導(dǎo)致阻塞。n解決的辦法是采用生成樹算法。77生成樹(spanning tree)網(wǎng)橋n通過(guò)網(wǎng)橋之間的相互通信,去掉一些會(huì)造成回路的冗余鏈路,構(gòu)造一棵可覆蓋每個(gè)LAN的生成樹去取代實(shí)際的拓?fù)浣Y(jié)構(gòu)。確保任意兩個(gè)LAN之間只有唯一的一條路徑。n首先每個(gè)網(wǎng)橋廣播其序列號(hào)(唯一),選取序列號(hào)最小的網(wǎng)橋作為生成樹的根。然后再按根到每個(gè)網(wǎng)橋的最短路徑來(lái)構(gòu)造生成樹。此算法一直工作,自動(dòng)地檢查拓?fù)浣Y(jié)構(gòu)的變化并更新生成樹
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025企業(yè)汽車租賃合同范本
- 2024年綠色商業(yè)地產(chǎn)項(xiàng)目合作招商合同范本3篇
- 2025年度房屋買賣合同:某房地產(chǎn)開發(fā)公司與購(gòu)房者之間的房屋買賣協(xié)議3篇
- 二零二五年度企業(yè)內(nèi)部員工培訓(xùn)與晉升承包協(xié)議3篇
- 二零二五年度農(nóng)村電網(wǎng)升級(jí)改造用電安全協(xié)議2篇
- 2025年度建筑安全施工質(zhì)量監(jiān)理服務(wù)合同2篇
- 2024年船運(yùn)合同范本3篇
- 2024年航空公司機(jī)上娛樂(lè)系統(tǒng)建設(shè)合同
- 2024版無(wú)人駕駛車輛技術(shù)轉(zhuǎn)讓協(xié)議
- 2025年度版權(quán)購(gòu)買合同:圖書出版版權(quán)購(gòu)買合同3篇
- 中國(guó)大模型行業(yè)發(fā)展現(xiàn)狀調(diào)查、競(jìng)爭(zhēng)格局分析及未來(lái)前景預(yù)測(cè)報(bào)告
- 議論文寫作知識(shí)基礎(chǔ)(課件)-高中語(yǔ)文議論文寫作入門
- 2024智慧水電廠建設(shè)方案
- 2024浙江金華市明城工程管理限公司招聘7人高頻難、易錯(cuò)點(diǎn)500題模擬試題附帶答案詳解
- 2024年個(gè)人之間清賬協(xié)議書模板
- GB/T 19228.1-2024不銹鋼卡壓式管件組件第1部分:卡壓式管件
- CRF病例報(bào)告表模板
- 路燈安裝施工檢驗(yàn)批質(zhì)量檢驗(yàn)記錄表
- 2024年計(jì)算機(jī)二級(jí)WPS考試題庫(kù)380題(含答案)
- 2023年江蘇省五年制專轉(zhuǎn)本英語(yǔ)統(tǒng)考真題(試卷+答案)
- 貴州省貴陽(yáng)市英語(yǔ)小學(xué)六年級(jí)上學(xué)期試卷及答案指導(dǎo)(2024年)
評(píng)論
0/150
提交評(píng)論