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
4Ethernet
- MAC addressing
- MAC protocol CSMA/CD
- Ethernet interconnection
5Ethernet
- dominant wired LAN technology
- cheap 20 for 100Mbs!
- first widely used LAN technology
- Simpler, cheaper than token LANs and ATM
- Kept up with speed race 10 Mbps 10 Gbps
Metcalfes Ethernet Sketch mid-1970s Ethernet
10Base2 Bus topology
6Manchester encoding
- Used in 10BaseT
- Each bit has a transition
- Allows clocks in sending and receiving nodes to
synchronize to each other - no need for a centralized, global clock among
nodes! - Hey, this is physical-layer stuff!
7MAC Addresses
Each adapter on LAN has unique MAC address
Broadcast address FF-FF-FF-FF-FF-FF
adapter
8ARP Address Resolution Protocol
- Each IP node (Host, Router) on LAN has ARP table
- ARP Table IP/MAC address mappings for some LAN
nodes - lt IP address MAC address TTLgt
- TTL (Time To Live) time after which address
mapping will be forgotten (typically 20 min)
237.196.7.78
1A-2F-BB-76-09-AD
237.196.7.23
237.196.7.14
LAN
71-65-F7-2B-08-53
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
237.196.7.88
9Ethernet
- Frame format and addressing
- MAC protocol CSMA/CD
- Interconnecting issues
10Ethernet uses CSMA/CD
- Before attempting a retransmission, adapter waits
a random time, that is, random access
- No slots
- adapter doesnt transmit if it senses that some
other adapter is transmitting, that is, carrier
sense - transmitting adapter aborts when it senses that
another adapter is transmitting, that is,
collision detection
11CSMA/CD (Collision Detection)
- CSMA/CD carrier sensing, deferral as in CSMA
- collisions detected within short time
- colliding transmissions aborted, reducing channel
wastage - collision detection
- easy in wired LANs measure signal strengths,
compare transmitted, received signals - difficult in wireless LANs receiver shut off
while transmitting
12Ethernet CSMA/CD algorithm
- 1. Adaptor receives datagram from net layer
creates frame - 2. If adapter senses channel idle, it starts to
transmit frame. If it senses channel busy, waits
until channel idle and then transmits - 3. If adapter transmits entire frame without
detecting another transmission, the adapter is
done with frame !
- 4. If adapter detects another transmission while
transmitting, aborts and sends jam signal - 5. After aborting, adapter enters exponential
backoff after the mth collision, adapter chooses
a K at random from 0,1,2,,2m-1. Adapter waits
K?512 bit times and returns to Step 2 -
13Ethernets CSMA/CD (more)
- Jam Signal make sure all other transmitters are
aware of collision 48 bits - Bit time .1 microsec for 10 Mbps Ethernet for
K1023, wait time is about 50 msec -
- Exponential Backoff
- Goal adapt retransmission attempts to estimated
current load - heavy load random wait will be longer
- first collision choose K from 0,1 delay is K?
512 bit transmission times - after second collision choose K from 0,1,2,3
- after ten collisions, choose K from
0,1,2,3,4,,1023
14CSMA/CD (Collision Detection)
- CSMA/CD can be in one of three states
contention, transmission, or idle.
15CSMA/CD efficiency
- See equation on textbook page 280
- Much better than ALOHA, also decentralized,
simple, and cheap
16Ethernet services
- Connectionless No handshaking between sending
and receiving adapter. - Unreliable receiving adapter doesnt send acks
or nacks to sending adapter - stream of datagrams passed to network layer can
have gaps - gaps will be filled if app is using TCP
- otherwise, app will see the gaps
17IEEE 802.2 Logical Link Control
- (a) Position of LLC. (b) Protocol formats.
Ethernet and other 802 protocol offer a
best-efforts datagram service. LLC can be added
to provides 3 service options unreliable
datagram service, acked datagram service,
reliable connection-oriented service
18Ethernet
- Frame addressing
- MAC protocol CSMA/CD
- Interconnecting issues
19Hubs
- Hubs are essentially physical-layer repeaters
- bits coming from one link go out all other links
- at the same rate
- no frame buffering
- no CSMA/CD at hub adapters detect collisions
- provides net management functionality
20Interconnecting with hubs
- Backbone hub interconnects LAN segments
- Extends max distance between nodes
- But individual segment collision domains become
one large collision domain - Cant interconnect 10BaseT 100BaseT, because
hubs can not buffer frames for different rates
hub
hub
hub
hub
21Switch
- Link layer device
- stores and forwards Ethernet frames
- examines frame header and selectively forwards
frame based on MAC dest address - when frame is to be forwarded on segment, uses
CSMA/CD to access segment - transparent
- hosts are unaware of presence of switches
- plug-and-play, self-learning
- switches do not need to be configured
22Forwarding
1
3
2
- How to determine onto which LAN segment to
forward frame? - Looks like a routing problem...
23Self learning
- A switch has a switch table
- entry in switch table
- (MAC Address, Interface, Time Stamp)
- stale entries in table dropped (TTL can be 60
min) - switch learns which hosts can be reached through
which interfaces - when frame received, switch learns location of
sender incoming LAN segment - records sender/location pair in switch table
24Filtering/Forwarding
- When switch receives a frame
- index switch table using MAC dest address
- if entry found for destinationthen
- if dest on segment from which frame arrived
then drop the frame - else forward the frame on interface
indicated -
- else flood
-
forward on all but the interface on which the
frame arrived
25Switch example
- Suppose C sends frame to D
address
interface
switch
1
A B E G C
1 1 2 3 1
3
2
hub
hub
hub
A
insert
I
F
D
G
B
C
H
E
- Switch receives frame from C
- notes in bridge table that C is on interface 1
- because D is not in table, switch forwards frame
into interfaces 2 and 3 - frame received by D
26Switch example
- Suppose D replies back with frame to C.
address
interface
switch
A B E G C
1 1 2 3 1
hub
hub
hub
A
I
F
D
G
B
C
H
E
- Switch receives frame from D
- notes in bridge table that D is on interface 2
- because C is in table, switch forwards frame only
to interface 1 - frame received by C
27Switch traffic isolation
- switch installation breaks subnet into LAN
segments - switch filters packets
- same-LAN-segment frames not usually forwarded
onto other LAN segments - segments become separate collision domains
collision domain
collision domain
collision domain
28Switches dedicated access
- Switch with many interfaces
- Hosts have direct connection to switch
- No collisions full duplex
- Switching A-to-A and B-to-B simultaneously, no
collisions
A
C
B
switch
C
B
A
29More on Switches
- cut-through switching frame forwarded from input
to output port without first collecting entire
frame - slight reduction in latency
- combinations of shared/dedicated, 10/100/1000
Mbps interfaces
30Institutional network
mail server
to external network
web server
router
switch
IP subnet
hub
hub
hub
31Switches vs. Routers
- both store-and-forward devices
- routers network layer devices (examine network
layer headers) - switches are link layer devices
- routers maintain routing tables, implement
routing algorithms - switches maintain switch tables, implement
filtering, learning algorithms
Switch
32Summary comparison
33Repeaters, Hubs, Bridges, Switches, Routers and
Gateways
- (a) Which device is in which layer.
- (b) Frames, packets, and headers.
34Data 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
35Elements of a wireless network
36Elements of a wireless network
37Elements of a wireless network
- wireless link
- typically used to connect mobile(s) to base
station - also used as backbone link
- multiple access protocol coordinates link access
- various data rates, transmission distance
38Elements of a wireless network
39Elements of a wireless network
- Ad hoc mode
- no base stations
- nodes can only transmit to other nodes within
link coverage - nodes organize themselves into a network route
among themselves
40Wireless Link Characteristics
- Differences from wired link .
- decreased signal strength radio signal
attenuates as it propagates through matter (path
loss) - interference from other sources standardized
wireless network frequencies (e.g., 2.4 GHz)
shared by other devices (e.g., phone) devices
(motors) interfere as well - multipath propagation radio signal reflects off
objects ground, arriving ad destination at
slightly different times - . make communication across (even a point to
point) wireless link much more difficult
41Wireless network characteristics
- Multiple wireless senders and receivers create
additional problems (beyond multiple access)
- Hidden terminal problem
- B, A hear each other
- B, C hear each other
- A, C can not hear each other
- means A, C unaware of their interference at B
- Signal fading
- B, A hear each other
- B, C hear each other
- A, C can not hear each other interferring at B
42Characteristics of selected wireless link
standards
802.16
54 Mbps
802.11a,g
5-11 Mbps
.11 p-to-p link
802.11b
1 Mbps
802.15
3G
384 Kbps
UMTS/WCDMA, CDMA2000
2G
56 Kbps
IS-95 CDMA, GSM
802.16 10-66GHz 802.11a 5GHz ISM
band802.11b,g 2.4GHz ISM band802.15 2.4GHz
ISM band
43IEEE 802.11 Wireless LAN
- 802.11b
- 2.4-2.485 GHz unlicensed radio spectrum
- up to 11 Mbps
- direct sequence spread spectrum (DSSS) in
physical layer - all hosts use same chipping code
- widely deployed, using base stations
- 802.11a
- 5-5.8 GHz range
- up to 54 Mbps
- 802.11g
- 2.4-2.485 GHz range
- up to 54 Mbps
- All use CSMA/CA for multiple access
- All have base-station and ad-hoc network versions
44802.11 LAN architecture
- wireless host communicates with base station
- base station access point (AP)
- Basic Service Set (BSS) (aka cell) in
infrastructure mode contains - wireless hosts
- access point (AP) base station
- ad hoc mode hosts only
hub, switch or router
BSS 1
BSS 2
45802.11 Channels, association
- 802.11b 2.4GHz-2.485GHz spectrum divided into 11
channels at different frequencies - AP admin chooses frequency for AP
- interference possible channel can be same as
that chosen by neighboring AP! - host must associate with an AP
- scans channels, listening for beacon frames
containing APs name (SSID) and MAC address - selects AP to associate with
- may perform authentication Chapter 8
- will typically run DHCP to get IP address in APs
subnet
46802.11 Wireless LANs
- MAC protocols
- DCF CSMA/CA
- 802.11 Frame format and addressing
- Physical layer issues
47IEEE 802.11 Protocol Architecture
Point Coordination Function (PCF)
OFDM
48Media Access Control
- Distributed wireless foundation MAC (DWFMAC)
- Distributed access control mechanism
- Optional centralized control on top
- Lower sublayer is distributed coordination
function (DCF) - Contention algorithm to provide access to all
traffic - Asynchronous traffic
- Point coordination function (PCF)
- Centralized MAC algorithm
- Contention free
- Built on top of DCF
49Distributed Coordination Function (DCF)
- DCF sublayer uses CSMA/CA
- Uses both physical and virtual carrier sensing.
- MACAW(Multiple Access with Collision Avoidance
for Wireless) with virtual carrier sensing. - 1-persistent physical carrier sensing.
- No collision detection
- Not practical on wireless network
- Dynamic range of signals very large
- Transmitting station cannot distinguish incoming
weak signals from noise and effects of own
transmission - DCF includes delays
- Amounts to priority scheme
- Interframe space
50CSMA/CA
- 802.11 sender
- 1 if sense channel idle for DIFS then
- transmit entire frame (no CD)
- 2 if sense channel busy then
- start random backoff time
- timer counts down while channel idle
- transmit when timer expires
- if no ACK, increase random backoff interval,
repeat 2 - 802.11 receiver
- - if frame received OK
- return ACK after SIFS (ACK needed due to
hidden terminal problem)
sender
receiver
51Avoiding collisions in CSMA/CA
- idea allow sender to reserve channel rather
than random access of data frames avoid
collisions of long data frames - sender first transmits small request-to-send
(RTS) packets to BS using CSMA - RTSs may still collide with each other (but
theyre short) - BS broadcasts clear-to-send CTS in response to
RTS - RTS heard by all nodes
- sender transmits data frame
- other stations defer transmissions
Avoid data frame collisions completely using
small reservation packets!
52Collision Avoidance RTS-CTS exchange
A
B
AP
defer
time
53virtual channel sensing in CSMA/CA
- The use of virtual channel sensing in CSMA/CA.
A
B
D
C
54Point Coordination Function (PCF)
- Alternative access method implemented on top of
DCF - Polling by centralized polling master (point
coordinator) - Uses PIFS when issuing polls
- PIFS smaller than DIFS
- Can seize medium and lock out all asynchronous
traffic while it issues polls and receives
responses - E.g. wireless network configured so number of
stations with time-sensitive traffic controlled
by point coordinator - Remaining traffic contends for access using CSMA
- Point coordinator polls to stations asking if any
frames to send - When poll issued, polled station may respond
using SIFS - Once a station has signed up for polling service
at a certain rate, it is effectively guaranteed a
certain fraction of the bandwidth
55IEEE 802.11 MAC Logic
56IEEE 802.11 MAC Logic
- Single delay known as interframe space (IFS)
- Using IFS, rules for CSMA
- Station with frame senses medium
- If idle, wait to see if remains idle for one IFS.
If so, may transmit immediately - If busy (either initially or becomes busy during
IFS) station defers transmission - Continue to monitor until current transmission is
over - Once current transmission over, delay another IFS
- If remains idle, back off random time and again
sense - If medium still idle, station may transmit
- During backoff time, if becomes busy, backoff
timer is halted and resumes when medium becomes
idle - To ensure stability, binary exponential backoff
used
57IEEE 802.11 MAC Timing Basic Access Method
58Priority Interframe Space Values
- Use three values for IFS
- SIFS (short IFS)
- Shortest IFS
- For all immediate response actions
- Acknowledgment (ACK)
- Clear to send (CTS)
- Poll response
- PIFS (point coordination function IFS)
- Midlength IFS
- Used by the centralized controller in PCF scheme
when issuing polls - Takes precedence over normal contention traffic,
e.g., DCF - Frames using SIFS have precedence over PCF poll
- DIFS (distributed coordination function IFS)
- Longest IFS
- Used as minimum delay for asynchronous frames
contending for access
59802.11 Wireless LANs
- MAC protocols
- DCF CSMA/CA
- 802.11 Frame format and addressing
- Physical layer issues
60IEEE 802.11 Protocol Architecture
Point Coordination Function (PCF)
OFDM
61Wireless Physical Layer
- Physical layer conforms to OSI (five options)
- 1997 802.11 infrared, FHSS, DHSS
- 1999 802.11a OFDM and 802.11b HR-DSSS
- 2001 802.11g OFDM
- 802.11 Infrared
- Two capacities 1 Mbps or 2 Mbps.
- Range is 10 to 20 meters and cannot penetrate
walls. - Does not work outdoors.
- 802.11 FHSS (Frequence Hopping Spread Spectrum)
- Offers good resistance to multipath fading.
- 79 non-overlapping channels, each 1 Mhz wide at
low end of 2.4 GHz ISM band. - Same pseudo-random number generator used by all
stations. - Dwell time min. time on channel before hopping
(400msec).
Multipath Fading The deflection of a radio signal
off obstacles which can cause interference during
signal reception. Multipath occurs when a radio
signal is received directly by an antenna and
later the same signal is received again,
reflected from a building or mountain. "Ghosting"
of a TV signal is a form of muiltipath. Under
certain conditions, two or more of the signals
can interfere with each other and create "fading"
(a loss of signal) in the communications link.
62Wireless Physical Layer
- 802.11 DSSS (Direct Sequence Spread Spectrum)
- Spreads signal over entire spectrum using
pseudo-random sequence (similar to CDMA see
Tanenbaum sec. 2.6.2). - Each bit transmitted using an 11 chips Barker
sequence, PSK at 1Mbaud. - 1 or 2 Mbps.
- 802.11a OFDM (Orthogonal Frequency Divisional
Multiplexing) - Compatible with European HiperLan2.
- Good immunity to multipath fading
- 54Mbps in wider 5.5 GHz band ? transmission range
is limited. - Uses 52 FDM channels (48 for data 4 for
synchronization). - Encoding is complex ( PSM up to 18 Mbps and QAM
above this capacity). - E.g., at 54Mbps 216 data bits encoded into into
288-bit symbols. - More difficulty penetrating walls.
63Wireless Physical Layer
- 802.11b HR-DSSS (High Rate Direct Sequence Spread
Spectrum) - 11a and 11b shows a split in the standards
committee. - 11b approved and hit the market before 11a.
- Up to 11 Mbps in 2.4 GHz band using 11 million
chips/sec. - Note in this bandwidth all these protocols have
to deal with interference from microwave ovens,
cordless phones and garage door openers. - Range is 7 times greater than 11a.
- 11b and 11a are incompatible!!
64Wireless Physical Layer
- 802.11g OFDM(Orthogonal Frequency Division
Multiplexing) - An attempt to combine the best of both 802.11a
and 802.11b. - Supports bandwidths up to 54 Mbps.
- Uses 2.4 GHz frequency for greater range.
- Is backward compatible with 802.11b.
65Data 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 and WPAN
66Broadband Wireless
- Wireless MAN or Wi-Max
- IEEE 802.16 standard for bridging the last mile
between ISPs and their customers as replacement
for costly-todeploy fiber optic/DSL/cable modem
links (Broadband Wireless Access, BWA) - Original PHY-Layer
- 10-66 GHz line-of-sight connections with fixed,
directed outdoor antennas single-carrier, TDD or
FDD with TDMA in the uplink - In 802.16a a second PHY-layer was added to make
the standard suitable for residential
applications (no line-of-sight, more multi-path
propagation) - 2-11 GHz, both licensed and license-exempt
non-line-of-sight operation possible support for
advanced antenna systems three air interfaces
single carrier, OFDM with TDMA, or OFDMA
67Comparison of 802.11 and 802.16a
68The 802.16 Protocol Stack
- The 802.16 Protocol Stack.
69The 802.16 Physical Layer
- The 802.16 transmission environment.
Use error-correction code Hamming code
70The 802.16 Physical Layer (2)
- FDD TDD
- Example Frames and time slots for time division
duplexing(TDD)
71The 802.16 MAC Sublayer Protocol
- Downstream channel
- Base station decide
- Upstream channel
- Competing uncoordinated subscribers
- Related to QoS issues
- Four Connection-Oriented Service Classes
- Constant bit rate service (uncompressed voice)
- Real-time variable bit rate service (compressed
multimedia) - Non-real-time variable bit rate service (not real
time heavy transmissions, large file transfers) - Best efforts service (everything else)
- Decided when connection is set up
72802.15 personal area network
- less than 10 m diameter
- replacement for cables (mouse, keyboard,
headphones) - ad hoc no infrastructure
- master/slaves
- slaves request permission to send (to master)
- master grants requests
- 802.15 evolved from Bluetooth specification
- 2.4-2.5 GHz radio band
- up to 721 kbps
radius of coverage
73Unlicensed Radio Spectrum
?
12cm
5cm
33cm
26 Mhz
83.5 Mhz
125 Mhz
902 Mhz
2.4 Ghz
5.725 Ghz
2.4835 Ghz
5.785 Ghz
928 Mhz
802.11a HyperLan
cordless phones baby monitors Wireless LANs
802.11 Bluetooth Microwave oven
74Frequency Hopping
- Total bandwidth divided into 1MHz physical
channels - FH occurs by jumping from one channel to another
in pseudorandom sequence - Hopping sequence shared with all devices on
piconet
75Frequency Hopping
1Mhz
. . .
79
1
2
3
83.5 Mhz
- frequency hopping spread spectrum
- 2.402 GHz k MHz, k0, , 78
- 1,600 hops per second
76Radio Specification
- Low Power Consumption
- Three power classes defined with max output power
from 1 mW (Class 3) to 100 mW (Class 1). - Class 1 Outputs 100 mW for maximum range
- Power control mandatory
- Provides greatest distance
- Class 2 Outputs 2.4 mW at maximum
- Power control optional
- Class 3 Nominal output is 1 mW
- Lowest power
- Short Range 10-100 Meter
- Class 1 100 meter (300 feet)
- Class 2 20 meter (60 feet)
- Class 3 10 meter (30 feet)
77Baseband Layer
- MAC sublayer some elements of physical layer
- Deal with how the master controls time slots and
how these slots are grouped into frames - Piconet access
- Bluetooth devices use time division duplex (TDD)
- Access technique is TDMA
78Reading Assignment
- Chapter 2
- 2.1 - must
- Chapter 8