Transcript Chapter 16 High Speed LANs
MAC Protocols & High Speed LANs
Lesson 8 NETS2150/2850 1
Lesson Outline
Random access MAC protocols Ethernet Implementations Ethernet (10 Mbps) Fast Ethernet (100 Mbps) Gigabit Ethernet - GbE (1 Gbps) 10 Gb Ethernet – 10 GbE (10 Gbps) Round robin MAC protocol Token Ring (10 Mbps & 100 Mbps) 2
Random Access Protocols
When node has frame to send transmit at full channel data rate R no
a priori
coordination among nodes two or more transmitting nodes collision random access MAC protocol how to detect collisions specifies: how to recover from collisions (e.g., via delayed retransmissions) Examples of random access MAC protocols: ALOHA slotted ALOHA CSMA, CSMA/CD 3
ALOHA
Built for packet radio net across Hawaiian islands When station has frame, it sends immediately Wait for round trip time (RTT) RTT is time between send of frame and receive of ACK If receive ACK, fine. If not, retransmit If no ACK after repeated transmissions, give up Frame may be damaged by noise or by another station transmitting at the same time (collision) Max utilisation 18% 4
Slotted ALOHA
Time in uniform slots equal to frame transmission time All frames are same fixed size Need central clock (or other sync mechanism) Transmission begins at slot boundary Frames either miss or overlap totally Max utilisation 37% 5
Latest News!
The "First" Terabit switch/router 672 GbE or 56 10-GbE ports 1.68 Tbps switch fabric 1 billion packets per second Force10 E1200 Switch/Router 6
Carrier Sense Multiple Access (CSMA) First listen for clear medium (i.e. carrier sense) If medium idle, transmit If two stations start at the same instant, collision Wait reasonable time (RTT plus ACK contention) No ACK then retransmit CSMA utilisation >> ALOHA schemes Three types: nonpersistent, 1-persistent and
p
persistent CSMA 7
Nonpersistent CSMA
1. If medium is idle, transmit; otherwise, go to 2 2. If medium is busy, wait for random time and repeat 1 Random delays reduces probability of collisions However, capacity is wasted because medium will remain idle following end of transmission Even if stations waiting to access 8
1-persistent CSMA
To avoid idle channel time, 1-persistent protocol used Station wishing to transmit listens and obeys following: 1. If medium idle, transmit; otherwise, go to step 2 2. If medium busy, listen until idle; then transmit immediately (probability 1) 1-persistent stations are greedy If two or more stations waiting, collision is guaranteed!
Gets sorted out after collision 9
p
-persistent CSMA
Compromise that attempts to reduce collisions Like nonpersistent And reduce idle time Like 1-persistent 1. If medium idle, transmit with probability p, and delay one time unit with probability (1 – p) Time unit is typically maximum propagation delay 2. If medium busy, listen until idle and repeat step 1 3. If transmission is delayed one time unit, repeat step 1 What is an effective value of p?
10
Value of
p
?
n
stations waiting to send At end of a transmission, expected/average number of stations attempting to transmit is:
np
If
np
> 1, higher chance of a collision Repeated attempts to transmit almost guaranteeing more collisions as retries compete with new transmissions Eventually, all stations trying to send Continuous collisions zero throughput So
np
< 1 for expected peaks of
n
If heavy load expected,
p
small However, as
p
made smaller, stations wait longer At low loads, this gives very long delays 11
CSMA/CD
With CSMA, collision occupies medium for duration of transmission With CSMA/CD, stations listen whilst transmitting 1. If medium idle, transmit, otherwise, step 2 2. If busy, listen for idle, then transmit 3. If collision detected, stop frame transmission and send
jam signal
then cease transmission 4. After jam, backoff random time then start from step 1 12
CSMA/CD Operation
13
Which Persistence Algorithm?
IEEE 802.3 uses CSMA/CD 1-persistent!
Both nonpersistent and
p
-persistent have performance problems 1-persistent (p = 1) seems more unstable than
p
persistent Greed of the stations But wasted time due to collisions is short (if T frame T prop ) >> With random backoff, unlikely to collide on next tries To ensure backoff maintains stability, IEEE 802.3 and Ethernet use
binary exponential backoff
14
Ethernet uses CSMA/CD
adapter doesn’t transmit if it senses that some other adapter is transmitting, that is, carrier sense transmitting adapter aborts when it senses that another adapter is transmitting, that is, collision detection Before attempting a retransmission, adapter waits a random time, that is, random access 15
Ethernet CSMA/CD algorithm
After aborting, adapter enters
exponential backoff
: after the
m
th collision, adapter chooses a K at random from {0,1,2,…,2
m
-1} If adapter detects another transmission while transmitting aborts and sends
jam signal
Adapter waits Step 1
K*512
bit times and returns to 16
Ethernet’s CSMA/CD (more)
Jam Signal: make sure all other transmitters are aware of collision; 48 bits; Bit time:
0.1
s
for 10 Mbps Ethernet ; for K=1023, wait time is about 50 ms Binary Exponential Backoff:
Goal
: adapt retransmission attempts to estimated current load heavy load: random wait will be longer first collision: choose K from {0,1}; delay is K x 512 bit transmission times after second collision: choose K from {0,1,2,3}… after ten collisions, choose K from {0,1,2,3,4,…,1023} 17
Example
Suppose stations A and B are on the same 10 Mbps Ethernet segment, and the propagation delay between them is 500 bit times. In the worst case, will A be able to detect a collision involving B?
500 bits
A B Solution Worst case: Min frame size = 512 bits Time for complete bit emission = 512 + 64 Time for collision detection = 500 + 499 = 999 Since 576 < 999, collision not detected by A!
18
IEEE 802.3 Frame Format
Ethernet is similar, but length is replaced by type Both has min frame size = 512 bits (64 octets) 19
IEEE Notation for 10 Mbps Ethernet
10Base5 10Base2 10Base-T 10Base-F
Medium Signaling Topology Nodes Thick Coaxial 100 Thin Coaxial 30 UTP Baseband Baseband Baseband Manchester Manchester Manchester Bus Bus Star 850nm fibre On/Off Star 33 20
100Mbps Fast Ethernet
Use same IEEE 802.3 MAC protocol and frame format 100BASE-TX uses STP or Cat 5 UTP 100BASE-FX uses optical fiber 100BASE-T4 can use Cat 3 UTP 100 Mbps over lower quality cables Uses 4 twisted-pair lines between nodes Data transmission uses three pairs in one direction at a time Star-wire physical topology Similar to 10BASE-T 21
100Mbps (Fast Ethernet)
100Base-TX 100Base-FX 100Base-T4
2 pair, STP MLT-3 2 pair, Cat 5 UTP MLT-3 2 optical fibre 4 pair, cat 3,4,5 4B5B, NRZI 8B6T,NRZ 22
100BASE-T Options
23
Full Duplex Operation
Traditional Ethernet half duplex Either transmit or receive but not both simultaneously With full-duplex, station can transmit and receive simultaneously 100-Mbps Ethernet in full-duplex mode, theoretical transfer rate 200 Mbps Must use switches Each station constitutes separate collision domain!
In fact, no collisions 24
Gigabit Ethernet - Differences
Same frame format and MAC protocol as before Carrier extension is used for short frames At least 4096 bit-times long (cf. 512 for 10/100) T frame > T prop (legacy compatibility) Frame bursting – allows multiple short frames transmission 1000BaseT is standardised as IEEE 802.3ab
25
Gigabit Ethernet – Physical
1000Base-SX Short wavelength, multimode fibre 1000Base-LX Long wavelength, Multi or single mode fibre 1000Base-CX Copper jumpers < 25m, shielded twisted pair (STP) 1000Base-T 4 pairs of Cat 5 UTP 26
Gigabit Ethernet Medium Options
27
Cisco® High-end Switches
28
Gigabit Ethernet Configuration
29
10 Gigabit Ethernet - Uses
High-speed, local backbone interconnection between large-capacity switches or
server farm
Campus wide connectivity Allows construction of MANs and WANs Connect geographically dispersed LANs between campuses Ethernet competes with ATM and other WAN technologies 10GbE provides substantial value over ATM 10GBaseT is standardised as IEEE 802.3ae
30
10GbE - Advantages
No expensive, bandwidth-consuming conversion between Ethernet packets and ATM cells Network is Ethernet, end to end Optimizing operation and cost for LAN, MAN, or WAN Variety of standard optical and STP interfaces specified for 10 GbE 31
10 GbE Implementations
Maximum link distances cover 300 m to 40 km 10GBASE-S (short): 850 nm on multimode fiber Up to 300 m 10GBASE-L (long) 1310 nm on single-mode fiber Up to 10 km 10GBASE-E (extended) 1550 nm on single-mode fiber Up to 40 km 32
10GbE Distance Options
33
Cisco® 10GbE module
Supports 10GBase-S/L/E/CX Up to 32 10-GbE ports 256 MB buffer per port Up to 400 million frames per sec (mfps) Supports jumbo frame size (up to 9216 octets)!
34
“Taking Turns” MAC Protocols
Involve a controlled access No collision!
A station cannot send unless been “authorised” There are two main types: Polling Token-passing 35
The Polling Scheme
The master/central node “invites” slave nodes to transmit in turn Main concerns: polling overhead latency single point of failure (master) 36
Token Ring
Developed from IBM's commercial token ring Because of IBM's large presence, token ring has gained broad acceptance But, never achieved popularity of Ethernet!
Currently, large installed base of token ring products Market share likely to decline 37
Ring Operation
Each repeater connects to two others via unidirectional transmission links Single closed path Data transferred bit by bit from one repeater to the next Repeater regenerates and retransmits each bit Frame removed by transmitter after one trip round ring 38
Ring Repeater States
39
IEEE 802.5 Frame Format
Data Frame Token Frame 40
IEEE 802.5 MAC Protocol Token Passing
A special frame (i.e.
token
) circulates continuously Station waits for the token Changes one bit in token to make it SOF for data frame Append rest of data frame Frame makes round trip and is absorbed by transmitting station Inserts new token when transmission has finished How long to hold token –
token holding time
(THT) Under light loads, some inefficiency Under heavy loads, round robin 41
Token Ring Operation
42
Fig. 16.18
LAN Performance Comparison
43
Wireless LAN Overview
A wireless LAN uses wireless medium Saves installation of LAN cabling Eases relocation and other modifications to network structure Popularity of wireless LANs has grown rapidly Role for the wireless LAN Manufacturing plants, stock exchange trading floors, warehouses Historical buildings Small offices where wired LANs not economical IEEE has specified this technology in 802.11 standard 44
IEEE 802.11 Wireless LAN
802.11b
2.4-2.5 GHz unlicensed radio spectrum up to 11 Mbps widely deployed, using base stations 802.11a
5-6 GHz range up to 54 Mbps 802.11g
2.4-2.5 GHz range up to 54 Mbps All use CSMA/CA for MAC protocol All have
infrastructure
and
ad-hoc
network versions 45
McGraw-Hill
Infrastructure Approach
Wireless host communicates with an
access point
Basic Service Set (BSS) (a.k.a. “cell”) contains: wireless stations one access point (AP) BSSs combined to form a distribution system (DS)
Ad Hoc Approach
No AP!
Wireless stations communicate with each other Typical usage: “laptop” meeting in conference room, car interconnection of “personal” devices battlefield IETF MANET (Mobile Ad hoc Networks) working group looks into this approach Special needs such wireless routing, security 47
IEEE 802.11: MAC protocol
Collision if 2 or more nodes transmit at same time as the wireless channel is shared CSMA makes sense: get all the bandwidth if you’re the only one transmitting shouldn’t cause a collision if you sense another transmission Thus, it uses CSMA with
collision avoidance
(CSMA/CA) Not CD because detecting collision is difficult in wireless environment Two-handshaking used 48
Summary
Random access protocol CSMA/CD in 802.3 (Ethernet) Round Robin Token passing in 802.5 (Token Ring) Wireless LAN Read Stallings chapter 16 Next: Layer-3 Network layer 49