prof. younghee lee 1 1 computer networks u lecture 3: data link and lan prof. younghee lee * some...
TRANSCRIPT
1Prof. Younghee Lee1
Computer Networks
Lecture 3: Data Link and LAN
Prof. Younghee Lee
* Some part of this teaching materials are prepared referencing the lecture note made by F. Kurose, Keith W. Ross(U. of Massachusetts)
2Prof. Younghee Lee2
Link Layer Services Framing, link access:
– encapsulate datagram into frame, adding header, trailer– implement channel access if shared medium, – ‘physical addresses’ used in frame headers to identify source, dest
» different from IP address!
Reliable delivery between two physically connected devices: – we learned how to do this already – seldom used on low bit error link (fiber, some twisted pair)– wireless links: high error rates
» Q: why both link-level and end-end reliability?
3Prof. Younghee Lee3
Link Layer Services (more)
Flow Control: – pacing between sender and receivers
Error Detection: – errors caused by signal attenuation, noise. – receiver detects presence of errors:
» signals sender for retransmission or drops frame
Error Correction: – receiver identifies and corrects bit error(s) without
resorting to retransmission
4Prof. Younghee Lee4
The need for flow and error control Flow control
– protocol mechanism that enables a destination entity to regulate the flow of PDUs sent by a source entity» examples; different flow control characteristics
X.25 virtual circuit: network layer LAPB: data link layer TCP connections: transport layer
5Prof. Younghee Lee5
The need for flow and error control Flow control
– employed in various contexts» Hop Scope, Network interface, Entry to exit, End to end
Error control– used to recover from the loss or damage of PDUs in transit
6Prof. Younghee Lee6
Link control mechanism-Stop and Wait Simplest form of flow control CRC ACK0:
– acknowledges receipt of a frame numbered 1
– indicates that the receiver is ready for a frame numbered 0
– positive acknowledgement ARQ: Automatic Repeat reQuest Time out interval rarely used because of inefficiency
– Case: link with very small RTT?
7Prof. Younghee Lee7
Time to send 1 frame
)(
2
frame
ackpropframe
Tt
TTTt
Link control mechanism-Stop and Wait
8Prof. Younghee Lee8
ARQ performance: Stop-and-wait ARQ Error-free Stop-and-wait
link?) satellitein value( ;21
1)2()2(
frame, a oflength the: link, on the rate data the:
21
)2(1
t throughpudnormailize The
2
size. frame fixed a assume
Further small. is frameACK that and negligible relatively is that assume
framenext thesend ready to be and ACK,an receive frame, one send toTime
propframe
frame
propframe
frameprop
propframe
frame
frame
propframe
propframe
proc
procpropackprocpropframe
aaR
TTL
TL
TTLS
TTaLR
TT
T
T
TTS
S
TTT
T
TTTTTTT
9Prof. Younghee Lee9
ARQ performance: Stop-and-wait ARQ Stop-and-wait ARQ with error
)21(
1
)2(
t throughpunormalized
)2(
ed transmittbemust frameeach timesof average the:
)2(2
longer)slightly fact,In ( twice toequal is lueTimeout va that assume
2Timeout
ion. transmisssuccesfulfor required are attemptsion transmissTwo lost. is
ACK itsor that lost frame a that case in the frame theofission for transm timeThe
propframe
frame
propframe
propframe
prop
propframeframe
aNTTN
TS
TTNT
N
TTT
T
TTTT
xx
x
x
10Prof. Younghee Lee10
ARQ performance: Stop-and-wait ARQ Stop-and-wait ARQ with error
a
p
aNS
ppip
iiN
pp
k-k
P
x
i
i
tx
k
21
1
)21(
1
t throughpunormalized
1
1))1((
ions]) transmissPr[(sions]E[transmis
)1(
attempts] fulPr[successattempts] ulunsuccessf )1Pr[(attempts] Pr[exactly
errorin is frame single ay that probabilit :y probabilit the
1
1
1
1
11Prof. Younghee Lee11
ARQ performance: Stop-and-wait ARQ The parameter a
link theof distance signal, ofn propagatio of velocity where
length frame
bitsin medium theoflength
on timeTransmissi
n timePropagatio
parameter the
dV
L
VdR
VL
Rd
RL
Vda
a
12Prof. Younghee Lee12
ARQ performance: Stop-and-wait ARQ
Performance of stop-and-wait protocol(P=10-3)
13Prof. Younghee Lee13
Link control mechanism-Sliding window Sliding-window Techniques
– Receiver accept n frames, and A is allowed to send n frames without waiting for any acknowledgements
– 12~ 0 :number sequence k
14Prof. Younghee Lee14
Link control mechanism-Sliding window Sequence Number Space
– SeqNum field is finite; sequence numbers wrap around Sequence number space must be larger than number of outstanding frames
– SWS <= MaxSeqNum-1 is not sufficient» suppose 3-bit SeqNum field (0..7)» SWS=RWS=7» sender transmit frames 0..6» arrive successfully, but ACKs lost» sender retransmits 0..6» receiver expecting 7,0..5, but receives second incarnation of 0..5
– SWS < (MaxSeqNum+1)/2 is correct rule Intuitively, SeqNum slides between two halves of sequence number space
15Prof. Younghee Lee15
Link control mechanism-Sliding window Sliding-window protocol
16Prof. Younghee Lee16
Link control mechanism-Sliding window Go-back-N: http://wps.aw.com/aw_kurose_network_2/0,7240,227091-,00.html
– most commonly used– The form of error control based on sliding-window flow control– RR– REJ:negative acknowledgement– Damaged frame:
» Case A: errored frame» Case B: lost in transit» Case C:lost in transit. No additional frame to send soon. Sender time out
Sender sends RR with a P bit of 1 as a command Receiver acknowledges by sending a RR indicating the next frame that it expect Sender retransmit
– Damaged RR» damaged RR. Subsequent RR» damaged RR. A’s timer expires.
Sender send RR in Case C. set P-bit timer. If receiver fails to respond, then sender’s P-bit timer will expire Sender tries again multiple times. No ACK -> reset procedure
– Damaged REJ: equivalent to Case C
17Prof. Younghee Lee17
Link control mechanism-Sliding window Selective-reject ARQ
– retransmit only the frame that receive a negative ACK: SREJ– much less widely used than go-back-N– more efficient than go-back-N– receiver must maintain a buffer large enough to save post-
SREJ frames until the frame in error is retransmitted– transmitter, too, requires complex logic.
18Prof. Younghee Lee18
ARQ performance:Sliding-window ARQ
12 12
12 1
control flow
window-sliding free -Error
aWa
WS
aWS
19Prof. Younghee Lee19
ARQ performance:Sliding-window ARQ W=1: stop and wait W=7: many case W=127: high speed WANs
20Prof. Younghee Lee20
Selective-reject ARQ
12 12
)1(
12 1
11
aWa
PWS
aWPS
PN x
ARQ performance:Sliding-window ARQ
21Prof. Younghee Lee21
ARQ performance:Sliding-window ARQ Go-back-N ARQ
12 )1)(12(
)1(
12 21
1
)12(for and ),12(for )12( toequalely approximat is
1
1
11)1()1()1(
tedretransmit be toframes ofnumber : )1()1(1)f(
times. ed transmittbemust frame original theif
ed transmittframes ofnumber total theis )f( here w)1()f(
y]succesfull frame one transmit toframes ed transmittofE[number
1
1
1
1
1
1
aWWPPa
PWS
aWaP
PS
aWWKawaK
P
KPP
P
KKPiPKPPKN
KKiKKii
i
iPPi
N
i
i
i
ix
i
i
x
22Prof. Younghee Lee22
ARQ performance:Sliding-window ARQ
23Prof. Younghee Lee23
ARQ performance:Sliding-window ARQ
24Prof. Younghee Lee24
Parity Checking
Single Bit Parity:Detect single bit errors
Two Dimensional Bit Parity:Detect and correct single bit errors
0 0
25Prof. Younghee Lee25
Cyclic Redundancy Check Add k bits of redundant data to an n-bit message. Represent n-bit message as an n-1 degree polynomial; e.g.,
MSG=10011010 corresponds to M(x) = x7+ x4 + x3 + x1. Let k be the degree of some divisor polynomial C(x); e.g.,
C(x) = x3+ x2 + 1. Transmit polynomial P(x) that is evenly divisible by C(x), and
receive polynomial P(x) + E(x); E(x)=0 implies no errors. Recipient divides (P(x) + E(x)) by C(x); the remainder will be
zero in only two cases: E(x) was zero (i.e. there was no error), or E(x) is exactly divisible by C(x). Choose C(x) to make second case extremely rare.
26Prof. Younghee Lee26
Cyclic Redundancy Check Sender:
– multiply M(x) by xk; for our example, we get x10 + x7 + x6 + x4 (10011010000);
– divide result by C(x) (1101);
– Send 10011010000 - 101 = 10011010101, since this must be exactly divisible by C(x);
– Modulo 2 arithmetic without carries or borrows» Coefficient are restricted to be binary and the arithmetic on coefficients is performed modulo 2» (1+1)modulo2=0, (0-1)modulo2=1» Exclusive OR; addition and subtraction are same
27Prof. Younghee Lee27
Cyclic Redundancy Check
Want to ensure that C(x) does not divide evenly into polynomial E(x).
All single-bit errors, as long as the xk and x0 terms have non-zero coefficients.
All double-bit errors, as long as C(x) has a factor with at least three terms.
Any odd number of errors, as long as C(x) contains the factor (x + 1).
Any burst error (i.e sequence of consecutive errored bits) for which the length of the burst is less than k bits.
Most burst errors of larger than k bits can also be detected.
28Prof. Younghee Lee28
Cyclic Redundancy Check Common polynomials for C(x):
CRC
CRC-8
CRC-10
CRC-12
CRC-16
CRC-CCITT
CRC-32
C(x)
x8+x2+x1+1
x10+x9+x5+x4+x1+1
x12+x11+x3+x2+x1+1
x16+x15+x2+1
x16+x12+x5+1
x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1
29Prof. Younghee Lee29
Comparison L2, L4 Flow control + Error control
– RTT» Delay variance
– Timeout value
Throughput– Error control at each L2’s + L4; Loss at L3 buffer– Error control only at L4;– TCP throughput in case of many loss due to intensive errors at L2?
» Satellite link, wireless link…
30Prof. Younghee Lee30
HDLC
High Level Data Link Control : ISO Service
– Connectionless service» Acknowledged service
» Unacknowledged service: most common
– Connection-oriented service
Balanced mode, unbalanced mode
31Prof. Younghee Lee31
LLC
Logical Link Control Data link layer for LAN consists of MAC & LLC Service
– Type 1: unacknowledged connectionless service» most common in LAN
– Type2: reliable connection-oriented service:» End system without TCP
– Type3: acknowledged connectionless service» The receiving node will send acknowledgments for individual frames.
No virtual circuit
32Prof. Younghee Lee32
LANs
33Prof. Younghee Lee33
Multiple Access Links and Protocols
Three types of “links”: point-to-point (single wire, e.g. PPP, SLIP) broadcast (shared wire or medium; e.g, Ethernet, Wa
velan, etc.)
switched (e.g., switched Ethernet, ATM etc)
34Prof. Younghee Lee34
Channel Partitioning MAC protocols: FDMA
FDMA: frequency division multiple access channel spectrum divided into frequency bands each station assigned fixed frequency band unused transmission time in frequency bands go idle example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle
TDM (Time Division Multiplexing): channel divided into N time slots, one per user; inefficient with low duty cycle users and at light load.
FDM (Frequency Division Multiplexing): frequency subdivided.
frequ
ency
bands time
35Prof. Younghee Lee35
Channel Partitioning (CDMA)
CDMA (Code Division Multiple Access) unique “code” assigned to each user; ie, code set partition
ing used mostly in wireless broadcast channels (cellular, satel
lite,etc) all users share same frequency, but each user has own “c
hipping” sequence (ie, code) to encode data encoded signal = (original data) X (chipping sequence) decoding: inner-product of encoded signal and chipping s
equence allows multiple users to “coexist” and transmit simultaneo
usly with minimal interference (if codes are “orthogonal”)
36Prof. Younghee Lee36
CDMA Encode/Decode
37Prof. Younghee Lee37
CDMA: two-sender interference
38Prof. Younghee Lee38
Random Access protocols
When node has packet 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 specifies:
– how to detect collisions– how to recover from collisions (e.g., via delayed
retransmissions)
Examples of random access MAC protocols:– slotted ALOHA– ALOHA– CSMA and CSMA/CD
39Prof. Younghee Lee39
Slotted Aloha
time is divided into equal size slots (= pkt trans. time) node with new arriving pkt: transmit at beginning of next
slot if collision: retransmit pkt in future slots with probability
p, until successful.
Success (S), Collision (C), Empty (E) slots
40Prof. Younghee Lee40
Slotted Aloha efficiency
Q: what is max fraction slots successful?A: Suppose N stations have packets to send
– each transmits in slot with probability p– prob. successful transmission S is:
by single node: S= p (1-p)(N-1)
by any of N nodes
S = Prob (only one transmits) = N p (1-p)(N-1)
… choosing optimum p as n -> infty ...
= 1/e = .37 as N -> infty
At best: channeluse for useful transmissions 37%of time!
41Prof. Younghee Lee41
Pure (unslotted) ALOHA
unslotted Aloha: simpler, no synchronization pkt needs transmission:
– send without awaiting for beginning of slot
collision probability increases:– pkt sent at t0 collide with other pkts sent in [t0-1, t0+1]
42Prof. Younghee Lee42
Pure Aloha (cont.)P(success by given node) = P(node transmits) .
P(no other node transmits in [p0-1, p0] .
P(no other node transmits in [p0, p0+1]
= p . (1-p)(N-1) . (1-p)(N-1)
P(success by any of N nodes) = N p . (1-p)2(N-1)
… choosing optimum p as n -> infty ...
= 1/(2e) = .18
S =
thr o
ughp
ut =
“go
odpu
t ”
(
succ
ess
r at e
)
G = offered load = Np0.5 1.0 1.5 2.0
0.1
0.2
0.3
0.4
Pure Aloha
Slotted Alohaprotocol constrainseffective channelthroughput!
43Prof. Younghee Lee43
CSMA: Carrier Sense Multiple Access)
CSMA: listen before transmit: If channel sensed idle: transmit entire pkt If channel sensed busy, defer transmission
– Persistent CSMA: retry immediately with probability p when channel becomes idle (may cause instability)
– Non-persistent CSMA: retry after random interval
human analogy: don’t interrupt others!
44Prof. Younghee Lee44
CSMA collisions
collisions can still occur:propagation delay means two nodes may not heareach other’s transmissioncollision:entire packet transmission time wasted
spatial layout of nodes
note:role of distance & propagation delay in determining collision probability
45Prof. Younghee Lee45
CSMA/CD (Collision Detection)
CSMA/CD: carrier sensing, deferral as in CSMA– collisions detected within short time– colliding transmissions aborted, reducing channel
wastage – persistent or non-persistent retransmission
collision detection: – easy in wired LANs: measure signal strengths,
compare transmitted, received signals– difficult in wireless LANs: receiver shut off while
transmitting human analogy: the polite conversationalist http://wps.aw.com/
aw_kurose_network_2/0,7240,227091-,00.html
46Prof. Younghee Lee46
CSMA/CD collision detection
47Prof. Younghee Lee47
“Taking Turns” MAC protocols
channel partitioning MAC protocols:– share channel efficiently at high load– inefficient at low load: delay in channel access, 1/N
bandwidth allocated even if only 1 active node!
Random access MAC protocols– efficient at low load: single node can fully utilize
channel– high load: collision overhead
“taking turns” protocols
look for best of both worlds!
48Prof. Younghee Lee48
“Taking Turns” MAC protocols
Polling: master node “invites”
slave nodes to transmit in turn
Request to Send, Clear to Send msgs
concerns:– polling overhead – latency– single point of failure
(master)
Token passing: control token passed from one n
ode to next sequentially. token message concerns:
– token overhead – latency– single point of failure (token)
Good thing:– Fairness control– QoS control– Throughput– Use of Fiber optic links
49Prof. Younghee Lee49
Reservation-based protocols
Distributed Polling: time divided into slots begins with N short reservation slots
– reservation slot time equal to channel end-end propagation delay
– station with message to send posts reservation– reservation seen by all stations
after reservation slots, message transmissions ordered by known
priority
50Prof. Younghee Lee50
Ethernet LAN 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
Bandwidth: 10Mbps and 100Mbps Problem: Distributed algorithm that provides fair access to a shared medium CDPD: Cellular Digital Packet Data
– Mac protocol for CDPD: Digital sense Multiple access; a variation of CSMA/CD
51Prof. Younghee Lee51
Physical Properties(Ethernet) Classical Ethernet (thick-net)
– maximum segment of 500m– transceiver taps at least 2.5m apart– connect multiple segments with repeaters– no more than 2 repeaters between any pair of nodes (1500m total)– maximum of 1024 hosts– also called 10Base5
Alternative technologies– 10Base2 (thin-net): 200m; daisy-chain configuration– 10BaseT (twisted-pair): 100m; star configuration
52Prof. Younghee Lee52
Ethernet LAN
Addresses: Unique, 48-bit unicast address assigned to each adaptor Example: 8:0:2b:e4:b1:2 Broadcast: all 1s Multicast: first bit is 1
53Prof. Younghee Lee53
LAN Addresses and ARP
32-bit IP address: network-layer address used to get datagram to destination network (recall IP
network definition)
LAN (or MAC or physical) address: used to get datagram from one interface to another
physically-connected interface (same network) 48 bit MAC address (for most LANs)
burned in the adapter ROM
54Prof. Younghee Lee54
LAN Addresses and ARP
Each adapter on LAN has unique LAN address
55Prof. Younghee Lee55
LAN Address (more)
MAC address allocation administered by IEEE manufacturer buys portion of MAC address space
(to assure uniqueness) Analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address MAC flat address => portability
– can move LAN card from one LAN to another IP hierarchical address NOT portable
– depends on network to which one attaches
56Prof. Younghee Lee56
ARP: Address Resolution Protocol
Each IP node (Host, Router) on LAN has ARP table
ARP Table: IP/MAC address mappings for some LAN nodes
< IP address; MAC address; TTL>
– TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min)
Question: how to determineMAC address of Bknowing B’s IP address?
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237.196.7.23
237.196.7.78
237.196.7.14
237.196.7.88
57Prof. Younghee Lee57
ARP protocol: Same LAN (network) A wants to send datagram to
B, and B’s MAC address not in A’s ARP table.
A broadcasts ARP query packet, containing B's IP address
– Dest MAC address = FF-FF-FF-FF-FF-FF
– all machines on LAN receive ARP query
B receives ARP packet, replies to A with its (B's) MAC address– frame sent to A’s MAC
address (unicast)
A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) – soft state: information that
times out (goes away) unless refreshed
ARP is “plug-and-play”:– nodes create their ARP
tables without intervention from net administrator
58Prof. Younghee Lee58
Routing to another LANwalkthrough: send datagram from A to B via R
assume A know’s B IP address
Two ARP tables in router R, one for each IP network (LAN)
In routing table at source Host, find router 111.111.111.110 In ARP table at source, find MAC address E6-E9-00-17-BB-4B, etc
A
RB
59Prof. Younghee Lee59
A creates datagram with source A, destination B A uses ARP to get R’s MAC address for 111.111.111.110 A creates link-layer frame with R's MAC address as dest, frame contains A-to-B
IP datagram A’s adapter sends frame R’s adapter receives frame R removes IP datagram from Ethernet frame, sees its destined to B R uses ARP to get B’s MAC address R creates frame containing A-to-B IP datagram sends to B
A
RB
60Prof. Younghee Lee60
Transmitter AlgorithmIf line is idle: Send immediately Upper bound message size of 1500 bytes Must wait 51s between back-to-back framesIf line is busy: Wait until idle and transmit immediately Called 1-persistent (special case of p-persistent)If collision: jam for 512 bits, then stop transmitting frame minimum frame is 64 bytes (header + 46 bytes of data) delay and try again
– 1st time: uniformly distributed between 0 and 51.2s– 2nd time: uniformly distributed between 0 and 102.4s– 3rd time: uniformly distributed between 0 and 204.8s– give up after several tries (usually 16)– exponential backoff
61Prof. Younghee Lee61
ExperiencesObserve in Practice 10-200 hosts (not 1024) Length shorter than 1500m (RTT closer to 5 than 51) Packet length is bimodal High-level flow control and host performance limit load
Recommendations Do not overload (30% utilization is about max) Implement controllers correctly Use large packets Get the rest of the system right (broadcast, retransmission)
62Prof. Younghee Lee62
Ethernet Notation of Ethernet: <data rate> <signaling method> <Max. segment length in hundreds of meters> 10Base5: original 802.3, 50, 500M
– Max. 4 repeater => 2.5 Km 10Base-T: unshielded twisted pair
– good in the case of using prewired lines in office buildings as excess telephone cable– 100m– optical fiber link: 500m– HHUB: header hub– IHUB: intermediate hub, wiring closet on each floor
63Prof. Younghee Lee63
Hub and Switch Hub:
– Shared medium bus – Shared medium hub– Switching hub
» to achieve greater performance» throughput on the LAN in figure is
20Mbps» advantages
No change is required aggregated capacity scales easily.
» Types Store-and-forward switch: buffers
input frame, and then routes to output line
Cut-through switch: repeating the incoming frame onto the output line after recognizing the destination address at the beginning of MAC frame. Highest possible throughput but at some risk of propagating bad frames(CRC)
N x 10M
64Prof. Younghee Lee64
Hubs (more)
Each connected LAN referred to as LAN segment Hubs do not isolate collision domains: node may collide
with any node residing at any segment in LAN Hub Advantages:
– simple, inexpensive device– Multi-tier provides graceful degradation: portions of
the LAN continue to operate if one hub malfunctions– extends maximum distance between node pairs
(100m per Hub)
65Prof. Younghee Lee65
Hub limitations
single collision domain results in no increase in max throughput– multi-tier throughput same as single segment
throughput individual LAN restrictions pose limits on number of
nodes in same collision domain and on total allowed geographical coverage
cannot connect different Ethernet types (e.g., 10BaseT and 100baseT)
66Prof. Younghee Lee66
IEEE 802.11 Wireless LAN wireless LANs: untethered (often mobile) networ
king IEEE 802.11 standard:
– MAC protocol– unlicensed frequency spectrum: 900Mhz, 2.4Ghz
Basic Service Set (BSS) (a.k.a. “cell”) contains:– wireless hosts– access point (AP): base statio
n BSS’s combined to form distribu
tion system (DS)
67Prof. Younghee Lee67
Characteristics of selected wireless link standards
384 Kbps384 Kbps
56 Kbps56 Kbps
54 Mbps54 Mbps
5-11 Mbps5-11 Mbps
1 Mbps1 Mbps
802.15
802.11b
802.11{a,g}
IS-95 CDMA, GSM
UMTS/WCDMA, CDMA2000
.11 p-to-p link
2G
3G
Indoor
10 – 30m
Outdoor
50 – 200m
Mid rangeoutdoor
200m – 4Km
Long rangeoutdoor
5Km – 20Km
68Prof. Younghee Lee68
MAC MAC Problems in wireless network: to use CSMA/CD
– Collision Detection(CD) does not work– CS might not work in some case( if a terminal is “hidden”)
Hidden terminal problem– Nodes A and C cannot hear each other
» Node A : currently transmitting to B» Node C : wants to transmit to B» Transmissions by nodes A and C can collide at node B
• Nodes A and C are hidden from each other
A B C
69Prof. Younghee Lee69
MAC Exposed terminal problem
– Node C cannot send to D due to carrier of B sense » Node B : currently transmitting to A» Node C : wants to transmit to D» Carrier of C doesn’t interfere A’s reception, Carrier of B doesn’t interfere D’s
reception Waiting is not necessary
» But C is waiting since it sense carrier of B
– C is exposed to B
A B C D
70Prof. Younghee Lee70
IEEE 802.11 Wireless LAN
802.11b– 2.4-5 GHz unlicensed
radio spectrum– up to 11 Mbps– direct sequence spread
spectrum (DSSS) in physical layer
» all hosts use same chipping code
– widely deployed, using base stations
802.11a – 5-6 GHz range– up to 54 Mbps
802.11g – 2.4-5 GHz range– up to 54 Mbps
All use CSMA/CA for multiple access
All have base-station and ad-hoc network versions
71Prof. Younghee Lee71
802.11 LAN architecture
wireless host communicates with base station– base station = access poi
nt (AP) Basic Service Set (BSS) (aka
“cell”) in infrastructure mode contains:– wireless hosts– access point (AP): base st
ation– ad hoc mode: hosts only
BSS 1
BSS 2
Internet
hub, switchor routerAP
AP
72Prof. Younghee Lee72
802.11: Channels, association 802.11b: 2.4GHz-2.485GHz spectrum divided into 11 channels at
different frequencies; 3 non-overlapping– AP admin chooses frequency for AP– interference possible: channel can be same as that chosen by
neighboring AP!
host: must associate with an AP– scans channels, listening for beacon frames containing AP’s
name (SSID) and MAC address– selects AP to associate with; initiates association protocol– may perform authentication [Chapter 8]– will typically run DHCP to get IP address in AP’s subnet
73Prof. Younghee Lee73
IEEE 802.11: multiple access Like Ethernet, uses CSMA:
– random access– carrier sense: don’t collide with ongoing transmission
Unlike Ethernet:– no collision detection – transmit all frames to completion– acknowledgment – because without collision detection, you don’
t know if your transmission collided or not
Why no collision detection?– difficult to receive (sense collisions) when transmitting due to we
ak received signals (fading)– can’t sense all collisions in any case: hidden terminal, fading
Goal: avoid collisions: CSMA/C(ollision)A(voidance)
74Prof. Younghee Lee74
MAC IFS: interframe space: depend on the type of frame to transmit
– SIFS: Short IFS» High priority frame before contending for channel» ACK frame, CTS frame, data transfer of a segmented MSDU, frames from station that are responding to a poll
from an AP, any frame from an AP during CFP
– PIFS: PCF-IFS» Used by PCF to gain priority access to the medium at the start of a CFP(Contention Free Period)
– DIFS: DCF-IFS» Used by the DCF to transmit data and management MPDU
DCF : CSMA/CA– Initial MAC PDU: medium idle for a period DIFS or greater -> transmit
» Medium busy -> wait random backoff time to schedule a reattempt
– Reattempt: decrement a counter each time an idle contention slot transpire – After successful frame transmission -> backoff procedure to transmit next frame
Busy Medium SIFS
PIFS
DIFSContentionWIndow
Next
Frame
75Prof. Younghee Lee75
IEEE 802.11 MAC Protocol: CSMA/CA
802.11 sender
1 if sense channel idle for DIFS then
- transmit entire frame (no CD)
2 if sense channel busy then
- start random backoff time
- timer counts down while channel idle
- transmit when timer expires
- if no ACK, increase random backoff interval, repeat 2
802.11 receiverif frame received OK
- return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
76Prof. Younghee Lee76
RTS/CTS
idea: allow sender to “reserve” channel rather than random access of data frames: avoid collisions of long data frames
optional; not typically used sender first transmits small request-to-send (RTS) packets to A
P using CSMA– RTSs may still collide with each other (but they’re short)
AP broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes
– sender transmits data frame– other stations defer transmissions
Avoid data frame collisions completely using small reservation packets!
77Prof. Younghee Lee77
Collision Avoidance: RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
78Prof. Younghee Lee78
hub or switch
AP 2
AP 1
H1 BBS 2
BBS 1
802.11: mobility within same subnet
router
H1 remains in same IP subnet: IP address can remain same
switch: which AP is associated with H1?– self-learning (Ch. 5):
switch will see frame from H1 and “remember” which switch port can be used to reach H1
79Prof. Younghee Lee79
Mradius ofcoverage
S
SS
P
P
P
P
M
S
Master device
Slave device
Parked device (inactive)P
802.15: personal area network
less than 10 m diameter replacement for cables
(mouse, keyboard, headphones)
ad hoc: no infrastructure master/slaves:
– slaves request permission to send (to master)
– master grants requests
802.15: evolved from Bluetooth specification– 2.4-2.5 GHz radio band– up to 721 kbps
80Prof. Younghee Lee80
Mobile Switching
Center
Public telephonenetwork, andInternet
Mobile Switching
Center
Components of cellular network architecture
connects cells to wide area net manages call setup (more later!) handles mobility (more later!)
MSC
covers geographical region base station (BS) analogous to 802.11 AP mobile users attach to network through BS air-interface: physical and link layer protocol between mobile and BS
cell
wired network
81Prof. Younghee Lee81
Cellular networks: the first hop
Two techniques for sharing mobile-to-BS radio spectrum
combined FDMA/TDMA: divide spectrum in frequency channels, divide each channel into time slots
CDMA: code division multiple access frequency
bands
time slots
82Prof. Younghee Lee82
Cellular standards: brief survey
2G systems: voice channels IS-136 TDMA: combined FDMA/TDMA (north america) GSM (global system for mobile communications): combi
ned FDMA/TDMA – most widely deployed
IS-95 CDMA: code division multiple access
IS-136 GSM IS-95GPRS EDGECDMA-2000
UMTS
TDMA/FDMADon’t drown in a bowlof alphabet soup: use thisoor reference only
83Prof. Younghee Lee83
Cellular standards: brief survey
2.5 G systems: voice and data channels for those who can’t wait for 3G service: 2G extensions general packet radio service (GPRS)
– evolved from GSM – data sent on multiple channels (if available)
enhanced data rates for global evolution (EDGE)– also evolved from GSM, using enhanced modulation – Date rates up to 384K
CDMA-2000 (phase 1)– data rates up to 144K– evolved from IS-95
84Prof. Younghee Lee84
Cellular standards: brief survey
3G systems: voice/data Universal Mobile Telecommunications Service (UMTS)
– GSM next step, but using CDMA CDMA-2000
….. more (and more interesting) cellular topics due to mobility (stay tuned for details)
85Prof. Younghee Lee85
Ad Hoc Networks
Ad hoc network: IEEE 802.11 stations can dynamically form network without AP
Applications:– “laptop” meeting in conference room, car– interconnection of “personal” devices– battlefield
IETF MANET (Mobile Ad hoc Networks) working group
86Prof. Younghee Lee86
Bridges
Link Layer devices: operate on Ethernet frames, examining frame header and selectively forwarding frame based on its destination
Bridge isolates collision domains since it buffers frames
When frame is to be forwarded on segment, bridge uses CSMA/CD to access segment and transmit
87Prof. Younghee Lee87
Bridges (more)
Bridge advantages:– Isolates collision domains resulting in higher total
max throughput, and does not limit the number of nodes nor geographical coverage
– Can connect different type Ethernet since it is a store and forward device
– Transparent: no need for any change to hosts LAN adapters
88Prof. Younghee Lee88
Bridges: frame filtering, forwarding
bridges filter packets – same-LAN -segment frames not forwarded onto other
LAN segments
forwarding: – how to know which LAN segment on which to forward
frame?– looks like a routing problem (more shortly!)
89Prof. Younghee Lee89
Backbone Bridge
90Prof. Younghee Lee90
Interconnection Without Backbone
Not recommended for two reasons:- single point of failure at Computer Science hub- all traffic between EE and SE must path over CS segment
91Prof. Younghee Lee91
Bridge Filtering
bridges learn which hosts can be reached through which interfaces: maintain filtering tables– when frame received, bridge “learns” location of
sender: incoming LAN segment– records sender location in filtering table
filtering table entry: – (Node LAN Address, Bridge Interface, Time Stamp)– stale entries in Filtering Table dropped (TTL can be 60
minutes)
92Prof. Younghee Lee92
Bridge Learning: example
Suppose C sends frame to D and D replies back with frame to C
C sends frame, bridge has no info about D, so floods to both LANs
– bridge notes that C is on port 1 – frame ignored on upper LAN – frame received by D
93Prof. Younghee Lee93
Bridge Learning: example
D generates reply to C, sends – bridge sees frame from D – bridge notes that D is on interface 2 – bridge knows C on interface 1, so selectively
forwards frame out via interface 1
94Prof. Younghee Lee94
Bridges vs. Routers both store-and-forward devices
– routers: network layer devices (examine network layer headers)– bridges are Link Layer devices
routers maintain routing tables, implement routing algorithms bridges maintain filtering tables, implement filtering, learning
and spanning tree algorithms
95Prof. Younghee Lee95
Routers vs. Bridges
Bridges + and -
+ Bridge operation is simpler requiring less processing bandwidth
- Topologies are restricted with bridges: a spanning tree must be built to avoid cycles
- Bridges do not offer protection from broadcast storms (endless broadcasting by a host will be forwarded by a bridge)
96Prof. Younghee Lee96
Routers vs. Bridges
Routers + and -
+ arbitrary topologies can be supported, cycling is limited by TTL counters (and good routing protocols)
+ provide firewall protection against broadcast storms
- require IP address configuration (not plug and play)
- require higher processing bandwidth bridges do well in small (few hundred hosts) while
routers used in large networks (thousands of hosts)
97Prof. Younghee Lee97
High Speed LANs Most important high speed LANs
– Fast Ethernet and Gigabit Ethernet– ATM LAN
98Prof. Younghee Lee98
Fast Ethernet 100BASE-T 100BASE-X: two physical links between nodes, one for reception and one for transmission 100BASE-T4: the use of four twisted pair lines making use of 3 pairs in one direction at a time
– category 3: voice grade UTP, standard telephone wire, – category 5: more tightly twisted for higher quality
99Prof. Younghee Lee99
Fast Ethernet 100BASE-X:
– unidirectional data rate of 100Mbps, 4B/5B-NRZI 100BASE-T4
– 3 separate data streams, each with data rate of 33 Mbps Configuration and Operation
– star-wire topology– the repeater: responsible for detecting collisions rather than the attached stations
» A valid signal appearing on any single input is repeated on all output link» If 2 inputs occur at the same time, a jam signal is transmitted on all links
Full- duplex Operation: traditional Ethernet is half duplex– theoretical transfer rate would become 200 Mbps– attached stations must have full-duplex rather than half duplex adapter card– central point in the star can be a switched hub
» each station constitutes a separate collision domain» no collision» continue to execute the CSMA/CD algorithm for compatibility
100Prof. Younghee Lee100
Fast Ethernet Collision domain: used to define a single CSMA/CD network The bridge operates in a store-and-forward fashion 2 types of Repeater
– Class I repeater: 100BASE-T4, 100BASE-TX, used in a collision domain» Increased internal delay to handle the conversion from one signaling scheme to
another(the term signaling here has different meaning with previous lesson)– Class II repeater is limited to a single media type,
» there may be two Class II repeaters used in a single collision domain
101Prof. Younghee Lee101
Fast Ethernet Mixed Configuration
– readily supports a mixture of existing 10-Mbps LANs and newer 100-Mbps LANs
3
1
102Prof. Younghee Lee102
Gigabit Ethernet Gigabit Ethernet
– compatible with 100Base-T, 10Base-T– use of optical fiber over relatively short distance, although UTP,
STP, and coaxial cable configurations are also allowed.
103Prof. Younghee Lee103
Gigabit Ethernet Application of Gigabit Ether
net
Discussion: ATM LAN vs Gigabit Ethernet
104Prof. Younghee Lee104
Gbit Ethernet
uses standard Ethernet frame format allows for point-to-point links and shared broadcast chan
nels in shared mode, CSMA/CD is used; short distances bet
ween nodes required for efficiency uses hubs, called here “Buffered Distributors” Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now !
105Prof. Younghee Lee105
ATM LANs Typical requirements for a third generation LAN
– support multiple, guaranteed classes of services– provide scalable throughput– facilitate the internetworking between LAN and WAN technology
ATM ideally suited to these requirements The Internet: connectionless, ATM: connection oriented possible types of ATM LANs:
– Gateway to ATM WAN– Backbone ATM switch: interconnect other LANs– Workgroup ATM: high performance MM WSs, connect directly to switch
106Prof. Younghee Lee106
ATM LANs Need perform some sort of protocol conversion from the MAC
protocol to the ATM cell stream
107Prof. Younghee Lee107
Metropolitan Ethernet Ethernet services for metro transport network Carrier-class Ethernet-based transport technologies
Metro Ethernet Forum(MEF)– Forum to accelerate the adoption of optical Ethernet as the technology of choice in metro network world wide– Move beyond LAN origin to become a full duplex, switched technology capable of meeting the long-range transport, bandwidth, geographical and capacity requirements of metro networking
» A compelling combination of speed, scalability, operational simplicity, and economics
– Deliverables» Implementation agreements, Test procedure, positioning statements, technical specifications, Marketing
– Services» Ethernet virtual private line service(EVPLS), Ethernet virtual private LAN services(EVPLns) and Circuit emulation services(CES)
108Prof. Younghee Lee108
Metropolitan Ethernet IEEE 802.3 Ethernet in the First Mile(EFM)
– The optimal subscriber access network» For faster, simpler, better and more profitable
– Point to point on fiber(P2P), Point to multipoint fiber(EPON), Point to point copper(Copper)
– Provide a family of physical layer specifications– OAM– To expand the application of Ethernet to include subscriber access
networks in order to provide a significant increase in performance while maintaining equipment, operation, and maintenance cost
109Prof. Younghee Lee109
ATM LANs ATM hub includes a number of ports that operate at different
data rates and use different protocols pure ATM LAN?
110Prof. Younghee Lee110
ATM LANs: LANE Need Connectionless service for TCP/IP software implementation over a connection-oriented ATM
network– connectionless server approach
» Every host initially sets up a connection to this server
– ATM LAN emulation» Every hosts has a ATM virtual circuit to every other host» These VC can be established and released dynamically as needed or can be permanent virtual circuit» LES(LAN Emulation Server): ATM ARP server» BUS(Broadcast/Unknown server): broadcasting, multicasting
111Prof. Younghee Lee111
High Speed LANs Token Ring MAN:
– DQDB(802.6): Distributed Queue Dual Bus» high speed broadcast bus» slotted access
FDDI II: packet/circuit switched traffic FFOL: FDDI Follow - on LAN
– scalable beyond one Gbps– support cell-based ATM traffic– connect to SONET/SDH link
S-NET, Expressnet, Datakit HIPPI: High Performance Parallel Interface FC: Fiber Channel Broadband LAN, Baseband LAN, data PABX 100VG-AnyLAN: IEEE 802.12
– demand priority: » hub polls each computer in turn» computer transmit only when the hub grants» support a simple priority scheme» support frame format other than Ethernet