Fall 2007 CSci232: Direct Link networks
1
Direct Link Networks• Encoding and Framing• Error Detection/Correction• Reliable Transmission will be covered
later (with TCP)• Media Access Control • (Wired) LAN Technologies• Readings
– Chapter 2 except Section 2.5, which is delayed to the discusson on Transport layer.
Fall 2007 CSci232: Direct Link networks
2
Encoding
• Signals propagate over a physical medium– modulate electromagnetic waves– e.g., vary voltage
• Encode binary data onto signals– e.g., 0 as low signal and 1 as high signal– known as Non-Return to zero (NRZ)
Bits
NRZ
0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0
Fall 2007 CSci232: Direct Link networks
3
Problems: Consecutive 1s or 0s
• Low signal (0) may be interpreted as no signal
• High signal (1) leads to baseline wander• Unable to recover clock
– Clocks at the sender and receiver use signal transition to synchronize each other
Fall 2007 CSci232: Direct Link networks
4
Alternative Encodings• Non-return to Zero Inverted (NRZI)
– make a transition from current signal to encode a one; stay at current signal to encode a zero
– solves the problem of consecutive ones
• Manchester– transmit XOR of the NRZ encoded data and the clock– only 50% efficient.
Fall 2007 CSci232: Direct Link networks
5
Encodings (cont)
• 4B/5B– every 4 bits of data encoded in a 5-bit code– 5-bit codes selected to have no more than one
leading 0 and no more than two trailing 0s – thus, never get more than three consecutive 0s– resulting 5-bit codes are transmitted using NRZI – achieves 80% efficiency
Fall 2007 CSci232: Direct Link networks
6
Encodings (cont)
Bits
NRZ
Clock
Manchester
NRZI
0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0
Fall 2007 CSci232: Direct Link networks
7
Framing
• Break sequence of bits into a frame• Typically implemented by network
adaptor
Frames
BitsAdaptor Adaptor Node BNode A
Fall 2007 CSci232: Direct Link networks
8
Approaches• Sentinel-based
– delineate frame with special pattern: 01111110– e.g., HDLC, SDLC, PPP
– problem: special pattern appears in the payload– solution: bit stuffing
• sender: insert 0 after five consecutive 1s• receiver: delete 0 that follows five consecutive 1s
Header Body
8 16 16 8
CRCBeginningsequence
Endingsequence
Fall 2007 CSci232: Direct Link networks
9
Approaches (cont)
• Couter-based– include payload length in header– e.g., DDCMP
– problem: count field corrupted– solution: catch when CRC fails
SY
N
Header Body
8 8 4214 168
SY
N
Cla
ss CRCCount
Fall 2007 CSci232: Direct Link networks
10
Approaches (cont)
• Clock-based– each frame is 125us long– e.g., SONET: Synchronous Optical Network
Overhead Payload
90 columns
9 rows
Fall 2007 CSci232: Direct Link networks
11
Handling Errors
• Data can be corrupted during transmission– Bit values changed
• Frame includes additional information– Set by sender– Checked by receiver
• Error-detection vs error-correction– Both need redundant information– Detection: error exists or not.– Correction: repair if there was an error
• Statistical guarantee
Fall 2007 CSci232: Direct Link networks
12
Error Detecting and Correcting Codes
• How many check/redundancy bits?– To detect single-bit error
• 1 bit: even/odd parity
– To correct a single-bit error in m-bit message• Need a minimum of r bits such that• (m + r + 1) 2r
• Example: 3-bit message needs 3-bit redundancy
• Correction or detection+retransmission?
Fall 2007 CSci232: Direct Link networks
13
Error Detection Techniques
• Checksum– Treat data as sequence of integers– Compute and send arithmetic sum– Detects some multiple bit errors not all
• Cyclic Redundancy Check– Mathematical function of data– More complex to compute– Handles more errors
Fall 2007 CSci232: Direct Link networks
14
Cyclic Redundancy Check
• Add k bits of redundant data to an n-bit message– want k << n– e.g., k = 32 and n = 12,000 (1500 bytes)
• Represent n-bit message as n-1 degree polynomial– e.g., MSG=10011010 as M(x) = x7 + x4 + x3 + x1
• Let k be the degree of some divisor polynomial– e.g., C(x) = x3 + x2 + 1
Fall 2007 CSci232: Direct Link networks
15
CRC (cont)• Transmit polynomial P(x) that is evenly
divisible by C(x) – shift left k bits, i.e., M(x)xk
– subtract remainder of M(x)xk / C(x) from M(x)xk
• Receiver polynomial P(x) + E(x)– E(x) = 0 implies no errors
• Divide (P(x) + E(x)) by C(x); remainder zero if:– E(x) was zero (no error), or– E(x) is exactly divisible by C(x)
Fall 2007 CSci232: Direct Link networks
16
CRC Example
Generator 11011111100110011010000 Message1101
10011101
10001101
10111101
11001101
10001101
101 Remainder
Fall 2007 CSci232: Direct Link networks
17
Choice of C(x)
• Want to ensure C(x) doesn’t divide E(x)• We can detect
– All single-bit errors if• C(x) has at least 2 terms
– All double-bit errors if • C(x) doesn’t divide xj + 1
– X15 + x14 + 1 doesn’t divide xj + 1 for any j below 32768
– Any odd number of errors if• C(x) contains the factor x+1
– Any “burst” error of length less than or equal to k bits
– Most burst errors of length greater than k bits
Fall 2007 CSci232: Direct Link networks
18
Error Detection Summary
• To detect data corruption– Sender adds additional information to packet– Receiver checks
• Techniques– Parity bit– Checksum– Cyclic Redundancy Check
Fall 2007 CSci232: Direct Link networks
19
Error Recovery
• Reliable delivery over unreliable channel– How to recover from corrupted/lost packets
• Error detection and retransmission– With acknowledgements and timeouts– Also called Automatic Repeat Request (ARQ)– Retransmission incurs round trip delay
• Error correcting codes– Also called Forward Error Correction (FEC)– No sender retransmission required
Fall 2007 CSci232: Direct Link networks
20
Summary
• Encoding • Framing• Error correction/detection codes
– Parity/Checksum/CRC
Fall 2007 CSci232: Direct Link networks
21
Shared Media andLocal Area Networks
• Shared Media Access Problem– Media access control (MAC) and LAN– MAC addresses and network adaptors (NICs)– MAC protocols: random access vs. controlled access
• Ethernet• Token Ring and FDDI• 802.11 Wireless LAN
• Readings– Sections 2.6-2.7
Fall 2007 CSci232: Direct Link networks
22
Multiple Access Links and LANs
Two types of “links”:• point-to-point, e.g.,
– PPP for dial-up access, or over optical fibers
• broadcast (shared wire or medium), e.g.– traditional Ethernet– 802.11 wireless LAN
Fall 2007 CSci232: Direct Link networks
23
Typical LAN Structure
RAM
RAMROM
Ethernet Processor
• Transmission Medium
• Network Interface Card (NIC)
• Unique MAC “physical” address
Fall 2007 CSci232: Direct Link networks
24
Adaptors Communicating
• link layer implemented in “adaptor” (aka NIC), with “transceiver” in it– Ethernet card, dial-up
modem, 802.11 wireless card• sending side:
– encapsulates packet in frame– adds error checking bits, flow
control, reliable data transmission, etc.
• receiving side– looks for errors, flow
control, reliable data transmission, etc
– extracts packet, passes to receiving node
• adapter is semi-autonomous
• data link & physical layers are closely coupled!
sendingnode
frame
rcvingnode
network packet
frame
adapter adapter
link layer protocol
Fall 2007 CSci232: Direct Link networks
25
MAC (Physical) Addresses• Addressing needed in shared media
– MAC (media access control) or physical addresses – To identify source and destination interfaces and get
frames delivered from one interface to another physically-connected interface (i.e., on same physical local area network!)
• 48 bit MAC address (for most LANs)– fixed for each adaptor, burned in the adapter ROM– MAC address allocation administered by IEEE
• 1st bit: 0 unicast, 1 multicast.• all 1’s : broadcast
• MAC flat address -> portability – can move LAN card from one LAN to another
Fall 2007 CSci232: Direct Link networks
26
MAC (Physical, or LAN) Addresses
MAC addressing operations on a LAN:• each adaptor on the LAN “sees” all frames• accept a frame only if dest. (unicast) MAC
address matches its own MAC address• accept all broadcast (MAC= all 1’s) frames• accept all frames if set in “promiscuous” mode• can configure to accept certain multicast
addresses (first bit = 1)
Fall 2007 CSci232: Direct Link networks
27
MAC Sub-layer
Data linklayer
802.3CSMA-CD
802.5Token Ring
802.2 Logical link control
Physicallayer
MAC
LLC
802.11Wireless
LAN
Network layer Network layer
Physicallayer
OSIIEEE 802
Various physical layers
OtherLANs
Fall 2007 CSci232: Direct Link networks
28
Broadcast Links: Multiple Access
Single shared communication channel• Only one can send successfully at a time• Two or more simultaneous transmissions
– interference!• How to share a broadcast channel
– media access control uses same shared media
• Humans use multi-access protocols all the time
Fall 2007 CSci232: Direct Link networks
29
Random Access• Stations contend for channels• Overlapping transmissions (collisions)
can occur– Carrier sensing?– Collision detection?
• Protocols– Aloha– Slotted Aloha– Carrier Sense Multiple Access: Ethernet
Fall 2007 CSci232: Direct Link networks
30
Controlled Access
• Stations reserve or are allocated channel– No collisions– Allocation: static or dynamic
• Protocols– Static channel allocation
• Time division multiple access– Demand adaptive channel allocation
• Reservation protocols• Token passing (token bus, token ring)
Fall 2007 CSci232: Direct Link networks
31
Taxonomy of MAC Protocols
WiFi (802.11)
Fall 2007 CSci232: Direct Link networks
32
Pure (unslotted) Aloha
• Simpler, no synchronization• Just send: no waiting for beginning of slot
Fall 2007 CSci232: Direct Link networks
33
Slotted Aloha• Time is divided into equal size slots• Nodes transmit at the beginning of a slot• If collision, retransmit later
Success (S), Collision (C), Empty (E) slots
Fall 2007 CSci232: Direct Link networks
34
Performance of Aloha Protocols
G = offered load = Np0.5 1.0 1.5 2.0
0.1
0.2
0.3
0.4
Pure Aloha
Slotted Aloha
S =
th
rou
gh
pu
t =
“g
ood
pu
t”
(su
ccess
rate
)
Fall 2007 CSci232: Direct Link networks
35
Carrier Sense Multiple Access
• Aloha is inefficient (and rude)– Doesn’t listen before talking
• CSMA: Listen before transmit– If channel idle, transmit entire packet– If busy, defer transmission
• How long should we wait?– Human analogy: don’t interrupt others
• Can carrier sense avoid collisions completely?
Fall 2007 CSci232: Direct Link networks
36
Persistent and Non-persistent CSMA
• Non-persistent– If idle, transmit– If busy, wait random amount of time
• p-persistent– If idle, transmit with probability p– If busy, wait till it becomes idle– If collision, wait random amount of time
Fall 2007 CSci232: Direct Link networks
37
CSMA/CD
CSMA with collision detection (CD)• Listen while talking• Stop transmitting when collision
detected– Compare transmitted and received signals
• Human analogy– Polite conversationalist
• Worst case time to detect a collision?
Fall 2007 CSci232: Direct Link networks
38
CollisionsA B
A B
A B
A B
Fall 2007 CSci232: Direct Link networks
39
Worst Case Collision Detection Time
Fall 2007 CSci232: Direct Link networks
40
CSMA/CD: Illustration
Fall 2007 CSci232: Direct Link networks
41
Ethernet Overview• History
– developed by Xerox PARC in mid-1970s– roots in Aloha packet-radio network– standardized by Xerox, DEC, and Intel in 1978– similar to IEEE 802.3 standard
• CSMA/CD– carrier sense– multiple access– collision detection
• Frame Format
Destaddr
64 48 32
CRCPreamble Srcaddr
Type Body
1648
Fall 2007 CSci232: Direct Link networks
42
Ethernet“Dominant” LAN technology: • cheap $20 for 100Mbs!• first widely used LAN technology• Simpler, cheaper than token ring LANs and ATM• Kept up with speed race: 10, 100, 1000 Mbps
Metcalfe’s Ethernetsketch
Fall 2007 CSci232: Direct Link networks
43
Ethernet Frame FormatSending adapter encapsulates IP datagram (or other
network layer protocol packet) in Ethernet frame DIX frame format
IEEE 802.3 format
Destaddr
8 bytes 6 4
CRCPreamble Srcaddr Type Data
26 0-1500
Destaddr
8 bytes 6 4
CRCPreamble Srcaddr Length Data
26 0-1500
• Ethernet has a maximum frame size: data portion <=1500 bytes• It imposes a minimum frame size: 64 bytes (excluding preamble) If data portion <46 bytes, pad with “junk” to make it 46 bytes Q: Why minimum frame size in Ethernet?
Fall 2007 CSci232: Direct Link networks
44
Fields in Ethernet Frame Format• Preamble:
– 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 (SoF: start-of-frame)
– used to synchronize receiver, sender clock rates, and identify beginning of a frame
• Addresses: 6 bytes– if adapter receives frame with matching destination address,
or with broadcast address (eg ARP packet), it passes data in frame to network layer protocol (specified by TYPE field)
– otherwise, adapter discards frame
• Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and AppleTalk– 802.3: Length gives data size; “protocol type” included in
data
• CRC: checked at receiver, if error is detected, the frame is simply dropped
Fall 2007 CSci232: Direct Link networks
45
IEEE 802.3 MAC: EthernetMAC Protocol:• CSMA/CD• Slot Time is the critical system parameter
– upper bound on time to detect collision– upper bound on time to acquire channel– upper bound on length of frame segment generated
by collision– quantum for retransmission scheduling– max{round-trip propagation, MAC jam time}
• Truncated binary exponential backoff– for retransmission n: 0 < r < 2k, where k=min(n,10)– give up after 16 retransmissions
Fall 2007 CSci232: Direct Link networks
46
IEEE 802.3 Parameters
• 1 bit time = time to transmit one bit– 10 Mbps 1 bit time = 0.1 s
• Maximum network diameter 2.5km– Maximum 4 repeaters
• “Collision Domain” – Distance within which collision can occur and be detected – IEEE 802.3 specifies:
worst case collision detection time: 51.2 s
• Slot time– 51.2 s = 512 bits = 64 bytes
• Why minimum frame size?– 51.2 s => minimum # of bits can be transited at
10Mpbs is 512 bits => 64 bytes is required for collision detection
Fall 2007 CSci232: Direct Link networks
47
Ethernet MAC Protocol: Basic Ideas
1-persistent CSMA/CD• Carrier sense: station listens to channel first
– Listen before talking
• If idle, station may initiate transmission– Talk if quiet
• Collision detection: continuously monitor channel– Listen while talking
• If collision, stop transmission– One talker at a time
• Exponential binary back-off algorithm
Fall 2007 CSci232: Direct Link networks
48
Ethernet CSMA/CD Illustration
Fall 2007 CSci232: Direct Link networks
49
Ethernet CSMA/CD Alg. Flow Chart
Fall 2007 CSci232: Direct Link networks
50
Ethernet CSMA/CD Algorithm
1. Adaptor gets datagram from and creates frame
2. If adapter senses channel idle, it starts to transmit frame. If it senses channel busy, waits until channel idle and then transmits
3. If adapter transmits entire frame without detecting another transmission, the adapter is done with frame ! Signal to network layer “transmit OK”
4. If adapter detects another transmission while transmitting, aborts and sends jam signal
5. After aborting, adapter enters exponential backoff: after the mth collision, adapter chooses a K at random from {0,1,2,…,2m-1}. Adapter waits K*512 bit times and returns to Step 2
6. Quit after 16 attempts, signal to network layer “transmit error”
Fall 2007 CSci232: Direct Link networks
51
Ethernet’s CSMA/CD (more)
Jam Signal: make sure all other transmitters are aware of collision; 48 bits;
Bit time: .1 microsec for 10 Mbps Ethernet ;for K=1023, wait time is about 50 msec
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}
Fall 2007 CSci232: Direct Link networks
52
CSMA/CD EfficiencyRelevant parameters
– cable length, signal speed, frame size, bandwidth
• tprop = max prop between 2 nodes in LAN• ttrans = time to transmit max-size frame
• Efficiency goes to 1 as tprop goes to 0• Goes to 1 as ttrans goes to infinity• Much better than ALOHA, but still decentralized, simple, and cheap
transprop tt /51
1efficiency
Fall 2007 CSci232: Direct Link networks
53
IEEE 802.3 Physical Layer
(a) transceivers(b)
10base5 10base2 10baseT 10baseFX
Medium Thick coax Thin coaxTwisted
pairOptical fiber
Max. Segment Length
500 m 200 m 100 m 2 km
Topology Bus Bus StarPoint-to-point link
IEEE 802.3 10 Mbps medium alternatives
Thick Coax: Stiff, hard to work with T connectors flaky
Hubs & Switches!
Fall 2007 CSci232: Direct Link networks
54
Ethernet Technologies: 10Base2• 10: 10Mbps; 2: under 200 meters max cable length• thin coaxial cable in a bus topology
• repeaters used to connect up to multiple segments• repeater repeats bits it hears on one interface to its other interfaces: physical layer device only!• has become a legacy technology
Fall 2007 CSci232: Direct Link networks
55
10BaseT • 10 Mbps rate• T stands for Twisted Pair• Nodes connect to a hub: “star topology”; 100 m max distance between nodes and hub
• Hubs are essentially physical-layer repeaters:– bits coming in one link go out all other links– no frame buffering– no CSMA/CD at hub: adapters detect collisions– provides net management functionality
hub
nodes
Fall 2007 CSci232: Direct Link networks
56
Ethernet Hubs & Switches
(a)
Single collision domain(b)
High-Speed backplane or interconnection fabric
Twisted Pair CheapEasy to work withReliableStar-topology CSMA-CD
Twisted Pair CheapBridging increases scalabilitySeparate collision domainsFull duplex operation
Fall 2007 CSci232: Direct Link networks
57
Evolution of EthernetFrom early 80’s 10Base Ethernet to 90’s 100Base
(Fast) Ethernet to today’s Gigabit Ethernet to 10 Gigabit
Ethernet, ……
IEEE 802.3 Original Parameters• transmission Rate: 10 Mbps• Min Frame: 512 bits = 64 bytes• slot time: 512 bits/10 Mbps = 51.2 sec
– 51.2 sec x 2x105 km/sec =10.24 km, 1 way– 5.12 km round trip distance
• max Length: 2500 meters + 4 repeaters
• For compatibility, desire to maintain same frame format!– Each x10 increase in bit rate, must be accompanied by x10
decrease in distance ?!
Fall 2007 CSci232: Direct Link networks
58
100Base T (Fast) Ethernet: Issues• 1 bit time = time to transmit one bit
– 100 Mbps 1 bit time = 0.01 s• If we keep the same “collision domain”, i.e., worst case collision detection time kept at 51.2 s
Q: What will be the minimum frame size?– 51.2 s => minimum # of bits can be transited at
100Mpbs is 5120 bits => 640 bytes is required for collision detection
– This requires change of frame format and protocol!
• Or we can keep the same minimum frame size, but reduce “collision domain” or network diameter!• slot time from 51.2 s to 5.12 s!• maximum network diameter 100 m!
Fall 2007 CSci232: Direct Link networks
59
Fast (100Mbps) Ethernet
100baseT4 100baseT 100baseFX
MediumTwisted pair category 3
UTP 4 pairsTwisted pair category 5
UTP two pairs
Optical fiber multimode
Two strands
Max. Segment Length
100 m 100 m 2 km
Topology Star Star Star
IEEE 802.3 100 Mbps Ethernet medium alternatives
To preserve compatibility with 10 Mbps Ethernet:• Same frame format, same interfaces, same protocols• Hub topology only with twisted pair & fiber• Bus topology & coaxial cable abandoned• Category 3 twisted pair (ordinary telephone grade) requires 4 pairs• Category 5 twisted pair requires 2 pairs (most popular)• Most prevalent LAN today
Fall 2007 CSci232: Direct Link networks
60
Gigabit Ethernet
Gigabit Ethernet Physical Layer Specification(IEEE 802.3 1 Gigabit Ethernet medium alternatives)
1000baseSX 1000baseLX 1000baseCX 1000baseT
MediumOptical fiber multimode
Two strands
Optical fiber single modeTwo strands
Shielded copper cable
Twisted pair category 5
UTP
Max. Segment Length
550 m 5 km 25 m 100 m
Topology Star Star Star Star
Fall 2007 CSci232: Direct Link networks
61
Gigabit Ethernet• use standard Ethernet frame format• allows for point-to-point links and shared broadcast
channels• in shared (half-duplex hub) mode, CSMA/CD is used
- slot time increases to 512 bytes- small frames need to be extended to 512 B- carrier extension:– frame bursting: allow stations to transmit burst of
short frames• Commonly used today: Gigabit switches!
– Full-Duplex at 1 Gbps for point-to-point links– Frame structure preserved but CSMA-CD essentially
abandoned– Extensive deployment in backbone of enterprise data
networks and in server farms
Fall 2007 CSci232: Direct Link networks
62
Carrier Extension
RRRRRRRRRRRRRFrame
Carrier Extension
512 bytes
• For 10BaseT : 2.5 km max; slot time = 64 bytes• For 1000BaseT: 200 m max; slot time = 512 bytes• Carrier Extension : continue transmitting control
characters [R] to fill collision interval.• This permits minimum 64-byte frame to be
handled.• Control characters discarded at destination.• For small frames net throughput is only slightly
better than Fast Ethernet.
Fall 2007 CSci232: Direct Link networks
63
Frame Bursting
512 bytes
ExtensionFrame Frame Frame Frame
Frame burst
• Source sends out burst of frames without relinquishing control of the network.
• Uses Ethernet Interframe gap filled with extension bits (96 bits)
• Maximum frame burst is 8192 bytes• Three times more throughput for small frames.
Fall 2007 CSci232: Direct Link networks
64
10 Gigabit Ethernet IEEE 802.3 10 Gbps Ethernet medium alternatives
10GbaseSR 10GBaseLR 10GbaseEW 10GbaseLX4
Medium
Two optical fibersMultimode at 850 nm
64B66B code
Two optical fibers
Single-mode at 1310 nm
64B66B
Two optical fibers
Single-mode at 1550 nmSONET compatibility
Two optical fibers multimode/single-mode with four wavelengths at 1310 nm band8B10B code
Max. Segment Length
300 m 10 km 40 km 300 m – 10 km
• Frame structure preserved• CSMA-CD protocol officially abandoned• LAN PHY for local network applications• WAN PHY for wide area interconnection using SONET OC-192c • Extensive deployment in metro networks anticipated
Fall 2007 CSci232: Direct Link networks
65
Server
100 Mbps links
10 Mbps links
ServerServer
Server
100 Mbps links
10 Mbps links
Server
100 Mbps links
10 Mbps links
Server
Gigabit Ethernet links
Gigabit Ethernet links
Server farm
Department A Department B Department C
Hub Hub Hub
Ethernet switch
Ethernet switch
Ethernet switch
Switch/router Switch/router
Typical Ethernet Deployment
Fall 2007 CSci232: Direct Link networks
66
Ethernet Summary
• 1-persistent CSMA/CD• 51.2 s to seize the channel• Collision not possible after 51.2 s• Minimum frame size of 64 bytes• Binary exponential backoff• Works better under light load• Delivery time non-deterministic
Fall 2007 CSci232: Direct Link networks
67
Token based Multiple Access
• Grant access to one station at a time– Have one token circulating among all stations
• To transmit– Station must grab token (remove from media)– Transmit packet while holding token– Release token
Fall 2007 CSci232: Direct Link networks
68
Ring Topology
Fall 2007 CSci232: Direct Link networks
69
Token Ring (IEEE 802.5)
• Station– Wait for token to arrive– Hold the token and start data transmission
• Maximum token holding time max packet size– Strip the data frame off the ring
• After it has gone around the ring– When done, release the token to next station
• When no station has data to send– Token circulates continuously– Ring must have sufficient delay to contain the token
Fall 2007 CSci232: Direct Link networks
70
Token Ring Performance
• Efficiency
a
1
1
TRANS
PROPa
where
Fall 2007 CSci232: Direct Link networks
71
Token Release
Token
Fram
eToken Frame
Release after Transmission Release after Reception
Fall 2007 CSci232: Direct Link networks
72
Tokens and Data Frames
Body ChecksumSrcaddr
Variable48
Destaddr
48 32
Enddelimiter
8
Framestatus
8
Framecontrol
8
Accesscontrol
8
Startdelimiter
8
Fall 2007 CSci232: Direct Link networks
73
Token Ring Frame Fields
• Access Control– Token bit: 0 token 1 data– Monitor bit: used for monitoring ring– Priority and reservation bits: multiple priorities
• Frame Status– Set by destination, read by sender
• Frame control– Various control frames for ring maintenance
Fall 2007 CSci232: Direct Link networks
74
Priority and Reservation
• Token carries priority bits– Only stations with frames of equal or higher priority
can grab the token
• A station can make reservation– When a data frame goes by– If a higher priority has not been reserved
• A station raising the priority is responsible for lowering it again
Fall 2007 CSci232: Direct Link networks
75
Ring Maintenance• Each ring has a monitor station• How to select a monitor?
– Election/self-promotion: CLAIM_TOKEN
• Responsibilities– Insert additional delay
• To accommodate the token– Check for lost token
• Regenerate token– Watch for orphan frames
• Drain them off the ring– Watch for garbled frames
• Clean up the ring and regenerate token
Fall 2007 CSci232: Direct Link networks
76
Fault Scenarios
• What to do if ring breaks?– Everyone participates in detecting ring breaks– Send beacon frames– Figure out which stations are down– By-pass them if possible
• What happens if monitor dies?– Everyone gets a chance to become the new king
• What if monitor goes berserk?
Fall 2007 CSci232: Direct Link networks
77
Fall 2007 CSci232: Direct Link networks
78
Token Ring Summary
• Stations take turns to transmit• Only the station with the token can
transmit• Sender receives its own transmission
– Drains its frame off the ring
• Releases token after transmission/reception
• Deterministic delivery possible• High throughput under heavy load
Fall 2007 CSci232: Direct Link networks
79
Ethernet vs Token Ring
• Non-deterministic• No delays at low
loads• Low throughput
under heavy load• No priorities• No management
overhead• Large minimum size
• Deterministic• Substantial delays at
low loads• High throughput
under heavy load• Multiple priorities• Complex
management• Small frames
possible
Fall 2007 CSci232: Direct Link networks
80
Fall 2007 CSci232: Direct Link networks
81
FDDI
• Two counter-rotating rings– Failure recovery
• Optical fiber– High bandwidth– Difficult to tap without detection
• 100 Mbps data rate• Up to 200 kms, 1000 stations
Fall 2007 CSci232: Direct Link networks
82
FDDI vs. 802.5 (Token Ring) • Operationally are very similar
– In frame format and contents
• Some differences– Special 4B/5B symbols in FC field
• To indicate token or type of frame– Maximum frame size of 4,500 bytes– Release token after transmission– Enhanced quality of service
• Synchronous and asynchronous frames
Fall 2007 CSci232: Direct Link networks
83
Timed Token Algorithm
• Token Holding Time (THT)– upper limit on how long a station can hold the token
• Token Rotation Time (TRT)– how long it takes the token to traverse the ring.– TRT <= ActiveNodes x THT + RingLatency
• Target Token Rotation Time (TTRT)– agreed-upon upper bound on TRT
Fall 2007 CSci232: Direct Link networks
84
Timed Token Algorithm (cont)
• Each node measures TRT between successive tokens– if measured-TRT > TTRT: token is late so don’t send– if measured-TRT < TTRT: token is early so OK to send
• Two classes of traffic– synchronous: can always send– asynchronous: can send only if token is early
Fall 2007 CSci232: Direct Link networks
85
FDDI Failure Recovery
Fall 2007 CSci232: Direct Link networks
86
Summary
• Local Area Networks– Designed for short distance– Use shared media– Many technologies exist
• Media Access Control: key problem!– Different environments/technologies-> different
solutions!
• Topology refers to general shape– Bus– Ring– Star
Fall 2007 CSci232: Direct Link networks
87
Summary (continued)
• Address– Unique number assigned to station– Put in frame header– Recognized by hardware
• Address forms– Unicast– Broadcast– Multicast
Fall 2007 CSci232: Direct Link networks
88
Summary (continued)
• Type information– Describes data in frame– Set by sender– Examined by receiver
• Frame format– Header contains address and type information– Payload contains data being sent
Fall 2007 CSci232: Direct Link networks
89
Summary (continued)• LAN technologies
– Ethernet (bus)– Token Ring– FDDI (ring)– Wireless 802.11
• Wiring and topology– Logical topology and Physical topology (wiring)– Hub allows
• Star-shaped bus• Star-shaped ring
Top Related