Title: CS455 Introduction to Computer Networks
1CS455 Introduction to Computer Networks
WSU Vancouver
- Dr. Wenzhan Song
- Assistant Professor, Computer Science
2Course roadmap
- Introduction
- Application Layer WWW, FTP, email, DNS,
multimedia - Transport Layer reliable end-end data transfer
principles, UDP, TCP - Network Layer IP addressing, routing and other
issues - Data Link Layer framing, error control, flow
control - Medium Access Control (MAC) Layer
multiple-access, channel allocation - Physical Layer wired, wireless, satellite
- Other Topics network security, social issues,
hot topics, research directions
3Data Link Layer Road Map
- Data link layer design issues
- Framing
- Error Control
- Reliable data transfer and flow control
- Example data link protocols
- HDLC and PPP
- Multiple Access Protocols
- Static channel allocation
- Dynamic channel allocation
- LAN technologies and their MAC protocols
- Ethernet
- WiFi and WiMax
4Multiple Access Links and Protocols
- Two types of links
- point-to-point
- PPP for dial-up access
- point-to-point link between switch and host
- broadcast (shared wire or medium)
- traditional Ethernet
- upstream HFC
- 802.11 wireless LAN
5Multiple Access protocols
- single shared broadcast channel
- two or more simultaneous transmissions by nodes
interference - collision if node receives two or more signals at
the same time - multiple access protocol
- distributed algorithm that determines how nodes
share channel, i.e., determine when node can
transmit - communication about channel sharing must use
channel itself! - no out-of-band channel for coordination
6Ideal Multiple Access Protocol
- Broadcast channel of rate R bps
- 1. When one node wants to transmit, it can send
at rate R. - 2. When M nodes want to transmit, each can send
at average rate R/M - 3. Fully decentralized
- no special node to coordinate transmissions
- no synchronization of clocks, slots
- 4. Simple
7MAC Protocols a taxonomy
- Static Channel Allocation
- divide channel into smaller pieces (time slots,
frequency, code) - allocate piece to node for exclusive use
- Dynamic Channel Allocation
- channel not divided, allow collisions
- recover from collisions
8Static Channel Allocation TDMA
- TDMA time division multiple access
- access to channel in "rounds"
- each station gets fixed length slot (length pkt
trans time) in each round - unused slots go idle
- example 6-station LAN, 1,3,4 have pkt, slots
2,5,6 idle
9Static Channel Allocation FDMA
- FDMA frequency division multiple access
- channel spectrum divided into frequency bands
- each station assigned fixed frequency band
- unused transmission time in frequency bands go
idle - example 6-station LAN, 1,3,4 have pkt, frequency
bands 2,5,6 idle
time
frequency bands
10Dynamic Channel Allocation
- ALOHA, slotted ALOHA
- CSMA, CSMA/CD, CSMA/CA in future slides
- Collision free protocols
- Bit-map protocol
- Binary countdown
- Limited contention protocols
- Adaptive tree walk
- Wavelength division multiple access protocol
Not currently used in major system yet
11Pure (unslotted) ALOHA
- unslotted Aloha simpler, no synchronization
- when frame first arrives
- transmit immediately, if collision, then
retransmit with p, or waits for another frame
time with 1-p - collision probability increases
- frame sent at t0 collides with other frames sent
in t0-1,t01
12Pure Aloha efficiency
- P(success by given node) P(node transmits) .
- P(no
other node transmits in t0-1,t0 . - P(no
other node transmits in t0,1t0 - p .
(1-p)N-1 . (1-p)N-1 - p
. (1-p)2(N-1) - choosing optimum
p and then letting N -gt infty ... -
1/(2e) .18
Even worse !
13Slotted ALOHA
- Assumptions
- all frames same size
- time is divided into equal size slots, time to
transmit 1 frame - nodes start to transmit frames only at beginning
of slots - nodes are synchronized
- if 2 or more nodes transmit in slot, all nodes
detect collision
- Operation
- when node obtains fresh frame, it transmits in
next slot - no collision, node can send new frame in next
slot - if collision, node retransmits frame in each
subsequent slot with prob. p until success
14Slotted ALOHA
C collisionE emptyS - successful
- single active node can continuously transmit at
full rate of channel - highly decentralized only slots in nodes need to
be in sync - simple
- collisions, wasting slots
- idle slots (even with data)
- nodes may be able to detect collision in less
than time to transmit packet - clock synchronization
15Slotted Aloha efficiency
- For max efficiency with N nodes, find p that
maximizes Np(1-p)N-1 - For many nodes, take limit of Np(1-p)N-1 as N
goes to infinity, gives 1/e .37
Efficiency is the long-run fraction of
successful slots when there are many nodes, each
with many frames to send
- Suppose N nodes with many frames to send, each
transmits in slot with probability p - prob that node 1 has success in a slot
p(1-p)N-1 - prob that an arbitrary node has a success
Np(1-p)N-1
At best channel used for useful transmissions
37 of time!
16ALOHA
- Throughput versus offered traffic for ALOHA
systems.
17CSMA (Carrier Sense Multiple Access)
- CSMA listen before transmit
- If channel sensed idle may transmit entire frame
- If channel sensed busy, defer transmission
- Human analogy dont interrupt others!
18Nonpersistent CSMA
- Station wishing to transmit listens and obeys
following - If medium is idle, transmit otherwise, go to 2
- If medium is busy, wait amount of time drawn from
probability distribution (retransmission delay)
and repeat 1 - Consequences
- Random delays reduces probability of collisions
- Consider two stations become ready to transmit at
same time - While another transmission is in progress
- If both stations delay same time before retrying,
both will attempt to transmit at same time - Capacity is wasted because medium will remain
idle following end of transmission - Even if one or more stations waiting
191-persistent CSMA
- Station wishing to transmit listens and obeys
following - If medium idle, transmit otherwise, go to step 2
- If medium busy, listen until idle then transmit
immediately - Consequences
- avoid idle channel time
- 1-persistent stations selfish
- If two or more stations waiting, collision
guaranteed - Gets sorted out after collision
20P-persistent CSMA
- Station wishing to transmit listens and obeys
following - If medium idle, transmit with probability p, and
delay one time unit with probability (1 p) - If medium busy, listen until idle and repeat step
1 - If transmission is delayed one time unit, repeat
step 1 - Consequences
- Compromise that attempts to reduce collisions
- Like nonpersistent
- And reduce idle time
- Like 1-persistent
- What is an effective value of p? depend on load
21Persistent and Nonpersistent CSMA
22Persistent and Nonpersistent CSMA
- Comparison of the channel utilization versus load
for various random access protocols.
23Collision-Free Protocols
- The basic bit-map protocol.
- Contention period, consists N slots
- Station j want to transmit frame, insert a 1 bit
into slot j - Each station has complete knowledge after listen
contention period - Transmit frame in numerical order
- Never has collisions
Overhead is 1 bit per station
24Collision-Free Protocols (2)
- The binary countdown protocol
- Station want to transmit, broadcasts its address
as a binary string, starting with the highest bit - Bits in each address position from different
stations are Boolean ORed together - The result address is the winner of the bidding,
it may now transmit a frame - Higher address has a higher priority (good or
bad)
25Limited-contention protocols
- Adaptive tree walk protocol
26Wavelength Division Multiple Access Protocols
27Wireless LAN Protocols
- (a) Hidden station problem (b) Exposed station
problem
28MACA protocol (Multiple Access with Collision
Avoidance )
- (a) A sending an RTS (Request to Send) to B.
- (b) B responding with a CTS (Clear to Send) to A.
29Wireless LAN Protocols
- Multiple Access with Collision Avoidance (MACA)
- The sender stimulate the receiver into outputting
a short frame, so stations nearby can detect this
transmission and avoid transmitting for the
duration of the upcoming data frame - Multiple Access with Collision Avoidance for
Wireless (MACAW) - Introduce ACK to enable retransmit
- Add carrier sense to avoid conflict with RTS
- Run backoff algorithm for each pair, instead of
each station - Exchange congestion info between neighbors
30 Summary of MAC protocols
- What do you do with a shared media?
- Channel Partitioning, by time, frequency or code
- Time Division, Frequency Division
- Random partitioning (dynamic),
- ALOHA, S-ALOHA
- CSMA
- carrier sensing easy in some technologies
(wire), hard in others (wireless) - CSMA/CD used in Ethernet
- Collision-free and limited contention protocols
- WDMA
- MACA, MACAW wireless
- CSMA/CA used in 802.11
31Reading Assignment
- Chapter 5.3 and 5.5
- Chapter 6.3