Download presentation
Presentation is loading. Please wait.
1
1/21 Ethernet - 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
2/21 Ethernet - Typical CSMA/CD Network A C E BD F 同軸電纜 收發器電纜 終端器 收發器
3
3/21 Ethernet - IEEE 802.3 Architecture 應用層 表達層 會議層 傳輸層 網路層 鏈結層 實體層 OSI 參考模式 媒介擷取控制 邏輯鏈結控制 LLC (IEEE 802.2) MAC PLS 實體層訊號處理 高層通訊協定 CSMA/CD 傳輸媒介 PMA MAU AUI MDI
4
4/21 Ethernet - 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
5/21 Ethernet - 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 < 2 k
6
6/21 Ethernet - 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
7/21 Ethernet - IEEE 802.3 Frame Format Preamble SFD DA SA LEN LLC PAD FCS 7 1 2, 6 2, 6 2 4 位元組 I/G U/L 15- 位元地址 46- 位元地址 I/G = 0 Individual Address (個別地址) I/G = 1 Group Address (群體地址) U/L = 0 Globally Administered Address (整體性地址) U/L = 1 Locally Administered Address (區域性地址) 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
8
8/21 Ethernet - Cyclic Redundancy Check (CRC32) Hardware Implementation X 0 X 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X 19 X 20 X 21 X 22 X 23 X 24 X 25 X 26 X 27 X 28 X 29 X 30 X 31 MUX.. = AND = XOR = NOT MUX A B C O = A, C = 0 O = B, C = 1 輸出 輸入 控制訊號
9
9/21 Ethernet - Flow Chart 傳送訊框 組成訊框, i=1 線上有 訊號 傳送訊框 發生衝撞 送出擾亂訊號 傳送完畢 i > 16 Y Y Y N N N N Y i = i + 1 計算延遲時間 等待延遲時間 傳送成功 傳送失敗 接收訊框 開始接收 接收完畢 訊框過短 (衝撞) 位址辨識 成功 Y Y N N Y 訊框錯誤 接收成功 檢查碼 正確 尚有多餘 位元 對齊錯誤 長度欄位 內容正確 刪除訊框頭尾 長度錯誤 Y Y N N Y N
10
10/21 Ethernet - Collision Detection Window for Baseband CSMA/CD (=2a) B A a = 0.5, 傳輸時間 = 1 t0t0 B A t 0 +a- B A t 0 +0.5 B A t 0 +1- 衝撞 A 開始傳送訊框 B 開始傳送訊框 B 偵測出衝撞 A 偵測出衝撞
11
11/21 Ethernet - Cable Signaling (Manchester Encoding) 1 0 1 0 1 1 1 0 0 Preamble Data Idle... -1.825V -0.225V 0V 1 0 1 0 1 1 1 0 0 Preamble Data Idle... -0.7V 0V +0.7V 100ns 50ns Coaxial Cable Transceiver Cable
12
12/21 Ethernet - Network Configuration Example 1 (Single segment) A D B C E 同軸電纜 收發器電纜 終端器 收發器 同軸電纜區段(最長 500 公尺) (每區段最多接 100 個) (最長 50 公尺)
13
13/21 Ethernet - Network Configuration Example 2 (Two segments) D B C A 第一段同軸電纜 同軸電纜區段(最長 500 公尺) 第二段同軸電纜 G HI F E 同軸電纜區段(最長 500 公尺) 收發器電纜(最長 50 公尺) 訊號增益器
14
14/21 Ethernet - Network Configuration Example 3 (Five segments, maximum) C A B F D E G H J K I N L M 訊號增益器 半訊號增益器 半訊號增益器間電纜 (最長 1000 公尺) 區段 4 區段 1 區段 2 區段 3 區段 5 1 2 3 4 5 6
15
15/21 Ethernet - Architecture, Functions, and Implementation 傳送及接收 工作站界面 訊框包裝 鏈結管理 編碼及解碼 網路控制卡 收發器電纜 收發器 鏈結層 實體層 高層通訊協定 銅軸電纜
16
16/21 Ethernet - Calculation of Slot time (Example 3) 元件 編碼器 0.1us0.1us552.0us 收發器電纜 5.13ns/ 公尺 0300 公尺 300 公尺 3.08us 收發器(傳送路徑) 0.05us0.3us332.10us 收發器(接收路徑) 0.05us0.6us301.95us 收發器(衝撞路徑) 00.9us032.70us 同軸電纜 4.33ns/ 公尺 01500 公尺 1500 公尺 12.99us 半訊號增益器間電纜 5.13ns/ 公尺 01000 公尺 1000 公尺 10.26us 電纜驅動器 0.1us0220.40us 電纜接收器 0.1us0220.40us 訊號增益器(增益路徑) 0.2us0.4us201.20us 訊號增益器(衝撞路徑) 0.2us0.2us020.80us 載波感測 00.2us501.00us 衝撞偵測 00.2us051.00us 訊號上升時間 00.1us300.30us (至 70% 於 500 公尺處) 訊號上升時間(由 50%02.0us036.00us 至 94% 於 500 公尺處) 衝撞分割 00.2us010.20us 元件 穩定延遲 元件 啟動延遲 前進路徑 元件數 整體延遲 回程路徑 元件數 訊號來回傳遞最長延遲 46.38us
17
17/21 Ethernet - 10BaseT Ethernet Examples C A B F D E G H 集線器 (HUB) 無遮蔽式雙絞線 (UTP) 最長 100 公尺 10BASE2 界面 10BASE5 界面 10BASET F E G HC A B D 集線器(HUB) 10BASE2 界面 10BASE5 界面 10BASET 串聯線
18
18/21 Ethernet - 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
19/21 Ethernet - 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 (2 a ) 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
20/21 Ethernet - 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. Preamble SFD DA SA LEN Data FCS 7 1 6 6 2 46 4 bytes Minimum Frame Length (512 bits)
21
21/21 Ethernet - Network Extent For a given minimum-length frame, the extent of a network scales inversely with data rate. 10Mbps 100 Mbps 1000 Mbps 10,000 m 1,000 m 100 m 10m ~ 2800m ~ 205m ~ 20m
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.