Download - 電腦通訊網路 (2)
1
電腦通訊網路 電腦通訊網路 (2)(2)
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-22
IEEE 802.3
Carrier Sense Multiple Access with
Collision Detection (CSMA/CD)
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-33
Typical CSMA/CD Network
A C E
B D F
同軸電纜收發器電纜
終端器
終端器
收發器
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-44
IEEE 802.3 Architecture
應用層
表達層
會議層
傳輸層
網路層
鏈結層
實體層
OSI 參考模式
媒介擷取控制邏輯鏈結控制 LLC (IEEE 802.2)LLC (IEEE 802.2)
MAC (IEEE 802.3)MAC (IEEE 802.3)
PLS實體層訊號處理
高層通訊協定 (IP, TCP, HTTP,
FTP, SMTP, etc.,)
CSMA/CD
傳輸媒介
PMA MAUAUI
MDI
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-55
CSMA/CD Protocol
Carrier SenseCarrier Sense beforebefore transmission Carrier SenseCarrier Sense whilewhile transmission CollisionCollision: Two or more stations transmitting simultaneousl
y BackoffBackoff: Random delayRandom delay after collision DeferenceDeference: Defers transmission if channel is sensed busy Collision WindowCollision Window (Slot timeSlot time): Round-trip propagation del
ay time plus some carrier sense time. In IEEE 802.3, this value is defined to be 51.2 us51.2 us.
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-66
CSMA/CD Collision Handling Collision Signal is generated by Physical layer. Jam signalJam signal (collision enforcement): To make sure that all station
s involved in the collision will detect collision. A pattern of 32 bits. Collision backoff and retransmission method (Truncated Binary (Truncated Binary
Exponential Backoff Algorithm, BEBAExponential 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
Slot time = 51.2 us. Disadvantage of BEBA:
Last-in-First-out effectLast-in-First-out effect: Stations with no or few collisions will have a better chance to transmit before stations that have waited longer.
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-77
IEEE 802.3 Frame Format
Preamble SFD DA SA LEN LLC PAD FCS
7 1 2, 6 2, 6 2 4 位元組
I/G
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 15001500 bytes PAD: Padding when LLC-Frame < 46 46 bytes FCS: Frame Check Sequence (CRC-32) MAC-frame size -- from DA to FCS
Min 64 bytesMin 64 bytes to distinguish from collision Max 1518 bytesMax 1518 bytes to prevent dominating bandwidth
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-88
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
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-99
Collision Detection Window for Baseband CSMA/CD (=2a)
BA
a = 0.5, 傳輸時間 = 1
t0
BA
t0+a-e
BA
t0+a
BA
t0+2a-e
衝撞
A 開始傳送訊框
B 開始傳送訊框
B 偵測出衝撞
A 偵測出衝撞
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-1010
Network Configuration(Single segment)
同軸電纜區段(最長 500 公尺)
(每區段最多接 100 個)
A C E
B D F
同軸電纜收發器電纜
終端器
終端器
收發器
(最長 50 公尺)
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-1111
Network Configuration (Two segments)
D
B C A
第一段同軸電纜
同軸電纜區段(最長 500 公尺)
第二段同軸電纜
G H I
FE
同軸電纜區段(最長 500 公尺)
收發器電纜(最長 50 公尺)
訊號增益器
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-1212
Network Configuration (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
Remind :Remind :
Slot Time = 51.2 usSlot Time = 51.2 us
NCU MWNL CSMA/CD-NCU MWNL CSMA/CD-1313
Alternative Physical Layers
資料傳輸速率
參 數 10BASE5 10BASE 2 1BASE5 10BASET 10BROAD36
傳輸媒介 同軸電纜( 50 歐姆)
同軸電纜( 50 歐姆)
同軸電纜( 75 歐姆)
無遮蔽式雙絞線
無遮蔽式雙絞線
訊號處理技術基頻
(Manchester)寬頻
( DPSK)
1 Mbps10 Mbps 10 Mbps 10 Mbps 10 Mbps
每段最大長度 185 公尺500 公尺 185 公尺500 公尺 1800 公尺
網路最大長度 2500 公尺 925 公尺 2500 公尺 500 公尺 3600 公尺
每段最多可連接工作站數目工作站間距電纜線直徑
100 30
2.5 公尺 0.5 公尺
10 公厘 5 公厘 0.4-0.6 公厘 0.4-0.6 公厘
基頻(Manchester)
基頻(Manchester)
基頻(Manchester)