Professional Documents
Culture Documents
Unit 1
Unit 1
1
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
The OSI Model
Application Application
Layer Layer
Presentation Presentation
Layer Layer
Session Session
Layer Layer
Transport Transport
Layer Communication Network Layer
Copyright ©2000 The McGraw Hill Companies Electrical and/or Optical Signals
Leon-Garcia & Widjaja: Communication Networks Figure 2.6
4
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 2.9
Application A Application B
data
Application Application
Layer data ah Layer
Presentation Presentation
Layer data ph Layer
Session Session
Layer data sh Layer
Transport Transport
Layer data th Layer
Network Network
Layer data nh Layer
Physical Physical
Layer bits Layer
5
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Peer-to-Peer Process
Within a single machine, each layer calls upon
services of the layer just below it.
Layer 3, for example, uses the services provided by
layer 2 and provides services for layer 4.
Between machines, layer x on one machine
communicates with layer x on another machine, by
using a protocol (this is Peer-to-Peer Process).
Communication between machines is therefore a
peer-to-peer process using protocols appropriate to
a given layer.
The network layer is responsible for the delivery of packets from the
original source to the final destination.
29
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 2.13 Presentation layer
30
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Application layer
32
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
2-4 TCP/IP PROTOCOL SUITE
33
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 2.16 TCP/IP model
34
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
OSI versus TCP/IP
35
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
TCP/IP Protocol Suite
Dominant commercial protocol architecture
Specified and extensively used before OSI
Developed by research funded US
Department of Defense
Used by the Internet
36
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
HTTP Request
37
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
TCP/IP Protocol Architecture(1)
Application Layer
Communication between processes or applications
End to end or transport layer (TCP/UDP/…)
End to end transfer of data
May include reliability mechanism (TCP)
Hides detail of underlying network
Internet Layer (IP)
Routing of data
38
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
TCP/IP Protocol Architecture(2)
Network Layer
Logical interface between end system and network
Physical Layer
Transmission medium
Signal rate and encoding
39
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
ALOHA
ALOHA protocol is developed for packet radio networks, but
applicable to any shared transmission medium.
A number of stations share the transmission medium. Two or more
simultaneous transmissions will cause a collision.
Sender
When station has frame, it sends
Station listens for an amount of time
If its hears an ACK, fine. If not, it retransmits the frame after a
random time
If no ACK after several transmissions, it gives up
Frame check sequence can be used for error detection
Receiver
If frame is OK and address matches receiver, sends ACK
Otherwise, ignores this frame and does nothing
Frame may be damaged by noise or by another station transmitting
at the same time (collision). Overlap of frames also causes collision.
ALOHA is simple, but very inefficient
Assuming random traffic, the maximum channel utilization is only
about 18%
41
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
ALOHA
42
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Pure ALOHA
44
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Slotted ALOHA
45
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Random Access – Slotted ALOHA
47
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
CSMA (Cont.)
In traditional LANs, propagation time is much less than
frame transmission time
Remark: this may not be true for 1Gbps and 10Gbps Ethernet
All stations know that a transmission has started almost
immediately by “carrier sense”
Details of CSMA
Stations first listen for clear medium (carrier sense)
If medium is idle, transmit the frame
If two or more stations start at about the same instant, there
will be a collision.
To account for this, a station waits for an ACK
If no ACK after a reasonable time, then retransmit
What should a station do if the medium is found busy?
Three different approaches: nonpersistent CSMA, 1-persistent
CSMA, and p-persistent CSMA
48
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Nonpersistent CSMA
A station wishing to transmit listens to the medium and
obeys the following rules:
1. If medium is idle, transmit; otherwise, go to step 2
2. If medium is busy, wait an amount of time drawn from a
probability distribution and repeat step 1
The use of random delays reduces probability of
collisions
Consider two stations become ready to transmit at about the
same time while another transmission is in progress
If both stations delay the same amount of time before retrying,
both will attempt to transmit at same time collision
Drawback:
Capacity is wasted because medium will generally remain idle
following the end of a transmission, even if there are one or
more stations waiting to transmit.
49
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
1-persistent CSMA
To avoid idle channel time, 1-persistent protocol can be
used
A station wishing to transmit listens to the medium and
obeys the following rules:
1. If medium is idle, transmit; otherwise, go to step 2
2. If medium is busy, continue to listen until the channel is
sensed idle; then transmit immediately.
1-persistent stations are selfish
Drawback:
If two or more stations are waiting to transmit, a collision is
guaranteed.
50
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
p-persistent CSMA
p-persistent CSMA is a compromise that attempts to
reduce collisions, like nonpersistent, and reduce idle
time, like 1-persistent
Rules:
1. If the medium is idle, transmit with probability p, and delay one
time unit with probability (1 – p)
The time unit is typically equal to the maximum propagation delay
2. If the medium is busy, continue to listen until the channel is
idle and repeat step 1
3. If transmission is delayed one time unit, repeat step 1
Question:
What is an effective value of p?
51
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Value of p?
Assume n stations are waiting to transmit while a transmission is
taking place
At the end of transmission, the expected number of stations
attempting to transmit is the number of stations ready (i.e., n)
times the probability of transmitting (i.e., p): np
If np > 1, on average there will be a collision
Repeated attempts to transmit almost guarantee more collisions
Retries compete with new transmissions from other stations
Eventually, all stations try to send
Continuous collisions; zero throughput
So np should be less than 1 for expected peaks of n
Drawback of p-persistent:
If heavy load is expected, p should be small such that np < 1.
However, as p is made smaller, stations must wait longer to attempt
transmission, which results in very long delays.
52
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
CSMA/CD:
CSMA with Collision Detection
The problem of CSMA:
A collision occupies medium for the duration of a frame transmission,
which is not good for long frames.
Collision Detection:
Stations listen whilst transmitting. If collision is detected, stop
transmission immediately.
Rules of CSMA/CD:
1. If the medium is idle, transmit; otherwise, go to step 2
2. If the medium is busy, continue to listen until the channel is idle,
then transmit immediately
3. If a collision is detected during transmission, transmit a brief
jamming signal to assure that all stations know that there has
been a collision and then cease transmission
4. After transmitting the jamming signal, wait a random amount of
time, referred to as backoff, then attempt to transmit again
(repeat from step 1)
53
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
CSMA/CD
Operation
C detects a collision!
A detects a collision! 54
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Collision Detection
The amount of time that it takes to detect a collision is no greater than twice the end-to-
end propagation delay.
Frames should be long enough to allow collision detection prior to the end of
transmission. If shorter frames are used, then collision detection does not occur.
For 10 and 100Mbps Ethernet, the frame length is at least 512 bits.
For 1Gbps Ethernet, the frame length is at least 4096 bits, using carrier extension or
frame bursting.
55
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Which Persistence Algorithm?
IEEE 802.3 uses 1-persistent
Both nonpersistent and p-persistent have
performance problems
1-persistent seems to be more unstable than p-
persistent, due to the greed of the stations
But wasted time due to collisions is short (if
frames are long relative to propagation delay)
With random backoff, stations involved in a
collision are unlikely to collide on next tries
To ensure backoff maintains stability, IEEE 802.3 and
Ethernet use binary exponential backoff
56
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Binary Exponential Backoff
Rules of binary exponential backoff:
A station attempts to transmit repeatedly in the face of repeated
collisions
For the first 10 attempts, the mean value of the random delay is
doubled
The mean value then remains the same for 6 additional attempts
After 16 unsuccessful attempts, the station gives up and reports an
error
As congestion increases, stations back off by larger and larger
amounts to reduce the probability of collision.
1-persistent algorithm with binary exponential backoff is efficient
over a wide range of loads
At low loads, 1-persistence guarantees that a station can seize channel
as soon as the channel goes idle
At high loads, it is at least as stable as the other techniques
Problem: Backoff algorithm gives last-in, first-out effect
Stations with no or few collisions will have a chance to transmit before
stations that have waited longer
57
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Control Access Protocols/
Collision free protocols
Provides in order access to shared medium so that every
station has chance to transfer (fair protocol)
Primary is sending to
Secondary Secondary is sending
to Primary
12.70
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
LOCAL AREA NETWORKS
PROJECT 802
IEEE started the project 802 to set
standards to enable interconnection
between equipment from a variety of
manufacturers. It covers the physical
layer, datalink layer and a part of network
layer of the OSI Model.
Type 1: Connectionless
The connectionless operation is basically sending but no
guarantee of receiving.
Type 2: Connection Oriented.
The connection-Oriented operation for the LLC layer provides
these 4 services:
Connection establishment;
Confirmation and acknowledgement that data has been
received;
Error recovery by requesting received bad data to be resent;
Sliding Windows which is a method of increasing the rate of
data transfer.
Type 3: Acknowledgement with connectionless service.
≥ ≥
81
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
IEEE 802.3 10Base5 (Thick Ethernet)
10Base5 Specifications :
Coaxial Cable
Coaxial cable uses double-shielded 0.4 inch diameter RG8
coaxial cable (about the size of a garden hose). The cable is
not flexible, and difficult to work with. Connection to the
workstation is made with a MAU - Medium Attachment Unit
(or Transceiver). The MAU physically and electrically attaches
to the coaxial cable by a cable tap. The cable is pierced, and
a connection is made (by a screw) to the center conductor.
The MAU is connected to the NIC (Network Interface Card)
by the AUI (Attachment Unit Interface) cable.
90
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
100 Mbps—Fast Ethernet
Increasing the Ethernet transmission rate by a factor of ten over
10Base-T was not a simple task, and the effort resulted in the
development of three separate standards for 100 Mbps over UTP
cable: 100Base-TX ,100Base-FX and 100Base-T4.
100Base-TX
Uses 5 Unshielded twisted pair(UTP) or 2 shielded twisted pair
(STP) to connect a station to the hub.One pair to carry frames
from station to hub and the other pair to carry frames from hub
to station.
100Base-FX
Two optical fibres. One to carry frames from station to hub and
the other to carry frames from hub to station.
94
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Gigabit Ethernet Configuration
95
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
10-Gbps Ethernet
10-Gbps Ethernet can be used to provide high-speed, local
backbone interconnection between large-capacity switches.
Our departmental Ethernet uses 10-Gbps Ethernet at the backbone.
96
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
10-Gbps Ethernet Configuration
10-Gbps Ethernet also
targets at Metropolitan
Area Networks (MANs)
and WANs.
97
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Token Ring: IEEE 802.5 LAN Protocol
Token Ring is a LAN protocol defined in the IEEE 802.5
where all stations are connected in a ring and each station
can directly hear transmissions only from its immediate
neighbor. Permission to transmit is granted by a message
(token) that circulates around the ring.
109
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
WLAN Configurations (option2 of 2): Ad Hoc
LAN
110
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
IEEE 802.11
IEEE 802.11 is devoted to wireless LANs.
Consists of MAC and physical layer protocols for wireless LANs
The Wi-Fi Alliance (Wi-Fi: Wireless Fidelity)
An industry consortium
To certify interoperability for 802.11 products
IEEE 802.11 Architecture
The smallest building block is Basic Service Set (BSS)
A number of stations executing the same MAC protocol
Shared wireless medium
BSS corresponds to a cell
A BSS may be isolated, or may connect to a Backbone Distribution
System (DS) through an Access Point (AP)
AP functions as a bridge and a relay point
AP could be a station which has the logic to provide DS services
AP corresponds to a Control Module (CM)
DS can be a switch, wired network, or wireless network
An Extended Service Set (ESS) consists of two or more BSSs
interconnected by a DS.
114
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
IEEE 802.11 - BSS
MAC protocol and physical medium specification for
wireless LANs
Smallest building block is basic service set (BSS)
Number of stations
Same MAC protocol
Competing for access to same shared wireless medium
May be isolated or connect to backbone distribution
system (DS) through access point (AP)
AP functions as bridge
MAC protocol may be distributed or controlled by central
coordination function in AP
BSS generally corresponds to cell
DS can be switch, wired network, or wireless network
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
BSS Configuration
120
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
802.11 Physical Layer
Issued in four stages
First part in 1997
IEEE 802.11
Includes MAC layer and three physical layer specifications
Two in 2.4-GHz band and one infrared
All operating at 1 and 2 Mbps
Two additional parts in 1999
IEEE 802.11a
5-GHz band, data rate up to 54 Mbps
IEEE 802.11b
2.4-GHz band, data rate at 5.5 and 11 Mbps
Most recent in 2002
IEEE 802.11g extends IEEE 802.11b to higher data rates, up to 54
Mbps
At present
IEEE 802.11n: data rate up to hundreds of Mbps
121
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Medium Access Control
122
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Reliable Data Delivery
802.11 physical and MAC layers subject to unreliability
Noise, interference, and other propagation effects result in loss of frames
Even with error-correction codes, frames may not successfully be received
802.11 includes frame exchange protocol
Station receiving frame returns acknowledgment (ACK) frame
The exchange of these two frames is treated as atomic unit
Not interrupted by any other station
If no ACK frame received within short period of time, retransmit
To further enhance reliability, four-frame exchange may be used
Source issues a Request to Send (RTS) frame to destination
Destination responds with Clear to Send (CTS)
After receiving CTS, source transmits data
RTS and CTS notify other stations that a transmission is under way, so they
refrain from transmission in order to avoid collision
Destination responds with ACK
The purpose of RTS/CTS
The collision time is shortened, because collision only occurs on the RTS frame,
which is very short compared with data frames
123
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Hidden Terminal Problem
125
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
IEEE 802.11 Wireless MAC
Nodes hearing RTS or CTS stay silent for the duration of the
corresponding transmission
129
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
IEEE 802.11 MAC Frame Format
• Control Frames:
• RTS, CTS, ACK (Acknowledgement), etc.
• Management Frames:
• to manage communications between stations and APs.
130
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
MAC Frame Fields
Duration/Connection ID:
If used as duration field, indicates the time (in s) the channel will be
allocated for successful transmission of a MAC frame
In some control frames, contains association or connection identifier
Addresses:
The number and meaning of the 48-bit address fields depend on
context
source address, destination address, transmitter address, receiver
address
Sequence Control:
4-bit fragment number subfield used for fragmentation and reassembly
12-bit sequence number used to number frames between given
transmitter and receiver
Frame Body:
MSDU (MAC SUBLAYER DATA UNIT) or a fragment of an MSDU
Frame Check Sequence:
32-bit cyclic redundancy check 131
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
FDDI (Fiber Distributed Data Interface)
Network Security
What is DQDB?
Network Security
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
About DQDB
Network Security
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Few technical facts of DQDB
• Distance up to 200 KM
• Medium: Copper or Fiber
• At distance up to 160 KM approx speed is 44.73 Mbps (Copper)
• At distance up to 100 KM approx speed is 150 Mbps (Fiber)
• Transmission Rate: 34 Mbps to 150 Mbps
Network Security
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
DQDB Architecture
Network Security
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Upstream & Downstream
• As Bus A is configured
• Stations 2 & 3 are considered to be upstream w.r.t station 1
• Stations 1 & 2 are considered to be downstream w.r.t. station 3
• As Bus B is configured
• Station 2 & 3 are considered to be downstream w.r.t. station 1
• Stations 1 & 2 are considered to be upstream w.r.t. station 3
Network Security
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
DQDB working
Network Security
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
DQDB Operation
The DQDB configuration is independent
of the number of nodes and of the
distances involved making DQDB ideal
for high-speed transmissions
DQDB uses 53-byte packets (52 data
bytes and one access control byte) for
transmissions called slots.
Slots from different nodes are
intermingled in the network traffic.
157 DQDB
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
The head node (the first node connected to
the external fiber) is responsible for creating
empty slots and sending these down the line
to the other nodes to use.
The downline nodes indicate how many slots
are needed using the secondary bus to the
head node which then creates empty slots
and sends these down the line.
As the slots move down the line, they are
taken by the nodes that have requested
them.
158 DQDB
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Queue Arbitration
159 DQDB
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
To do this it will set the request bit of a slot
travelling on Bus B (the reverse bus).
As the request passes each node on Bus B
they will set a counter to indicate the
presence of a reservation.
When an empty slot travels down Bus A, the
counter at Node 1 will be decreased by one.
Node 2 will be free to put its data into the
slot and send it down the bus to Node N.
160 DQDB
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Node 1 will then be free to use the next
empty slot for its own data.
Each node will in fact need two
counters.
The request counter (RQ) is used to
keep track of the distributed queue.
RQ is incremented for every request bit
set to 1 on the reverse bus and
decremented for each empty QA slot
passing on the forward bus.
When a node wants to send a QA
segment, it uses another counter called
the countdown counter (CD).
161 DQDB
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
When a node is ready to place a
request on the queue, it transfers the
value of the RQ counter to the CD
counter and resets the RQ counter to 0.
The RQ counter now counts the number
of new requests and the CD counter
keeps track of this node's position in
the queue.
In this way a node knows how many
stations are ahead of it in the queue
and the length of the queue behind it.
162 DQDB
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
High Performance Parallel Interface
(HIPPI)
HIPPI (late 1980s): high-speed interface developed for
supercomputers and high-end workstations
Serial HIPPI is a fiber-optic version that uses point-to-point
optical links for bandwidth up to 800 Mbps
In early 1990s, it was used as a network backbone and for
interconnecting supercomputers
With the advent of Gigabit Ethernet, interest in HIPPI as a LAN
backbone decreased
HIPPI-6400 (1998): up to 6.4 Gbps transfer rates
Known as Gigabyte System Network (GSN)
HIPPI and GSN are now exotic networking products and aren’t
often found in typical corporate networks
164
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Overview of HIPPI
HIPPI is a very high-speed data transfer protocol, with the following properties,
features, and limitations:
Data rates of 800 or 1600 Mb/s.
Uses a 50- or 100-pair connection. (50-pair for 800 Mb/s data-rate, 100-pair
for 1600 Mb/s datarate.)
The 100-pair connection is actually a set of two identical 50-pair cables.
Useful for distances up to 25 meters. (Serial-HIPPI extensions are being
proposed for operation up
to 10km.)
Transfers 32 bits (for 800 Mb/s data-rate) or 64 bits (for 1600 Mb/s data-rate)
in parallel. Packet format allows byte alignment.
Connection-oriented protocol.
Point-to-point connection.
Simplex (i.e., one-way data transfer) operation.
First standard in its class (data-transfer for high-performance computing
environments).
Designed for ease of implementation: available options are very limited.
PARITY BUS(S-->D) -- These 4 lines carry the parity bits (one for each
word) along with data word.
3 approaches:
ISM band
Narrow band
Spread spectrum
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
ISM Bands
ISM=Industrial, Scientific, and Medical
Unlicensed, you can freely install and
move.
Speed
Faster than broadband service
Wireless
Not having to lay cables reduces cost
Easier to extend to suburban and rural areas
Broad coverage
Much wider coverage than WiFi hotspots
WiMAX
Worldwide Interoperability for Microwave
Access
Is a certification mark for products that pass
conformity and interoperability tests for the
IEEE 802.16
WiMAX tower
Similar in concept to a cell-phone tower
Non-line-of-sight
A small antenna on your computer connects
to the tower
2 GHz to 11 GHz frequency range
Limited to a 4-to-6 mile radius
Line-of-sight service
A fixed dish antenna points straight at the
WiMAX tower from a rooftop or pole.
66 GHz frequency range
Higher frequencies, there is less interference
and lots more bandwidth
30-mile radius
Range
30-mile radius from base station
Speed
70 megabits per second
Line-of-sight not needed between user
and base station