IEEE 802 3 Carrier Sense Multiple Access with

  • Slides: 21
Download presentation
IEEE 802. 3 Carrier Sense Multiple Access with Collision Detection (CSMA/CD) Ó All rights

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). Ethernet - 1/21

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

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

CSMA/CD Protocol v. Carrier Sense before transmission v. Carrier Sense while transmission v. Collision:

CSMA/CD Protocol v. Carrier Sense before transmission v. Carrier Sense while transmission v. Collision: Two or more stations transmitting simultaneously v. Backoff: Random delay after collision v. Deference: Defers transmission if channel is sensed busy v. 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. Ethernet - 4/21

CSMA/CD Collision Handling v. Collision Signal is generated by Physical layer. v. Jam signal

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

CSMA/CD Collision Handling v. Slot time = 51. 2 us. v. Disadvantage of BEBA:

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

IEEE 802. 3 Frame Format 7 1 Preamble SFD l l l l l

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

Cyclic Redundancy Check (CRC 32) Hardware Implementation X 0 X 1 X 8 X

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

Collision Detection Window for Baseband CSMA/CD (=2 a) a = 0. 5, 傳輸時間 =

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

Cable Signaling (Manchester Encoding) Idle 1 0 1. . . 0 Idle Data Preamble

Cable Signaling (Manchester Encoding) Idle 1 0 1. . . 0 Idle Data Preamble 1 1 1. . . 0 0 Coaxial Cable 0 V -0. 225 V -1. 825 V Idle 1 0 1. . . 0 Idle Data Preamble 1 1 1. . . 0 0 Transceiver Cable +0. 7 V 0 V -0. 7 V 100 ns 50 ns Ethernet - 11/21

Network Configuration Example 3 (Five segments, maximum) A 1 D 區段 1 區段 2

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

10 Base. T Ethernet Examples 10 BASE 5 界面 10 BASE 2 界面 10

10 Base. T Ethernet Examples 10 BASE 5 界面 10 BASE 2 界面 10 BASET 集線器(HUB) 10 BASET 集線器 (HUB) H A B F D C G 串聯線 A B D C E 無遮蔽式雙絞線(UTP) 最長 100 公尺 E F G H Ethernet - 17/21

Half-duplex MAC v Ethernets have always used a half-duplex MAC. v Efficient bidirectional communications

Half-duplex MAC v Ethernets have always used a half-duplex MAC. v Efficient bidirectional communications is effected by rapidly changing the direction of communication on half-duplex channel. v For Ethernet, this is not a problem due to stations can quickly arbitrate for the ability to send their frames. v However, the extension of the Ethernet MAC algorithm to gigabit data rates does strain the ability to efficiently operate in this mode. v 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. Ethernet - 18/21

Limitations of Half-duplex Operation v CSMA/CD implies an intimate relationship between the minimum length

Limitations of Half-duplex Operation v 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 > 2 a v 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. v 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. Ethernet - 19/21

Limitations of Half-duplex Operation v For the original 10 Mbps Ethernet, a compromise was

Limitations of Half-duplex Operation v For the original 10 Mbps Ethernet, a compromise was struck. v Minimum frame = 512 bits (64 bytes), not including the preamble and Physical Layer overhead. v Minimum data field = 46 bytes rarely imposes a significant padding overhead (IP header + TCP header = 40 bytes). v At 10 Mbps, 512 bit-times is 51. 2 us. 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 Preamble SFD 6 DA 6 SA 2 LEN 46 Data 4 bytes FCS Minimum Frame Length (512 bits) Ethernet - 20/21

Network Extent v For a given minimum-length frame, the extent of a network scales

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