ece544: communication networks-ii spring 2015 d. raychaudhuri lecture ii includes teaching materials...
TRANSCRIPT
ECE544 Communication Networks-II Spring 2015
D Raychaudhuri
Lecture II
Includes teaching materials from L Peterson J Kurose
Todayrsquos Lecturebull Recap of network architecture amp
top-down designndash architecture paper discussion
bull Shared media (MAC) protocolsndash Ethernetndash Token ringndash IEEE 80211
Link Layer Introductionbull Some terminology
ndash hubrepeater (layer 1) bridgeLAN switch (layer 2) router (layer 3) host (layers 1-3 + app)
ndash Links are communication channels that connect adjacent nodes along communication path (point-to-point shared wired wireless)
ndash Layer-2 frame encapsulates payloaddatagramIP packetservice unit
RouterSwitch
Link
Host
Link
LAN 1LAN 2
Switch
Link
Host
Link Layer Servicesbull Data-link layer transfer datagram from
one node to adjacent node over a linkndash Framing encapsulate datagram into frame
adding header trailer bull Identify what set of bits constitute a frame that is
determining the beginning and the end of a framendash channel access if shared medium
bull MAC addresses used in frame headers to identify source destination
bull different from IP addressndash Reliable delivery between adjacent nodes
bull Error detection bull Error recovery forward error correction code
retransmission (ARQ)
Link Layer Communicationbull Link layer implemented in adaptor (NIC) and driver (Ethernet
card WLAN card)bull Sending side encapsulates higher layer payload in a frame
adds error checking bits flow control etcbull Receiving side error detection flow control extracts payload
passes to the receiving node
CPU
Cache
Memory
Control status register
Bus interface
Linkinterface
Host
NIC
IObus
Network
Datagram
Frame
Adaptor
Sendingnode
Datagram
Frame
Adaptor
Recvnode
Link layer protocol
Layer 2 vs Layer 3
bull Layer 2 switchingndash Based on MAC
addressndash Self configuring and
plug amp playndash Transparent to
protocols above the MAC layer
ndash Fast and inexpensivendash Does not limit the
scope of broadcasts ndash Does not scale to
extremely large networks
bull Layer 3 routingndash Based on IP addressndash Must get IP address
(DHCP or manual assign)
ndash Easily connect LANs that uses different link protocols
ndash Scalable to large network by subnet routing
ndash Broadcast limited only in a subnet
bull Link Layer Techniquesndash Encoding (more Physical Layer stuff)ndash Framing amp PPP Protocolndash Error Detection amp Correction ndash ARQ
bull Self study topics (see Ch2 amp slides)
Binary Encoding
bull Binary Encoding turn the binary data (bits) into signals to transmit on cable or optical fiber link (physical layer stuff but better to know)
bull Baseband not modulate to high frequencybull Nonreturn To Zero (NRZ) 1=high signal 0=low
signalndash May stay on high or low signal too long for a long
strings of consecutive 1s or 0s =gt baseline wander clock recovery problems
bull Nonreturn to Zero Inverted (NRZI) 1 = signal transition (low to high or high to low) 0=no changendash Solve the problem of consecutive 1s but not
consecutive 0s
Manchester Encoding bull Manchester Encoding NRZ_encode data XOR clock
ndash Clock cycle (a lowhigh pair) = 2 x signal intervalndash Baud rate (the signal change rate) = 2 x bitratendash 0 =high-to-low transition 1 = low-to-high transitionndash Clock recovery
bull Variation Differential Manchesterndash 1 = the first half of the signal equal to the last half of the previous
bitrsquos signalndash 0 = the first half of the signal opposite to the last half of the
previous bitrsquos signal
1 1101 0000 11 0Bits
NRZ
Clock
Manchester
NRZI
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Todayrsquos Lecturebull Recap of network architecture amp
top-down designndash architecture paper discussion
bull Shared media (MAC) protocolsndash Ethernetndash Token ringndash IEEE 80211
Link Layer Introductionbull Some terminology
ndash hubrepeater (layer 1) bridgeLAN switch (layer 2) router (layer 3) host (layers 1-3 + app)
ndash Links are communication channels that connect adjacent nodes along communication path (point-to-point shared wired wireless)
ndash Layer-2 frame encapsulates payloaddatagramIP packetservice unit
RouterSwitch
Link
Host
Link
LAN 1LAN 2
Switch
Link
Host
Link Layer Servicesbull Data-link layer transfer datagram from
one node to adjacent node over a linkndash Framing encapsulate datagram into frame
adding header trailer bull Identify what set of bits constitute a frame that is
determining the beginning and the end of a framendash channel access if shared medium
bull MAC addresses used in frame headers to identify source destination
bull different from IP addressndash Reliable delivery between adjacent nodes
bull Error detection bull Error recovery forward error correction code
retransmission (ARQ)
Link Layer Communicationbull Link layer implemented in adaptor (NIC) and driver (Ethernet
card WLAN card)bull Sending side encapsulates higher layer payload in a frame
adds error checking bits flow control etcbull Receiving side error detection flow control extracts payload
passes to the receiving node
CPU
Cache
Memory
Control status register
Bus interface
Linkinterface
Host
NIC
IObus
Network
Datagram
Frame
Adaptor
Sendingnode
Datagram
Frame
Adaptor
Recvnode
Link layer protocol
Layer 2 vs Layer 3
bull Layer 2 switchingndash Based on MAC
addressndash Self configuring and
plug amp playndash Transparent to
protocols above the MAC layer
ndash Fast and inexpensivendash Does not limit the
scope of broadcasts ndash Does not scale to
extremely large networks
bull Layer 3 routingndash Based on IP addressndash Must get IP address
(DHCP or manual assign)
ndash Easily connect LANs that uses different link protocols
ndash Scalable to large network by subnet routing
ndash Broadcast limited only in a subnet
bull Link Layer Techniquesndash Encoding (more Physical Layer stuff)ndash Framing amp PPP Protocolndash Error Detection amp Correction ndash ARQ
bull Self study topics (see Ch2 amp slides)
Binary Encoding
bull Binary Encoding turn the binary data (bits) into signals to transmit on cable or optical fiber link (physical layer stuff but better to know)
bull Baseband not modulate to high frequencybull Nonreturn To Zero (NRZ) 1=high signal 0=low
signalndash May stay on high or low signal too long for a long
strings of consecutive 1s or 0s =gt baseline wander clock recovery problems
bull Nonreturn to Zero Inverted (NRZI) 1 = signal transition (low to high or high to low) 0=no changendash Solve the problem of consecutive 1s but not
consecutive 0s
Manchester Encoding bull Manchester Encoding NRZ_encode data XOR clock
ndash Clock cycle (a lowhigh pair) = 2 x signal intervalndash Baud rate (the signal change rate) = 2 x bitratendash 0 =high-to-low transition 1 = low-to-high transitionndash Clock recovery
bull Variation Differential Manchesterndash 1 = the first half of the signal equal to the last half of the previous
bitrsquos signalndash 0 = the first half of the signal opposite to the last half of the
previous bitrsquos signal
1 1101 0000 11 0Bits
NRZ
Clock
Manchester
NRZI
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Link Layer Introductionbull Some terminology
ndash hubrepeater (layer 1) bridgeLAN switch (layer 2) router (layer 3) host (layers 1-3 + app)
ndash Links are communication channels that connect adjacent nodes along communication path (point-to-point shared wired wireless)
ndash Layer-2 frame encapsulates payloaddatagramIP packetservice unit
RouterSwitch
Link
Host
Link
LAN 1LAN 2
Switch
Link
Host
Link Layer Servicesbull Data-link layer transfer datagram from
one node to adjacent node over a linkndash Framing encapsulate datagram into frame
adding header trailer bull Identify what set of bits constitute a frame that is
determining the beginning and the end of a framendash channel access if shared medium
bull MAC addresses used in frame headers to identify source destination
bull different from IP addressndash Reliable delivery between adjacent nodes
bull Error detection bull Error recovery forward error correction code
retransmission (ARQ)
Link Layer Communicationbull Link layer implemented in adaptor (NIC) and driver (Ethernet
card WLAN card)bull Sending side encapsulates higher layer payload in a frame
adds error checking bits flow control etcbull Receiving side error detection flow control extracts payload
passes to the receiving node
CPU
Cache
Memory
Control status register
Bus interface
Linkinterface
Host
NIC
IObus
Network
Datagram
Frame
Adaptor
Sendingnode
Datagram
Frame
Adaptor
Recvnode
Link layer protocol
Layer 2 vs Layer 3
bull Layer 2 switchingndash Based on MAC
addressndash Self configuring and
plug amp playndash Transparent to
protocols above the MAC layer
ndash Fast and inexpensivendash Does not limit the
scope of broadcasts ndash Does not scale to
extremely large networks
bull Layer 3 routingndash Based on IP addressndash Must get IP address
(DHCP or manual assign)
ndash Easily connect LANs that uses different link protocols
ndash Scalable to large network by subnet routing
ndash Broadcast limited only in a subnet
bull Link Layer Techniquesndash Encoding (more Physical Layer stuff)ndash Framing amp PPP Protocolndash Error Detection amp Correction ndash ARQ
bull Self study topics (see Ch2 amp slides)
Binary Encoding
bull Binary Encoding turn the binary data (bits) into signals to transmit on cable or optical fiber link (physical layer stuff but better to know)
bull Baseband not modulate to high frequencybull Nonreturn To Zero (NRZ) 1=high signal 0=low
signalndash May stay on high or low signal too long for a long
strings of consecutive 1s or 0s =gt baseline wander clock recovery problems
bull Nonreturn to Zero Inverted (NRZI) 1 = signal transition (low to high or high to low) 0=no changendash Solve the problem of consecutive 1s but not
consecutive 0s
Manchester Encoding bull Manchester Encoding NRZ_encode data XOR clock
ndash Clock cycle (a lowhigh pair) = 2 x signal intervalndash Baud rate (the signal change rate) = 2 x bitratendash 0 =high-to-low transition 1 = low-to-high transitionndash Clock recovery
bull Variation Differential Manchesterndash 1 = the first half of the signal equal to the last half of the previous
bitrsquos signalndash 0 = the first half of the signal opposite to the last half of the
previous bitrsquos signal
1 1101 0000 11 0Bits
NRZ
Clock
Manchester
NRZI
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Link Layer Servicesbull Data-link layer transfer datagram from
one node to adjacent node over a linkndash Framing encapsulate datagram into frame
adding header trailer bull Identify what set of bits constitute a frame that is
determining the beginning and the end of a framendash channel access if shared medium
bull MAC addresses used in frame headers to identify source destination
bull different from IP addressndash Reliable delivery between adjacent nodes
bull Error detection bull Error recovery forward error correction code
retransmission (ARQ)
Link Layer Communicationbull Link layer implemented in adaptor (NIC) and driver (Ethernet
card WLAN card)bull Sending side encapsulates higher layer payload in a frame
adds error checking bits flow control etcbull Receiving side error detection flow control extracts payload
passes to the receiving node
CPU
Cache
Memory
Control status register
Bus interface
Linkinterface
Host
NIC
IObus
Network
Datagram
Frame
Adaptor
Sendingnode
Datagram
Frame
Adaptor
Recvnode
Link layer protocol
Layer 2 vs Layer 3
bull Layer 2 switchingndash Based on MAC
addressndash Self configuring and
plug amp playndash Transparent to
protocols above the MAC layer
ndash Fast and inexpensivendash Does not limit the
scope of broadcasts ndash Does not scale to
extremely large networks
bull Layer 3 routingndash Based on IP addressndash Must get IP address
(DHCP or manual assign)
ndash Easily connect LANs that uses different link protocols
ndash Scalable to large network by subnet routing
ndash Broadcast limited only in a subnet
bull Link Layer Techniquesndash Encoding (more Physical Layer stuff)ndash Framing amp PPP Protocolndash Error Detection amp Correction ndash ARQ
bull Self study topics (see Ch2 amp slides)
Binary Encoding
bull Binary Encoding turn the binary data (bits) into signals to transmit on cable or optical fiber link (physical layer stuff but better to know)
bull Baseband not modulate to high frequencybull Nonreturn To Zero (NRZ) 1=high signal 0=low
signalndash May stay on high or low signal too long for a long
strings of consecutive 1s or 0s =gt baseline wander clock recovery problems
bull Nonreturn to Zero Inverted (NRZI) 1 = signal transition (low to high or high to low) 0=no changendash Solve the problem of consecutive 1s but not
consecutive 0s
Manchester Encoding bull Manchester Encoding NRZ_encode data XOR clock
ndash Clock cycle (a lowhigh pair) = 2 x signal intervalndash Baud rate (the signal change rate) = 2 x bitratendash 0 =high-to-low transition 1 = low-to-high transitionndash Clock recovery
bull Variation Differential Manchesterndash 1 = the first half of the signal equal to the last half of the previous
bitrsquos signalndash 0 = the first half of the signal opposite to the last half of the
previous bitrsquos signal
1 1101 0000 11 0Bits
NRZ
Clock
Manchester
NRZI
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Link Layer Communicationbull Link layer implemented in adaptor (NIC) and driver (Ethernet
card WLAN card)bull Sending side encapsulates higher layer payload in a frame
adds error checking bits flow control etcbull Receiving side error detection flow control extracts payload
passes to the receiving node
CPU
Cache
Memory
Control status register
Bus interface
Linkinterface
Host
NIC
IObus
Network
Datagram
Frame
Adaptor
Sendingnode
Datagram
Frame
Adaptor
Recvnode
Link layer protocol
Layer 2 vs Layer 3
bull Layer 2 switchingndash Based on MAC
addressndash Self configuring and
plug amp playndash Transparent to
protocols above the MAC layer
ndash Fast and inexpensivendash Does not limit the
scope of broadcasts ndash Does not scale to
extremely large networks
bull Layer 3 routingndash Based on IP addressndash Must get IP address
(DHCP or manual assign)
ndash Easily connect LANs that uses different link protocols
ndash Scalable to large network by subnet routing
ndash Broadcast limited only in a subnet
bull Link Layer Techniquesndash Encoding (more Physical Layer stuff)ndash Framing amp PPP Protocolndash Error Detection amp Correction ndash ARQ
bull Self study topics (see Ch2 amp slides)
Binary Encoding
bull Binary Encoding turn the binary data (bits) into signals to transmit on cable or optical fiber link (physical layer stuff but better to know)
bull Baseband not modulate to high frequencybull Nonreturn To Zero (NRZ) 1=high signal 0=low
signalndash May stay on high or low signal too long for a long
strings of consecutive 1s or 0s =gt baseline wander clock recovery problems
bull Nonreturn to Zero Inverted (NRZI) 1 = signal transition (low to high or high to low) 0=no changendash Solve the problem of consecutive 1s but not
consecutive 0s
Manchester Encoding bull Manchester Encoding NRZ_encode data XOR clock
ndash Clock cycle (a lowhigh pair) = 2 x signal intervalndash Baud rate (the signal change rate) = 2 x bitratendash 0 =high-to-low transition 1 = low-to-high transitionndash Clock recovery
bull Variation Differential Manchesterndash 1 = the first half of the signal equal to the last half of the previous
bitrsquos signalndash 0 = the first half of the signal opposite to the last half of the
previous bitrsquos signal
1 1101 0000 11 0Bits
NRZ
Clock
Manchester
NRZI
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Layer 2 vs Layer 3
bull Layer 2 switchingndash Based on MAC
addressndash Self configuring and
plug amp playndash Transparent to
protocols above the MAC layer
ndash Fast and inexpensivendash Does not limit the
scope of broadcasts ndash Does not scale to
extremely large networks
bull Layer 3 routingndash Based on IP addressndash Must get IP address
(DHCP or manual assign)
ndash Easily connect LANs that uses different link protocols
ndash Scalable to large network by subnet routing
ndash Broadcast limited only in a subnet
bull Link Layer Techniquesndash Encoding (more Physical Layer stuff)ndash Framing amp PPP Protocolndash Error Detection amp Correction ndash ARQ
bull Self study topics (see Ch2 amp slides)
Binary Encoding
bull Binary Encoding turn the binary data (bits) into signals to transmit on cable or optical fiber link (physical layer stuff but better to know)
bull Baseband not modulate to high frequencybull Nonreturn To Zero (NRZ) 1=high signal 0=low
signalndash May stay on high or low signal too long for a long
strings of consecutive 1s or 0s =gt baseline wander clock recovery problems
bull Nonreturn to Zero Inverted (NRZI) 1 = signal transition (low to high or high to low) 0=no changendash Solve the problem of consecutive 1s but not
consecutive 0s
Manchester Encoding bull Manchester Encoding NRZ_encode data XOR clock
ndash Clock cycle (a lowhigh pair) = 2 x signal intervalndash Baud rate (the signal change rate) = 2 x bitratendash 0 =high-to-low transition 1 = low-to-high transitionndash Clock recovery
bull Variation Differential Manchesterndash 1 = the first half of the signal equal to the last half of the previous
bitrsquos signalndash 0 = the first half of the signal opposite to the last half of the
previous bitrsquos signal
1 1101 0000 11 0Bits
NRZ
Clock
Manchester
NRZI
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
bull Link Layer Techniquesndash Encoding (more Physical Layer stuff)ndash Framing amp PPP Protocolndash Error Detection amp Correction ndash ARQ
bull Self study topics (see Ch2 amp slides)
Binary Encoding
bull Binary Encoding turn the binary data (bits) into signals to transmit on cable or optical fiber link (physical layer stuff but better to know)
bull Baseband not modulate to high frequencybull Nonreturn To Zero (NRZ) 1=high signal 0=low
signalndash May stay on high or low signal too long for a long
strings of consecutive 1s or 0s =gt baseline wander clock recovery problems
bull Nonreturn to Zero Inverted (NRZI) 1 = signal transition (low to high or high to low) 0=no changendash Solve the problem of consecutive 1s but not
consecutive 0s
Manchester Encoding bull Manchester Encoding NRZ_encode data XOR clock
ndash Clock cycle (a lowhigh pair) = 2 x signal intervalndash Baud rate (the signal change rate) = 2 x bitratendash 0 =high-to-low transition 1 = low-to-high transitionndash Clock recovery
bull Variation Differential Manchesterndash 1 = the first half of the signal equal to the last half of the previous
bitrsquos signalndash 0 = the first half of the signal opposite to the last half of the
previous bitrsquos signal
1 1101 0000 11 0Bits
NRZ
Clock
Manchester
NRZI
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Binary Encoding
bull Binary Encoding turn the binary data (bits) into signals to transmit on cable or optical fiber link (physical layer stuff but better to know)
bull Baseband not modulate to high frequencybull Nonreturn To Zero (NRZ) 1=high signal 0=low
signalndash May stay on high or low signal too long for a long
strings of consecutive 1s or 0s =gt baseline wander clock recovery problems
bull Nonreturn to Zero Inverted (NRZI) 1 = signal transition (low to high or high to low) 0=no changendash Solve the problem of consecutive 1s but not
consecutive 0s
Manchester Encoding bull Manchester Encoding NRZ_encode data XOR clock
ndash Clock cycle (a lowhigh pair) = 2 x signal intervalndash Baud rate (the signal change rate) = 2 x bitratendash 0 =high-to-low transition 1 = low-to-high transitionndash Clock recovery
bull Variation Differential Manchesterndash 1 = the first half of the signal equal to the last half of the previous
bitrsquos signalndash 0 = the first half of the signal opposite to the last half of the
previous bitrsquos signal
1 1101 0000 11 0Bits
NRZ
Clock
Manchester
NRZI
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Manchester Encoding bull Manchester Encoding NRZ_encode data XOR clock
ndash Clock cycle (a lowhigh pair) = 2 x signal intervalndash Baud rate (the signal change rate) = 2 x bitratendash 0 =high-to-low transition 1 = low-to-high transitionndash Clock recovery
bull Variation Differential Manchesterndash 1 = the first half of the signal equal to the last half of the previous
bitrsquos signalndash 0 = the first half of the signal opposite to the last half of the
previous bitrsquos signal
1 1101 0000 11 0Bits
NRZ
Clock
Manchester
NRZI
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Point-to-Point Data Link Protocolbull Two types of links
ndash point-to-point link (easier than broadcast link)
bull one sender one receiver on the link NO Media Access Control
bull no need for explicit MAC addressingbull eg dialup link ISDN line
ndash Broadcast (shared wire or medium)
bull popular point-to-point DLC protocolsndash PPP (point-to-point protocol) byte-oriented
bull PPP for dial-up accessbull PPP over Ethernet (DSL)
ndash HDLC (High level data link control) bit-oriented
PPPModem
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
PPP Functionsbull Framing encapsulation of network-layer datagram in
data link frame ndash Identify what set of bits constitute a frame that is
determining the beginning and the end of a framebull carry data of any network layer protocol (not just IP) at
same timendash ability to demultiplex upwards
bull bit transparency must carry any bit pattern in the data field
bull error detection (no correction)bull connection liveness detect signal link failure to
network layerbull network layer address negotiation endpoint can
learnconfigure each otherrsquos network addressbull PPP
ndash no error correctionrecoveryndash no flow controlndash out of order delivery OK ndash no need to support multipoint links (eg polling)
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
PPP Data Framebull Flag delimiter (framing)bull Address bull Control bull Protocol upper layer protocol to which frame carried
(eg IP)bull Info upper layer databull Check CRC
01111110 11111111 00000011 protocol info CRC 01111110
flag
Octet 1
controladdress
1 or 21 variable 2 or 41 1
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Byte Stuff
bull ldquodata transparencyrdquorequirement data field must be allowed to include flag pattern lt01111110gtndash Q is received lt01111110gt data or flag
bull Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byte
bull Receiverndash two 01111110 bytes in a row discard first
byte continue data receptionndash single 01111110 flag byte
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
PPP Link Control Protocol (LCP)
bull Before exchanging network-layer data data link peers mustndash configure PPP link (max frame length
authentication)bull learnconfigure network
ndash layer informationndash for IP carry IP Control Protocol (IPCP)
msgs (protocol field 8021) to configurelearn IP address
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
High-Level Data Link Control (HDLC) bull Bit oriented protocol view the frame as a collection of
bits does not care byte boundariesbull Sentinel characters 01111110 transmitted as the link is
idle for synchronizationbull Bit stuffing to distinguish the data pattern 01111110 in
the body from the special ldquobeginningendrdquo sequencendash after transmitting any 5 consecutive 1s in body insert a 0ndash 011111xxxx =gt 0111110xxx
01111110 Header body CRC 01111110
Beginningsequence
Bits 8 variable 1616 8
endingsequence
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Error Detectionbull EDC= Error Detection and Correction bits (redundancy)bull D = Data protected by error checking may include header fields bull Error detection not 100 reliable
ndash protocol may miss some errors but rarelyndash larger EDC field yields better detection and correction
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Parity Checkingbull Single Bit Parity
ndash Detect single bit errors
bull Two Dimensional Bit Parityndash Detect and correct
single bit error
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Internet Checksum
Senderbull treat segment
contents as sequence of 16-bit integers
bull checksum addition (1rsquos complement sum) of segment contents and take the ones complement of the result
bull sender puts checksum value into UDP checksum field
Receiverbull compute checksum
of received segmentbull check if computed
checksum equals checksum field valuendash NO -error detectedndash YES -no error
detected But maybe errors (internet checksum not very strong for error detection but simple)
bull Goal detect ldquoerrorsrdquo (eg flipped bits) in transmitted segment (note used at transport layer)
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Cyclic Redundancy Check (CRC)
bull A (n+1)-bit message M can be represented as a polynomial of degree n For example ndash X = 10011010 ndash M(X) = X7 + X4 + X3 + X
bull Choose k+1 bit pattern (divisor) C(X) a polyn of degree k
bull goal get k CRC bits Y such thatndash P=ltMYgt exactly divisible by C (modulo 2) ndash receiver knows C divides ltMYgt by C If non-zero
remainder error detectedndash can detect all burst errors less than k+1 bits
M data bits to be sent Y CRC
n bits k bits
M x 2k XOR R
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
CRC Examplebull Goal design P(X) such that
it is exactly divisible by C(X)
bull T(X) = M(X) Xk (add k zerorsquos
to the end of the message)
])(
)([
XC
XTremainderR
bull Subtract the remainder from T(X) to get P(X)ndash P(X) is now exactly divisible by C(X)
bull Corresponding to the complete transmitted message
(Remember ndash all additionsubtract use modulo-2 arithmetic)
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Automatic Repeat reQuest(ARQ)bull Stop-and-wait ARQ
ndash Transmit a frame and wait for acknowledgendash If positive acknowledge (ACK) from receiver send next framendash If ACK does not arrive after a certain period of time (Timeout) retransmits
the framendash Simple low efficiency
bull Go-back-N ARQndash Transmit frames continuously no waitingndash The receiver only acks the highest-numbered frames received in sequencendash ACK comes back after a round-trip delayndash If timeout the sender retransmits the frames that are not acked and N-1
succeeding frames that were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
ndash Need buffer at transmitter does not have to buffer the frames at the receiver
ndash moderate efficiency and complexity Less efficient when the round-trip delay is large and data transmission rate is high
bull Selective-repeat ndash Transmit continuously no waitingndash The receiver acks all successfully received frames ndash The sender only retransmits (repeats) the unacked frames when their timers
expirendash Most efficient but most complex buffer needed at both transmitter and
receiver need per frame timer
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Sliding Window
bull Reliable delivery retransmissionbull Ordered delivery preserve the order in
which the frames are transmittedndash Receiver does not pass along (buffer) out-of-
order frames
bull Flow control feedback mechanism by which the receiver is able to throttle the senderndash Inform the sender of how much frames the
receiver has room to receive
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Sliding Window (Cont)bull Send window size (SWS) the upper bound on
the number of unacked frames that the sender can transmit ndash set according to the round-trip delay to keep the pipe
full (recall bandwidth x delay product represents the amount of data that could be in transit)
bull LAR the sequence of the last ack receivedbull LFS the sequence of the last frame sentbull Receiver window size (RWS) the upper bound on
the number of out-of-order frames that the receiver is willing to accept
bull LAF the sequence of the largest acceptable frame
bull LFR the sequence of the last frame receivedbull SeqNumToAck the largest sequence not yet
acked such that all frames with seq lt= SeqnumToAck have been received
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Sliding Window
bull LFS-LARlt=SWS LAF-LFRlt=RWSbull Finite Seq wraps around
ndash SWS lt (MaxSeqNum+1)2 when RWS=SWS to distinguish between different incarnations of the same seq
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 10 11 12
Sender
Receiver
Ack 1 Ack 2
Error
Ack 2 Ack 3Ack 2 Ack 2Ack 4 Ack 5
Ack 6
SWSLAR LFS
RWSLFR LAF
SeqNumToAck
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Shared Media Networksbull MAC (medium access control)
ndash ALOHA Slotted ALOHAndash CSMACD CSMACA ndash Token Ringndash TDMA Dynamic TDMAndash FDMA CDMA
bull LAN Technologiesndash IEEE 8023 Ethernet ndash IEEE 8025 Token Ring ndash IEEE 80211 Wireless LAN
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Medium Access Sublayerbull Medium access control
(MAC) sublayer is not relevant on point-to-point links
bull The MAC sublayer is only used in broadcast or shared mediumchannel networks
bull All communication entities ldquosharerdquo a common channelndash Wired networks Ethernet LANndash Wireless amp Mobile Networks
Satellite Cellular Wireless LAN
Application
Presentation
Session
Transport
End host
Network
Data link
Physical
LLCMAC
Physical
Subnet
IP
TCPUDP
Applications
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Media Access Protocol
bull Shared broadcast channel ndash two or more simultaneous transmissions by nodes
interference bull Collision if node receives two or more signals at the same
time
bull MAC protocolndash Determines how nodes share channel ie determine
when node can transmit
bull Ideally if broadcast channel of rate R bpsndash When one node wants to transmit it can send at rate Rndash When M nodes want to transmit each can send at
average rate RM (fairness)
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
MAC Classificationbull Channel Partitioning
ndash divide channel into smaller ldquopiecesrdquo (time slots frequency code)
ndash allocate piece to node for exclusive usebull TDMA CDMA FDMA
bull Random Accessndash channel not divided
bull When node has frame to send transmit with the total channel bandwidth
ndash No coordination between nodes control is completely distributed
ndash two or more nodes transmit simultaneously ldquocollisionrdquondash random access MAC protocol should specify
bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)bull Examples ALOHA Slotted ALOHA CSMACD CSMACA
bull ldquoTaking turnsrdquondash Nodes take turns
bull Token ringbull Hybrid
ndash Combine two or more techniques together
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Pure (Unslotted) ALOHAbull Early packet radio network created at
the U of Hawaii in 1970
bull Uplink channel (clients-gthub) and downlink channel (hub-gtclients) uses different frequencies
bull Client nodes send data frames to the central hub using the shared uplink channel
bull The hub immediately re-send the received frames allowing clients to determine whether or not their data
had been received properly bull Simplest form of random access
provides basis for more advance contention MAC
Hub
Client
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Aloha Algorithmbull Aloha Algorithm
ndash Nodes transmit immediately whenever they have a frame to send
ndash No synchronization among nodesbull If collision retransmit after random delay
ndash random delay prevents the same frames from colliding over and over again
bull collision window or ldquovulnerable periodrdquondash frame sent at t0 collides with other frames sent in [t0-
1t0+1]
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Pure Aloha efficiency
bull Assume that the aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (all nodes in network) in the time interval
bull time-interval = one frame transmission time
bull Conditional successful probability for one frame transmission attempt is
ndash P0 = P [0 other attempts in 2 time-intervals] =e-2G
bull The probability of successful transmission
ndash S = GP0 = Ge-2G
bull S is optimum at G=12
bull S=12e = 0184
k
Ge kG
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Slotted Aloha
bull Assumptionsndash all frames same sizendash time is divided into equal size
slots time to transmit 1 framendash nodes start to transmit frames
only at beginning of slotsndash nodes are synchronizedndash if 2 or more nodes transmit in
slot detect collisionndash Feedback channel about
whether packet is received or not (half-duplex)
bull Operationndash when node obtains fresh
frame it transmits at the beginning of next slot
ndash no collision node can send new frame in next slot
ndash if collision wait a random number of slots and try to send again
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Efficiency of Slotted ALOHAbull Aggregate frame arrival is Poisson Process
bull P [k arrivals in a time-interval] =
bull G the mean number of aggregate arrivals (for all nodes in network) in this interval
bull time-interval = slot (one frame transmission time)
bull Successful probability for each slot is S= P [1 attempt in a slot] =Ge-G
bull S is optimum at G=1bull S=1e = 0368(slotted aloha reduce the potential collision period from 2t to t
by node synchronization)
k
Ge kG
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Performance of ALOHA
bull Throughput versus offered traffic for ALOHA systemsbull The main reason for poor channel utilization of ALOHA (pure
or slotted) is that all stations can transmit at will without paying attention to what the other stations are doing
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Carrier Sense Multiple Access (CSMA)
bull CSMA listen before transmitndash If channel sensed idle transmit ndash If channel sensed busy defer transmission
bull Human analogy donrsquot interrupt othersbull Can collisions occur in this scheme
ndash Two nodes might attempt to transmit a frame at the same time
ndash Propagation delay means two nodes may not hear each otherrsquos transmission immediately
bull Several variants of CSMA protocolsndash Non-Persistent CSMAndash 1-Persistent CSMAndash P-Persistent CSMA
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Non-persistent CSMA
bull To send data a node first listens to the channel to see if anyone else is transmitting
bull If so the node waits a random period of time (instead of keeping sensing until the end of the transmission) and repeats the algorithm Otherwise it transmits a frame
bull If a collision occurs the node waits a random amount of time and starts all over again
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
1-persistent CSMA
Algorithm1 To send data a node first listens to the channel to see if anyone else is
transmitting 2 If so the node waits (keeps sensing it) until the channel becomes idle
Otherwise it transmits a frame 3 If a collision occurs the node waits a random amount of time and starts
all over again
It is called 1-persistent because the station transmits with a probability of 1 whenever it starts sensing the channel and finds the channel idle (Greedy)
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
P-persistent CSMAbull Assume channels are slottedbull One slot = contention period (ie one round trip
propagation delay)Algorithm1 Sense the channel
ndash If channel is idle transmit a packet with probability pbull if a packet was transmitted go to step 2bull if a packet was not transmitted wait one slot and go to
step 1ndash If channel is busy wait one slot and go to step 1ndash In other words wait until idle and then transmit with
probability p
2 Detect collisionsndash If a collision occurs wait a random amount of time and go to
step 1
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Propagation Delay
bull D only sense Arsquos transmission after a propagation delay τ
bull If τ is larger than packet transmission time too much time wasted
bull CSMA in satellite communication Nobull Distance amp propagation delay determine
collision probability
BA C D
The size (length) of the network must be limited
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
CSMA Performance Analysis
bull Assumptionsndash Constant length packetsndash No errors except those caused by
collisionsndash Collision entire packet transmission time
wastedndash Each host can sense the transmissions of
all other hostsndash The propagation delay is small compared
to the transmission time
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Analysis of Non-persistent CSMA
bull Prob of success transmission S= U x I(B+I)
bull Mean B = Y + 1 + a mean I = 1Gbull U = Ge-Ga
bull FY(y)=Pno packet occur in an duration of a-y = e-G(a-y) (CDF) )1(
1)( aGe
GaYE
Busy period
a
1YBusy periodIdle period
1a
Normalized Time
Unsuccessful transmission period
Successful transmission period
a
aG
aG
eaG
GeS
)21(
a the ratio of propagation delay to packet transmission time
bull Poisson arrival P(k arrivals in time duration t) = k
Ge ktGt
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Comparison of the channel utilization versus load for various random access protocols
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
CSMA with Collision Detection
CSMACD (Carrier Sense Multiple Access with Collision Detection) protocol further improves ALOHA by aborting transmissions as soon as a collision is detected
Operation bull To send data a node first listens to the channel to see if
anyone else is transmitting bull If not it transmits a framebull If channel busy deferral as in CSMA
ndash the node wait a random period of time and repeats the algorithm (non-persistent) or waits until the end of the transmission (1-persistent)
bull The node will detect the collision if collision detected abort its transmission (reducing channel wastage) waits a random amount of time and starts all over again
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
How to Detect Collision
bull Prerequisite A node can listen while talking
bull Easy in wired LANs measure signal strength compare Tx and Rx signals
bull Difficult in wireless LANs receiver shut off while transmitting
Tx Rx
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
CSMACAbull Wireless LANsbull How can a node detect collision if it cannot listen while
talkingbull Collision Avoidance
ndash Random Backoff (instead of 1-persistent)ndash Request-to-send (RTS)clear-to-send (CTS)
bull CS no longer works wellndash Rules
bull carrier ==gt do not transmitbull no carrier ==gt OK to transmit
ndash But the above rules do not always apply to wireless
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Problems with carrier sensing
Y
Z
W
Hidden terminal problem
W finds that medium is freeand it transmits a packet to Z
no carrier ===gt OK to transmit
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Problems with carrier sensing
Z
W
YX
Exposed terminal problem
Z is transmittingto W
Y will not transmit to Xeven though it cannot interfere
Presence of carrier ===gt hold off transmission
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Solving Hidden Node problem with RTSCTS
Y
ZX
W
RTS CTS
listen RTS ==gt transmitter is close listen CTS ==gt receiver is close
- listen RTS- wait long enough for the requested station to respond with CTS- if (timeout) then ready to transmit
- listen CTS- wait long enough for the transmitter to send its data
Note RTSCTS does not solve exposed terminal problem In the example above X can send RTS but CTS from the responder will collide with Yrsquos data
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
RTSCTS exchange example
bull RTS + CTS + Frame + ACK exchange invoked when frame size is large
bull NAV (Network Allocation Vector)ndash NAV maintains prediction of future traffic on the medium
based on duration information that is announced in RTSCTS frames prior to actual exchange of data
Transmitter
DIFS
ACK
RTS
Receiver
Frame
CTS
352 micros 10
micros
SIFS
8192 s
Other NAV (RTS)
NAV (CTS)
304micros 10
micros
10micros
304micros
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
ldquoTaking Turnsrdquo MAC protocols
Polling bull master node
ldquoinvitesrdquo slave nodes to transmit in turn
bull concernsndash polling
overhead ndash single point of
failure (master)
Token passingbull control token passed from one
node to next sequentiallybull token messagebull concerns
ndash token overhead ndash complexityndash single point of failure (token)
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
TDMAbull Time Division Multiple Access (TDMA)
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Fixed TDMA
bull access to channel in rounds bull each station gets fixed length slot (length =
packet transmission time) in each round bull unused slots go idle ndash Not efficientbull example 6-station LAN 134 have pkt slots
256 idle
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Dynamic TDMAbull In dynamic TDMA a scheduling algorithm dynamically
reserves a variable number of timeslots in each frame to variable user data streams based on the traffic demand of each user data stream
bull Negotiations (beforehand) to determine how to allocate slots dynamically
Modempreamble
TDM Downlink D-TDMA UplinkS-ALOHA
control
User B User C
TDD-TDMA Frame
Burst from User ATo Access Point
Burst from Access Point -gt Mobiles
Frame header and schedule
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
FDMAbull FDMA frequency division multiple access
ndash channel spectrum divided into frequency bandsndash each station assigned a frequency band
bull unused transmission time in frequency bands go idle if assignment fixed
ndash Inefficient =gt make it dynamically assigned to different stations based on traffic demand
ndash OFDMA
Fre
quen
cy b
ands
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Spread Spectrum and CDMAbull What if we donrsquoy not divide up the channel by time (as in
TDMA) or frequency (as in FDMA) Is collision inevitable
bull Not if collision is no longer damaging
ndash Is there any way to decode bits garbled by other overlapping frames
Code Division Multiple Access (CDMA) based on Spread Spectrum
bull Another perspective to solve multiple access problems
bull Spread Spectrum is a PHY innovation not a MAC technique
bull CDMA encodes data with a special code associated with each user and uses the constructive interference properties of the special codes to perform the multiplexing
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Spread Spectrumbull Idea
ndash spread signal over wider frequency band than required
ndash originally deigned to thwart jammingbull Frequency Hopping
ndash transmit over random sequence of frequenciesndash sender and receiver sharehellip
bull pseudorandom number generatorbull seed
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Spread Spectrum (cont)bull Direct Sequence
ndash for each bit send XOR of that bit and n random bits
ndash random sequence known to both sender and receiver
ndash called n-bit chipping code
Random sequence 0100101101011001
Data stream 1010
XOR of the two 1011101110101001
0
0
0
1
1
1
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Code Division Multiple Access (CDMA)
bull Multiplexing Technique used with spread spectrum
bull Start with data signal rate Dndash Called bit data rate
bull Break each bit into k chips according to fixed pattern specific to each userndash Userrsquos code
bull New channel has chip data rate kD chips per second
bull Eg k=6 three users (ABC) communicating with base station R
bull Code for A = lt1-1-11-11gtbull Code for B = lt11-1-111gtbull Code for C = lt11-111-1gt
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
LAN technologies
EthernetToken RingWireless LAN
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Ethernet Overviewbull History
ndash developed by Xerox PARC in mid-1970sndash roots in Aloha packet-radio networkndash standardized by Xerox DEC and Intel in 1978ndash similar to IEEE 8023 standard
bull CSMACDbull Evolution Bus topology (90rsquos) Star topology (now)bull Most successful access network technology
Hub or switch
Advance
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Ethernet Framebull Preamble 8 bytes
ndash 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
ndash used to synchronize receiver sender clock ratesbull Addresses6 bytes
ndash if adapter receives frame with matching destination address or with broadcast address it passes data in frame to net-layer protocol otherwise adapter discards frame
bull Type 2 bytesndash indicates the higher layer protocol (mostly IP but others also
supported)bull CRC 4 bytes
ndash checked at receiver if error is detected the frame is simply droppedbull Body 46-1500 bytes
ndash Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Destaddr
8 6 4
CRCPreamble Srcaddr
Type Body
26Octets 46-1500
64-1518
72-1526
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
MAC Addressbull MAC Addresses
ndash unique 48-bit unicast address assigned to each adapterbull example 38102be4b102
ndash broadcast all 1s ffffffffffffndash multicast multicast flag (the lowest bit of the 1st octet)= 1
bull 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF for IP multicastndash IP multicast group address mapped to the lower
order 23 bits of MAC address (not one-to-one mapping)
ndash Unique MAC address allocation administered by IEEEbull manufacturer buys portion of MAC address spacebull the first three octets as vendor-specific
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
MAC Address vs IP Address
bull 48-bit MAC addressndash Layer 2ndash Used to get packet
from one interface to another within the same LANsubnet (Ethernet token ringhellip)
ndash Flatndash Uniquendash No change when
moving
bull 32-bit IP addressndash Network layerndash Used to get packet to
destination IP subnetndash Hierarchicalndash Change when moving
bull Depending on IP subnet to which node is attached
bull IP to MAC address translation ARP (more later)
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Different Flavors of Ethernet Formatbull Ethernet version II
DestMAC
8 6 4
FCSPreamble SrcMAC
Type Body
26Octets 46-1500
Data link header Data amp CRC (FCS)
bull IEEE 8023
DestMAC
8 6
Preamble SrcMAC
Length
26Octets
Datalink Header
DSAP SSAP Control
4
FCSBody
43-1497
Data amp CRC (FCS)Logical Link Control
1 1 1
bull Length the length of the data in the frame (excluding preamble CRC DLC addresses and the Length field itself)
bull Destination Service Access Point (DSAP) a pointer to a memory buffer in the receiving station It tells the receiving NIC in which buffer to put this information useful in situations where users are running multiple protocol stacks etc
bull Source Service Access Point (SSAP) bull Control the type of LLC frame bull Distinguish Ethertypes and Control field
ndash Ethertypes value gt 0x05DC (1500) Length lt= 1500
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Unreliable connectionless service
bull Connectionless No handshaking between sending and receiving adapter
bull Unreliable receiving adapter doesnrsquot send acks or nacks to sending adapterndash stream of datagrams passed to network
layer can have gapsndash gaps will be filled if app is using TCPndash otherwise app will see the gaps
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Ethernet CSMACD1 If sender senses channel idle it starts to transmit
frame If it senses channel busy waits until channel idle and then transmits (1-persistent CSMA)bull Inter-frame gap time to send 96 bits (96 s for
10Mbps)2 If adapter transmits entire frame without
detecting another transmission the adapter is done with frame
3 If adapter detects another transmission while transmitting aborts and sends 32-bit jam signal (collision detection)
4 After aborting sender enters exponential backoffndash after the mth collision adapter chooses a K at random
from 012hellip2m-1 Then waits K512 bit times (k x 512 us in 10 Mbps Ethernet) and returns to Step 1
ndash give up after several tries (usually 16)
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Ethernet CSMACD (Cont)
Jam Signal bull make sure all other
transmitters are aware of collision
bull 32 bitsbull Frame 64 (preamble) +
32 (jamming sequence) = 96 bits ndash Runt Frame
Exponential Backoffbull Goal adapt retransmission
attempts to the estimated current of active stations or loadndash heavy load random wait will
be longer
bull first collision choose K from 01 delay is K512 bit (512 s in 10 Mbps) transmission times
bull after second collision choose K from 0123hellip
bull after ten collisions choose K from 01234hellip1023
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
CollisionsA B
A B
A B
A B
Worst casebull A sends at t Arsquos frame
arrives B at t+dbull B begins transmitting at t+d
and collides with Arsquos framebull B sends runt frame the runt
frame arrives A at t+2dbull To detect collision A must
continue transmit until t+2d A must transmit for 2d
bull Round-trip delay about 512 us for 2500m long Ethernet with 4 repeater ndash Corresponds to 512 bits for
10 Mbps Ethernetndash So min frame size 512 bits
The longer the propagation delay the higher probability of collision
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
10BaseT and 100BaseTbull 10100 Mbps rate latter called ldquofast ethernetrdquobull T stands for Twisted Pairbull Star toplogy max 100m between node and hubbull Hubs physical-layer repeaters
ndash bits coming from one link go out all other links at the same rate
ndash no frame bufferingndash no CSMACD at hub adapters detect collisionsndash provides net management functionality
Hub
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Legacy Ethernetbull 10Base5
ndash Bus topology with coaxial cablendash 10 Mbps Up to 500m each segmentndash No more than 4 repeaters between any pair of stationsndash Max 2500 m ndash Max 1024 hosts
bull 10Base2ndash Daisy chainndash Up to 200m
Terminator Transceiver
Adaptor
Repeater
Terminator
10 Base5 Ethernet
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Gbit Ethernet
bull uses standard Ethernet frame formatbull allows for point-to-point links and shared
broadcast channelsbull in shared mode CSMACD is used short
distances between nodes required for efficiency
bull uses hubsbull Full-Duplex at 1 Gbps for point-to-point
linksbull 10 Gbps now
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Ethernet Performancebull Max throughput lt1 as a function of span
ndash As propagation delay increases efficiency decreasesndash instability can occur unless load is reduced under
congestion conditionsndash retransmission backoff policy for stability
Overloadregion
Normal operatingpoint
Capacity Limit~08
load lines
Offered Traffic
ThruTrafficmargin
stable policy(retx backoff)
stable policy(backoff too high)
unstable policy(no backoff)
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
Wireless LANs
bull 80211 abg different Phy technologiesndash 80211 bg 20 MHz channel in 24 GHz up
to 11 Mbps (80211b) 54 Mbps (80211g) phy data rate
ndash 80211a 20 MHz channel in 5GHz up to 54 Mbps phy data rate
bull 80211n ndash 130 Mbps phy data rate on 20 MHz channel
(2 x 2 MIMO)ndash 300 Mbps phy data rate on 40 MHz channel
(channel bonding with 2 x 2 MIMO)
See supplementary WLAN tutorial slides
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-
74
Todayrsquos Homeworkbull Peterson amp Davie Chap 2 4th ed
26218223233244242
Download and review Ethernet and 80211 MAC specs and study IEEE 80211 Wireless LAN Overview slides
Due 26
- ECE544 Communication Networks-II Spring 2015
- Todayrsquos Lecture
- Link Layer Introduction
- Link Layer Services
- Link Layer Communication
- Layer 2 vs Layer 3
- PowerPoint Presentation
- Binary Encoding
- Manchester Encoding
- Point-to-Point Data Link Protocol
- PPP Functions
- PPP Data Frame
- Byte Stuff
- PPP Link Control Protocol (LCP)
- High-Level Data Link Control (HDLC)
- Error Detection
- Parity Checking
- Internet Checksum
- Cyclic Redundancy Check (CRC)
- CRC Example
- Automatic Repeat reQuest(ARQ)
- Sliding Window
- Sliding Window (Cont)
- Sliding Window
- Shared Media Networks
- Medium Access Sublayer
- Media Access Protocol
- MAC Classification
- Pure (Unslotted) ALOHA
- Aloha Algorithm
- Pure Aloha efficiency
- Slotted Aloha
- Efficiency of Slotted ALOHA
- Performance of ALOHA
- Carrier Sense Multiple Access (CSMA)
- Non-persistent CSMA
- 1-persistent CSMA
- P-persistent CSMA
- Propagation Delay
- CSMA Performance Analysis
- Analysis of Non-persistent CSMA
- Comparison of the channel utilization versus load for various random access protocols
- CSMA with Collision Detection
- How to Detect Collision
- CSMACA
- Problems with carrier sensing
- Slide 47
- Solving Hidden Node problem with RTSCTS
- RTSCTS exchange example
- ldquoTaking Turnsrdquo MAC protocols
- TDMA
- Fixed TDMA
- Dynamic TDMA
- FDMA
- Spread Spectrum and CDMA
- Spread Spectrum
- Spread Spectrum (cont)
- Code Division Multiple Access (CDMA)
- LAN technologies
- Ethernet Overview
- Ethernet Frame
- MAC Address
- MAC Address vs IP Address
- Different Flavors of Ethernet Format
- Unreliable connectionless service
- Ethernet CSMACD
- Ethernet CSMACD (Cont)
- Collisions
- 10BaseT and 100BaseT
- Legacy Ethernet
- Gbit Ethernet
- Ethernet Performance
- Wireless LANs
- Todayrsquos Homework
-