1 / 21

IEEE 802.3 Carrier Sense Multiple Access with Collision Detection (CSMA/CD)

IEEE 802.3 Carrier Sense Multiple Access with Collision Detection (CSMA/CD). All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system,

casey
Télécharger la présentation

IEEE 802.3 Carrier Sense Multiple Access with Collision Detection (CSMA/CD)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IEEE 802.3 Carrier Sense Multiple Access with Collision Detection (CSMA/CD) • All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of Professor Nen-Fu Huang (E-mail: nfhuang@cs.nthu.edu.tw).

  2. B D F 收發器 終端器 同軸電纜 收發器電纜 終端器 A E C Typical CSMA/CD Network

  3. CSMA/CD OSI參考模式 應用層 高層通訊協定 表達層 會議層 邏輯鏈結控制 LLC (IEEE 802.2) 傳輸層 MAC 媒介擷取控制 網路層 實體層訊號處理 PLS 鏈結層 AUI MAU 實體層 PMA MDI 傳輸媒介 IEEE 802.3 Architecture

  4. CSMA/CD Protocol • Carrier Sense before transmission • Carrier Sense while transmission • Collision: Two or more stations transmitting simultaneously • Backoff: Random delay after collision • Deference: Defers transmission if channel is sensed busy • Collision Window (Slot time): Round-trip propagation delay time plus some carrier sense time. In IEEE 802.3, this value is defined to be 51.2 us.

  5. CSMA/CD Collision Handling • Collision Signal is generated by Physical layer. • Jam signal (collision enforcement): To make sure that all stations involved in the collision will detect collision. A pattern of 32 bits. • Collision backoff and retransmission method (Truncated Binary Exponential Backoff Algorithm, BEBA): • n : number of collisions experienced (n <= 16) • k : Min (n,10) -- Truncation • r : Random delay time (unit: slot time) between 0 <= r < 2k

  6. CSMA/CD Collision Handling • Slot time = 51.2 us. • Disadvantage of BEBA: • Last-in-First-out effect: Stations with no or few collisions will have a better chance to transmit before stations that have waited longer.

  7. IEEE 802.3 Frame Format 7 1 2, 6 2, 6 2 4 位元組 Preamble SFD DA SA LEN LLC PAD FCS • Preamble: (101010...1010) for Synchronization • SFD: Start Frame Delimiter (10101011) • DA: Destination Address • SA: Source Address • Length: Length of LLC-Frame • LLC-Frame: Up to 1500 bytes • PAD: Padding when LLC-Frame < 46 bytes • FCS: Frame Check Sequence (CRC-32) • MAC-frame size -- from DA to FCS • Min 64 bytes to distinguish from collision • Max 1518 bytes to prevent dominating bandwidth 15-位元地址 I/G 46-位元地址 I/G U/L I/G = 0 Individual Address (個別地址) I/G = 1 Group Address (群體地址) U/L = 0 Globally Administered Address (整體性地址) U/L = 1 Locally Administered Address (區域性地址)

  8. Cyclic Redundancy Check (CRC32) Hardware Implementation 0 1 2 3 4 5 6 X X X X X X X 8 9 10 11 12 13 14 15 7 X X X X X X X X X 17 16 18 19 20 21 22 23 24 25 X X X X X X X X X X 29 26 27 28 30 31 . X X X X X X = AND = XOR = NOT . A MUX O = A, C = 0 輸出 MUX C O = B, C = 1 控制訊號 B 輸入

  9. 接收訊框 傳送訊框 Flow Chart 開始接收 組成訊框, i=1 N Y 線上有 訊號 接收完畢 Y N 傳送訊框 Y 訊框過短 (衝撞) N Y 送出擾亂訊號 發生衝撞 Y 位址辨識 成功 N i = i + 1 N Y N 檢查碼 正確 傳送完畢 Y i > 16 Y N 尚有多餘 位元 N N 長度欄位 內容正確 Y 計算延遲時間 Y 刪除訊框頭尾 等待延遲時間 長度錯誤 接收成功 傳送成功 訊框錯誤 對齊錯誤 傳送失敗

  10. Collision Detection Window for Baseband CSMA/CD (=2a) a = 0.5, 傳輸時間=1 t0 B A A開始傳送訊框 t0+a-e B A B開始傳送訊框 衝撞 t0+0.5 B A B偵測出衝撞 t0+1-e B A A偵測出衝撞

  11. -0.225V -1.825V +0.7V 0V -0.7V 50ns 100ns Cable Signaling (Manchester Encoding) Idle Data Idle Preamble ... ... 1 0 1 0 1 1 1 0 0 Coaxial Cable 0V Idle Data Idle Preamble ... ... 1 0 1 0 1 1 1 0 0 Transceiver Cable

  12. 同軸電纜區段(最長500 公尺) C B E 終端器 同軸電纜 收發器電纜 (最長50 公尺) 終端器 D A 收發器 (每區段最多接100 個) Network Configuration Example 1 (Single segment)

  13. 同軸電纜區段(最長500 公尺) B A C 第一段同軸電纜 收發器電纜 (最長50 公尺) D 訊號增益器 E F 第二段同軸電纜 G H I 同軸電纜區段(最長500 公尺) Network Configuration Example 2 (Two segments)

  14. Network Configuration Example 3 (Five segments, maximum) 1 A D 區段1 區段2 B E C F 訊號增益器 2 H G 3 區段3 4 L 半訊號增益器 5 I 半訊號增益器間電纜 區段5 (最長1000 公尺) 區段4 J M 6 K N

  15. 工作站界面 高層通訊協定 訊框包裝 網路控制卡 鏈結層 鏈結管理 實體層 編碼及解碼 收發器電纜 傳送及接收 收發器 銅軸電纜 Architecture, Functions, and Implementation

  16. Calculation of Slot time(Example 3) 整體延遲 元件 穩定延遲 前進路徑 元件數 回程路徑 元件數 元件 啟動延遲 元件 編碼器 0.1us 0.1us 5 5 2.0us 收發器電纜5.13ns/公尺0 300公尺300公尺3.08us 收發器(傳送路徑)0.05us 0.3us 3 3 2.10us 收發器(接收路徑)0.05us 0.6us 3 0 1.95us 收發器(衝撞路徑)0 0.9us 0 3 2.70us 同軸電纜4.33ns/公尺0 1500公尺1500公尺12.99us 半訊號增益器間電纜5.13ns/公尺0 1000公尺1000公尺10.26us 電纜驅動器0.1us 0 2 2 0.40us 電纜接收器0.1us 0 2 2 0.40us 訊號增益器(增益路徑)0.2us 0.4us 2 0 1.20us 訊號增益器(衝撞路徑)0.2us 0.2us 0 2 0.80us 載波感測0 0.2us 5 0 1.00us 衝撞偵測0 0.2us 0 5 1.00us 訊號上升時間0 0.1us 3 0 0.30us (至70% 於500公尺處) 訊號上升時間(由50% 0 2.0us 0 3 6.00us 至94% 於500公尺處) 衝撞分割0 0.2us 0 1 0.20us 訊號來回傳遞最長延遲46.38us

  17. 無遮蔽式雙絞線(UTP) 最長100 公尺 10BaseT Ethernet Examples 10BASE2 界面 10BASE5 界面 10BASE2 界面 10BASE5 界面 10BASET 10BASET 集線器(HUB) 集線器(HUB) 串聯線 A H A F B G D B D C H C E G F E

  18. Half-duplex MAC • Ethernets have always used a half-duplex MAC. • Efficient bidirectional communications is effected by rapidly changing the direction of communication on half-duplex channel. • For Ethernet, this is not a problem due to stations can quickly arbitrate for the ability to send their frames. • However, the extension of the Ethernet MAC algorithm to gigabit data rates does strain the ability to efficiently operate in this mode. • When the arbitration time (equal to the round-trip delay, in the worst-case) approaches or exceeds the time to transmit a typical frame, the efficiency of the algorithm suffers.

  19. Limitations of Half-duplex Operation • CSMA/CD implies an intimate relationship between the minimum length of a frame(L, measured in bit-times, not absolute time) and the maximum round-trip propagation delay(2a) of the network: L > 2a • If we want to allow very long networks, we can make the minimum frame very long. Padding needs if a station wishes to send less data than this minimum frame. Reduces the transmission efficiency. • If we want to avoid the overhead of padding, we must reduce the extent of the network so that collision can be detected in all cases.

  20. Limitations of Half-duplex Operation • For the original 10 Mbps Ethernet, a compromise was struck. • Minimum frame = 512 bits (64 bytes), not including the preamble and Physical Layer overhead. • Minimum data field = 46 bytes rarely imposes a significant padding overhead (IP header + TCP header = 40 bytes). • At 10 Mbps, 512 bit-times is 51.2us. Depends on the type of cable used and the network configuration, the extent of a 10 Mbps Ethernet can be on the order of from 2-3 Km. 7 1 6 6 2 46 4 bytes Preamble SFD DA SA LEN Data FCS Minimum Frame Length (512 bits)

  21. Network Extent • For a given minimum-length frame, the extent of a network scales inversely with data rate. 10,000 m 1,000 m 100 m 10m ~ 2800m ~ 205m ~ 20m 10Mbps 100 Mbps 1000 Mbps

More Related