View
238
Download
4
Embed Size (px)
Citation preview
1
Introduction of Ethernet
Metcalfersquos Ethernetsketch
Also refer to httpwwwcsnthuedutw~nfhuangchap04htm
2
Questions (12)
OSI 7-layer What is LAN 如何連結電腦形成一個 LAN 是什麼網路卡 我們常用到那些網路卡 網路卡的工作是什麼 請想像 Ethernet MAC layer frame 應該要有那些欄位才能讓對方得到足夠的資訊
3
Questions (22)
同一 LAN 中的許多電腦同時透過 Ethernet 送出frames 會不會有問題
What is Multiple Access 如何用 CSMACD 的方式讓各個電腦可以在
bus 上達到相互通訊的目的 CSMACD 是好的方法嗎有沒有其他方法 如何讓 Ethernet 傳輸速度從最早 10Mbps 不斷增加再增加
Ethernet 成功的原因
4
Outlines
Ethernet History Ethernet Frame Multiple Access in Ethernet IEEE 8023
5
Part 1
Ethernet History
bus coaxial cable
switchstar
6
Ethernet History
ldquo Dominantrdquo wired LAN technology Ethernets history
Ethernets success First widely used LAN technology Simpler cheaper than token LANs and ATM Cheap $20 for NIC Kept up with speed race 10 Mbps ndash 10 Gbps
7
What is Ethernet
Link amp Physical Layers Different physical layer media fiber cable Different speeds 2 Mbps 10 Mbps 100
Mbps 1Gbps 10G bps Common MAC protocol and frame format
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twisterpair) physical layer
8
IEEE 8023 Standards
Many different Ethernet specifications Ethernet has no IEEE standard
Ethernet is similar to IEEE 8023 but not the same
9
Ethernets Name
According to PHY techniques Ethernet has several specifications and named them as
n-signal-PHY n data rate signal Base is baseband broad is broadband PHY distance media or coding methods
Examples 10Base5 10Mbs baseband 500m 10Base-T 10Mbs baseband Twisted pair
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
2
Questions (12)
OSI 7-layer What is LAN 如何連結電腦形成一個 LAN 是什麼網路卡 我們常用到那些網路卡 網路卡的工作是什麼 請想像 Ethernet MAC layer frame 應該要有那些欄位才能讓對方得到足夠的資訊
3
Questions (22)
同一 LAN 中的許多電腦同時透過 Ethernet 送出frames 會不會有問題
What is Multiple Access 如何用 CSMACD 的方式讓各個電腦可以在
bus 上達到相互通訊的目的 CSMACD 是好的方法嗎有沒有其他方法 如何讓 Ethernet 傳輸速度從最早 10Mbps 不斷增加再增加
Ethernet 成功的原因
4
Outlines
Ethernet History Ethernet Frame Multiple Access in Ethernet IEEE 8023
5
Part 1
Ethernet History
bus coaxial cable
switchstar
6
Ethernet History
ldquo Dominantrdquo wired LAN technology Ethernets history
Ethernets success First widely used LAN technology Simpler cheaper than token LANs and ATM Cheap $20 for NIC Kept up with speed race 10 Mbps ndash 10 Gbps
7
What is Ethernet
Link amp Physical Layers Different physical layer media fiber cable Different speeds 2 Mbps 10 Mbps 100
Mbps 1Gbps 10G bps Common MAC protocol and frame format
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twisterpair) physical layer
8
IEEE 8023 Standards
Many different Ethernet specifications Ethernet has no IEEE standard
Ethernet is similar to IEEE 8023 but not the same
9
Ethernets Name
According to PHY techniques Ethernet has several specifications and named them as
n-signal-PHY n data rate signal Base is baseband broad is broadband PHY distance media or coding methods
Examples 10Base5 10Mbs baseband 500m 10Base-T 10Mbs baseband Twisted pair
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
3
Questions (22)
同一 LAN 中的許多電腦同時透過 Ethernet 送出frames 會不會有問題
What is Multiple Access 如何用 CSMACD 的方式讓各個電腦可以在
bus 上達到相互通訊的目的 CSMACD 是好的方法嗎有沒有其他方法 如何讓 Ethernet 傳輸速度從最早 10Mbps 不斷增加再增加
Ethernet 成功的原因
4
Outlines
Ethernet History Ethernet Frame Multiple Access in Ethernet IEEE 8023
5
Part 1
Ethernet History
bus coaxial cable
switchstar
6
Ethernet History
ldquo Dominantrdquo wired LAN technology Ethernets history
Ethernets success First widely used LAN technology Simpler cheaper than token LANs and ATM Cheap $20 for NIC Kept up with speed race 10 Mbps ndash 10 Gbps
7
What is Ethernet
Link amp Physical Layers Different physical layer media fiber cable Different speeds 2 Mbps 10 Mbps 100
Mbps 1Gbps 10G bps Common MAC protocol and frame format
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twisterpair) physical layer
8
IEEE 8023 Standards
Many different Ethernet specifications Ethernet has no IEEE standard
Ethernet is similar to IEEE 8023 but not the same
9
Ethernets Name
According to PHY techniques Ethernet has several specifications and named them as
n-signal-PHY n data rate signal Base is baseband broad is broadband PHY distance media or coding methods
Examples 10Base5 10Mbs baseband 500m 10Base-T 10Mbs baseband Twisted pair
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
4
Outlines
Ethernet History Ethernet Frame Multiple Access in Ethernet IEEE 8023
5
Part 1
Ethernet History
bus coaxial cable
switchstar
6
Ethernet History
ldquo Dominantrdquo wired LAN technology Ethernets history
Ethernets success First widely used LAN technology Simpler cheaper than token LANs and ATM Cheap $20 for NIC Kept up with speed race 10 Mbps ndash 10 Gbps
7
What is Ethernet
Link amp Physical Layers Different physical layer media fiber cable Different speeds 2 Mbps 10 Mbps 100
Mbps 1Gbps 10G bps Common MAC protocol and frame format
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twisterpair) physical layer
8
IEEE 8023 Standards
Many different Ethernet specifications Ethernet has no IEEE standard
Ethernet is similar to IEEE 8023 but not the same
9
Ethernets Name
According to PHY techniques Ethernet has several specifications and named them as
n-signal-PHY n data rate signal Base is baseband broad is broadband PHY distance media or coding methods
Examples 10Base5 10Mbs baseband 500m 10Base-T 10Mbs baseband Twisted pair
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
5
Part 1
Ethernet History
bus coaxial cable
switchstar
6
Ethernet History
ldquo Dominantrdquo wired LAN technology Ethernets history
Ethernets success First widely used LAN technology Simpler cheaper than token LANs and ATM Cheap $20 for NIC Kept up with speed race 10 Mbps ndash 10 Gbps
7
What is Ethernet
Link amp Physical Layers Different physical layer media fiber cable Different speeds 2 Mbps 10 Mbps 100
Mbps 1Gbps 10G bps Common MAC protocol and frame format
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twisterpair) physical layer
8
IEEE 8023 Standards
Many different Ethernet specifications Ethernet has no IEEE standard
Ethernet is similar to IEEE 8023 but not the same
9
Ethernets Name
According to PHY techniques Ethernet has several specifications and named them as
n-signal-PHY n data rate signal Base is baseband broad is broadband PHY distance media or coding methods
Examples 10Base5 10Mbs baseband 500m 10Base-T 10Mbs baseband Twisted pair
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
6
Ethernet History
ldquo Dominantrdquo wired LAN technology Ethernets history
Ethernets success First widely used LAN technology Simpler cheaper than token LANs and ATM Cheap $20 for NIC Kept up with speed race 10 Mbps ndash 10 Gbps
7
What is Ethernet
Link amp Physical Layers Different physical layer media fiber cable Different speeds 2 Mbps 10 Mbps 100
Mbps 1Gbps 10G bps Common MAC protocol and frame format
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twisterpair) physical layer
8
IEEE 8023 Standards
Many different Ethernet specifications Ethernet has no IEEE standard
Ethernet is similar to IEEE 8023 but not the same
9
Ethernets Name
According to PHY techniques Ethernet has several specifications and named them as
n-signal-PHY n data rate signal Base is baseband broad is broadband PHY distance media or coding methods
Examples 10Base5 10Mbs baseband 500m 10Base-T 10Mbs baseband Twisted pair
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
7
What is Ethernet
Link amp Physical Layers Different physical layer media fiber cable Different speeds 2 Mbps 10 Mbps 100
Mbps 1Gbps 10G bps Common MAC protocol and frame format
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twisterpair) physical layer
8
IEEE 8023 Standards
Many different Ethernet specifications Ethernet has no IEEE standard
Ethernet is similar to IEEE 8023 but not the same
9
Ethernets Name
According to PHY techniques Ethernet has several specifications and named them as
n-signal-PHY n data rate signal Base is baseband broad is broadband PHY distance media or coding methods
Examples 10Base5 10Mbs baseband 500m 10Base-T 10Mbs baseband Twisted pair
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
8
IEEE 8023 Standards
Many different Ethernet specifications Ethernet has no IEEE standard
Ethernet is similar to IEEE 8023 but not the same
9
Ethernets Name
According to PHY techniques Ethernet has several specifications and named them as
n-signal-PHY n data rate signal Base is baseband broad is broadband PHY distance media or coding methods
Examples 10Base5 10Mbs baseband 500m 10Base-T 10Mbs baseband Twisted pair
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
9
Ethernets Name
According to PHY techniques Ethernet has several specifications and named them as
n-signal-PHY n data rate signal Base is baseband broad is broadband PHY distance media or coding methods
Examples 10Base5 10Mbs baseband 500m 10Base-T 10Mbs baseband Twisted pair
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
10
Comparisons of Different Spec
同軸電纜(50 )歐姆
185 m
10Mbps
925 m
30
5mm
10 Base2
每段最多可連接電腦的數目
電纜線直徑
每段最大長度
網路最大長度
資料傳輸速率
傳輸媒介
參數
同軸電纜(50 )歐姆
500 m
10Mbps
2500 m
100
10 mm
10 Base5
無遮蔽雙絞線UTP
185 m
10Mbps
500 m
-
04-06mm
10 BaseT
無遮蔽雙絞線5 UTP等級
100 m
100Mbps
-
-
-
100 BaseX
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
11
10Base2 Bus Topology
一條纜線的範圍稱為「區段」( segment ) 利用 MAC 位址判斷是誰的資料 若一個 T 型節點損毀則整個網路無法運作 使用終端子 ( Terminator ) 收吸收訊息的回音
A bit transmission time is 110M= 01msec
終端子
目的電腦位址MAC address03705b11345
來源電腦位址MAC address01c07b201555
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
12
Thin Ethernet with Repeater
3 segments connected by repeaters
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超185 公尺 任兩台電腦間電
纜總長度不可超過 925 公尺
距離是05 公尺的倍數
任兩台電腦間不能超過4 個 repeater
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
13
10Base5 Bus Topology
terminator
repeater
Type-Tconnector
segment 1
segment 2
segment 3
兩終端電阻間最長不可超過500 公尺
任兩台電腦間電纜總長度不可超過 1500 公尺因此這 5 段同軸電纜不可以連接成一直線狀
最多 5 個 segment 任何二個工作站之間的路徑上最多只能有 2 個訊號增益器
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
14
10Base-T with Hub
10Base-T Centralized control by Hub
Still use Bus Topology - Broadcast Half duplex
One hub node crashes rarr Do not affect other nodes
Bus topology popular through mid 1990s All nodes in same collision domain (can
collide with each other)
HubHub
Hub
1
5
43
2 data
Hub
不可超過250 公尺
不可超過100 公尺
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
15
10Base-T with Switch
Centralized control by Switch Check the destination MAC address of Frame
forward this frame to a correct port No forward frames to other ports Full duplex Parallel sending many signals
Today star topology prevails Active switch in center Each ldquospokerdquo runs a (separate) Ethernet
protocol (nodes do not collide with each other)
SwitchSwitch
Switch
switchstar
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
16
Fast Ethernet 100BaseT Ethernet
100Mbps reduce the transmission delay of each bit
100BaseX uses 2 UTP pairs 100Base4T uses 4 UTP pairs Compatible to 10BaseT wiring system
frame format max packet size A bit transmission time is
1100M=001msec
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
17
Gigabit Ethernet IEEE 8023ab 1000Base-T IEEE 8023z
1000Base-SXLX Compatible to Ethernet Fast Ethernet
The same as old wiring system but speed is up to 1000Mbps
Use fiber of Category 5 UTP Used as a backbone or the
interconnection among servers
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
18
10 Gigabit Ethernet
IEEE 8023ae There are many differences between 8023ae
and old Ethernet specifications Use Optical Fiber Full-duplex
Have the same frame formatmax packet size Applications
Server interconnect for clusters of servers Links between switches and servers Backbone Very high-speed connections between buildings
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
19
Part 2
Ethernet Frame
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
20
Ethernet Unreliable Connectionless
Connectionless No handshaking between sending and receiving NICs NIC Network Interface Card
Unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC Stream of datagrams passed to network layer
can have gaps (missing datagrams) Gaps will be filled if application is using TCP Otherwise application will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
21
Ethernet frame (13)
Define the frame in MAC layer Preamble
7 bytes with pattern 10101010 followed by one byte with pattern 10101011
Used to synchronize receiver sender clock rates
Preamble SourceDestination TypeData fromupper layer
FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
22
Ethernet frame (23)
Source MAC address Source accepts the data from upper layer
encapsulates as a frame then sends it to destination
Destination MAC address If adapter receives frame with matching
destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocol Otherwise adapter discards frame
LSB=0 physical MAC address LSB=1 multicast address All 1s in 6 bytes broadcast address
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
23
Ethernet frame (33)
Type Indicates higher layer protocol
0800H IP 0600H XNS (Xerox protocol suit) Mostly IP but others possible eg Novell IPX
AppleTalk Data
46-1500 bytes Frame Check Sequence (FCS)
Checked at receiver If error is detected the frame is dropped
Use 32-bits CRC to check address type and data
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
24
Manchester Encoding
Each bit has a transition Allows clocks in sending and receiving
nodes to synchronize to each other No need for a centralized global clock among
nodes
-0225V 07V
-1825V -07V
for coaxial cable
for UTP
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
25
Round-trip Propagation Delay
The time delay to send a signal on one round-trip In specification the maximum distance
between 2 hosts is 2800m Use 10Mbps Ethernet as an example
Round-trip propagation delay is about 4638 s
Finally round-trip propagation delay is set to be 512 s
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
26
Thick Ethernet Topology
Max distance =500m3+1000m2+300m=2800m
訊號傳遞速度為光速的 065 倍 2800m2divide(3108
065)=2872s Round trip delay 還包括電纜線傳遞延遲及元件延遲等
source httpwwwcsnthuedutw~nfhuangchap04htm
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
27
Part 3
Multiple Access in
Ethernet
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
28
Sending an Ethernet Frame
Broadcast If there are two computers send data at
the same time two frames will collide A collision occurs Receivers discards these frames
CSMACD( Carrier Sense Multiple Access Collision Detection ) is used
Best Effect
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
29
CSMACD
Carrier Sense 表示網路卡要對 carrier 進行監測判斷網路線上是否有資料的傳送
Multiple Access 指出這種機制的目的是要讓多個網路卡可以在同一個 carrier 上存取資料
Collision Detection 表示 collision 是會發生的必須靠 detection的機制來判斷是否有 collision
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
30
Ethernet CSMACD algorithm (12)
1 NIC receives datagram from network layer and creates frame
2 If NIC senses channel idle starts frame transmission
If NIC senses channel busy waits until channel idle and then transmits
3 If NIC transmits entire frame without detecting another transmission NIC is done with frame
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
31
Ethernet CSMACD algorithm (22)
4 If NIC detects another transmission while transmitting aborts and sends jam signal Jam Signal make sure all other transmitters
are aware of collision 48 bits
5 After aborting NIC enters exponential backoff NIC chooses K at random from 012hellip2m-1
after the m th collision
NIC waits K512 bit times returns to Step 2
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
32
No Collision Occurs
A電腦 B電腦
A電腦 B電腦A frame開始送出
A電腦 B電腦
B聽到網路上有資 料 必須等待
A collision確定沒有繼續送資料
time=0
time=512s
Ex 10BaseT
why
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
33
Collision Occurs
If host B sends it frame before getting Arsquos frame a collision occurs
Host A finds noise treat it as a collision
The worst case A finds noise after a
round-trip propagation delay time
A電腦 B電腦B frame開始送出
A電腦 B電腦A frame開始送出
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
jamming signal
B collision發現
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
34
How Long to Find Collision
Round-trip propagation delay is 512 s for 10Mbps Ethernet
Host A must listen at least 512 s and know whether a collision occurs or not
A電腦 B電腦B frame開始送出
A電腦 B電腦A 開始送出
frame
A電腦 B電腦collision發生
A電腦 B電腦
A collision發現接著送出
Jamming signal
B collisionB發現 也 Jamming siganl會送
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
35
CSMACD Random Time Delay (12)
Let two collided hosts retransmit frames at a different time Host generates a random time delay (r) r 0
1 2k-1 n the number of collisions( n16) k = min (n 10)
Retransmit the frame after r Exponential backoff algorithm
The random time delay is round-trip propagation delay r For 10BaseT 512 sr
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
36
CSMACD Random Time Delay (22)
Goal adapt retransmission attempts to estimated current load Heavy load random wait will be
longer
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
37
Examples of Binary Exponential Backoff Algorithm
First collision n=1 k=min(n10)=1 r 0 1 Probability=12 to send frame immediately Probability=12 to send frame after 512 s
Second collision n=2 k=min(n10)=2 r 0 1 2 3 Four cases 0s 512 s 512times2 s 512times3
s After ten collisions choose r from
01234hellip1023
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
38
Data Size Limitation
To avoid that any host occupies Ethernet too long the data size is smaller than 1500 bytes
If the size of a frame is too small adapters can not detect collision in time 10MHz 01sbit Within 512s 512sdivide01sbit= 512bits
=64 bytes can be sent Every frame must be larger than 64 bytes
Data size must be larger than 46 bytes
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
39
Effect of CSMACD
Unpredicable when the frame can be received
Not fair Bandwidth utilization degrades if heavy
loading Not suitable for real-time applications
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
40
Properties of An Ethernet
Shared bus technology( broadcast) Lowest level hardware does not support
addressing Best-effort delivery mechanism No central authority to grant access Each transmission is limited in duration
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
41
Part 4
IEEE 8023
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
42
IEEE 802 Series
Fiber UTP wireless cable
80211 8023
8022 LLC (Logic Link Control)
SMTP FTPHTTP
TCP UDP
SNMP DNS
IP
Ethernet802128024 8025
bull8023 CDMACD
bull8024 Token-bus
bull8025 Token-ring
bull80211 Wireless LAN
bull80212 100VG-AnyLAN
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
43
IEEE 8023 Protocol
Ethernet is compatible to 8023 Length of bytes in LLC
Preamble SourceDestination Length Data from LLC FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No
44
Flow Chart of IEEE 8023傳送訊框
組成訊框
線上有訊號
訊框過短( )衝撞
檢查碼正確
傳送訊框
發生衝撞
傳送完畢
jamming送出signal
i=i+1
i gt 16
計算延遲時間
等待延遲時間
傳送失敗傳送成功
Y es
No
No
No
Y es
Y es Y es
No
接收訊框
開始接收
接收完畢
位址辨識成功
尚有多餘位元
刪除訊框頭尾
長度錯誤對齊錯誤
Y es
No
No
No
Y es
Y es
Y es
接收成功訊框錯誤
長度欄位內容正確
No
Y es No
Y es
No