Direct Link Networks
1. Point-to-Point Links
2. Carrier Sense Multiple Access ( CSMA)
– (for example the Ethernet)
3. Token Rings – (for example IEEE 802.5
and FDDI )
4. Wireless – (for which 802.11 is the
Connecting computers is a first step.
There are additional problems to solve before
they can exchange packets:
• Encoding bits into the transmission medium
• Framing the bits so they can be understood
• Error detection
• Reliable delivery, in spite of occasional errors
• Media access control
Hardware Building Blocks
• Networks are constructed from nodes and links
• Nodes are general purpose computers such
as workstations, multiprocessors or PCs as
well as special purpose switches, routers.
– Memory – finite – must be managed
– Network Adapter (NIC) and its device driver
• Links implemented on physical media, such
as twisted pair, coaxial cable, optical fiber
Network (To network)
Example workstation architecture
• Physical media are used to propagate
signals as electromagnetic waves, traveling
at the speed of light.
• Properties of EM waves:
– Frequency- or oscillations, measured in hertz
– Wavelength – distance between adjacent
maxima and minima, measured in meters
• Wavelength = speed / frequency
• Voice grade phone lines carry waves ranging
from 300 Hz to 3300 Hz
• Voice-grade example: 300Hz in copper wire
• Wavelength = Speed in Copper/ Frequency
= 2/3 x 3 x 108 /300
= 667 x 103 meters
0 2 4 6 8 10 12 14 16 18 20 22 24
f(Hz) 10 10 10 10 10 10 10 10 10 10 10 10 10
Radio Microwav e Inf rared UV X ray Gamma ray
4 5 6 7 8 9 10 11 12 13 14 15 16
10 10 10 10 10 10 10 10 10 10 10 10 10
Satellite Fiber optics
AM FM Terrestrial microwav e
• A link is a physical medium carrying signals
in the form of electromagnetic waves.
• Binary data is encoded in the signal.
– Lower layer is concerned with modulation,
varying the frequency, amplitude or phase of the
– Upper layer is concerned with encoding the data
• Another link attribute is how many bit streams
can be encoded on it, at a given time.
• One bit stream- connected nodes share access
• Point-to-point – often two bit streams at once
– Full duplex - two directions – simultaneously
– Half duplex – one direction at a time
– Simplex – one direction
• Type of cable depends on technology
• Coaxial – ( thick and thin) – within buildings
• Category 5 ( CAT 5) – twisted pair, thicker
gauge than telephone wire
• Fiber –plastic or most often glass, more
expensive, but used to connect buildings, and
transmits light instead of electrical waves.
Local Link Cables
Cable Typical Distances
Cat 5 twisted 10-100 Mbps 100 m
Thin-net coax 10-100 Mbps 200 m
Thick-net coax 10-100 Mbps 500 m
Multimode 100 Mbps 2 km
Single-mode 100- 240 Mbps 40 km
• To connect nodes on opposite sides of the country, or
at great distances, you must lease a dedicated line from
the telephone company.
• DS1, DS3, T1, and T3 are relatively old technologies,
defined for copper
• STS-N links are for optical fiber (Synchronous
Transport Signal), also called OC-N for Optical Carrier
• Originally designed for voice, today can carry data,
voice and video
DS1 or T1 1.544 Mbps
DS3 or T3 44.736 Mbps
STS-1 51.840 Mbps
STS-3 155.250 Mbps
STS-12 622.080 Mbps
STS-48 2488320 Gbps
STS-192 155.250 Mbps
• Leased lines range in price from $1000/month to “don‟t
• Last mile links span the last mile from the network
service provider to the home or office.
• Conventional modem- POTS (plain old telephone
• ISDN – (Integrated Services Digital Network) – uses
CODEC ( coder/decoder) to encode analog to digital
• xDSL (Digital Subscriber Line)
• Cable modem- uses cable television (CATV)
infrastructure, available to 95% of US households 16
Common Available Services
POTS 28.8 - 56 Kbps
ISDN 64 – 128 Kbps
xDSL 16 Kbps – 52.2 Mbps
CATV 20 –40 Mbps
• Collection of technologies, able to transmit data
at high speeds over standard twisted pair lines
• ASDL ( Asymmetric Digital Subscriber Line)-
different speeds in different directions (upstream
and downstream) – called local loop
• VDSL- (Very high rate Digital Subscriber Line)-
runs over shorter distances – “fiber to
1.554─8.448 Mbps downstream
16─ 640 Kbps
office Local loop premises
ADSL connects the subscriber to the
central office via the local loop.
N VDSL at 12.96─ 55.2 Mbps
Central Neighborhood optical Subscriber
office over fiber network unit ─
over 1000 4500 feet of copper premises
VDSL connects the subscriber to the optical network that
reaches the neighborhood.
• Shannon‟s theorem gives an upper bound to the
capacity of a link, in terms of bits per second.
C = B log2 (1+S/N)
where C is channel capacity, B is Bandwidth, S is
signal power, N is noise and S/N is the signal to
noise ratio expressed in decibels, related as:
dB= 10 x log10 (S/N)
• dB ratio pf 30 dB
• S/N = 1000
• Bandwidth = 3000Hz
C = B x log2 ( 1+S/N)
C = 3000 x log2 (1001)
C = 30 Kbps
= roughly the limit of a 28.8 modem
How are 56 Kbps modems possible? See p. 76
• A subset of CATV channels are made available for
transmitting digital data
• A single CATV channel has a bandwidth of 6 MHz
• Like ADSL, CATV is asymmetric with
downstream rates much greater than upstream
– 40 Mbps downstream ( 100 Mbps max)
– 20 Mbps upstream ( roughly half as much)
• Unlike DSL, bandwidth is shared among all
subscribers in a neighborhood.
Node Adaptor Adaptor Node
Signals travel between signaling components.
Bits flow between adaptors.
Network interface cards are called NICs.
• Nearly all the functions in this chapter are
implemented in the network adaptor (NIC):
framing, error detection and the media access
The exceptions are the point-to-point automatic
repeat-request schemes(ARQ), which are
implemented at the lowest level protocol running
on the host.
Block Diagram of a Network
interf ace interf ace
• The host only pays attention to the network device
when the adaptor interrupts the host, (for example,
when a frame has been transmitted or one arrives).
• A procedure is invoked by the operating system,
and an interrupt handler is invoked to take the
• While servicing this interrupt, the OS disables
Direct Memory Access vs.
• There are two ways to transfer the bytes from the
frame between the adaptor and host memory:
• Direct Memory Access (DMA)- the NIC directly
reads/writes to the host‟s memory without CPU
involvement, using a pair of buffer descriptor lists.
• Programmed I/O (PIO)- network adaptor (NIC)
copies message into its own buffer, until CPU can
copy it into the host memory.
• Host memory is often a limiting factor in network
• I/O bus speed corresponds to its peak bandwidth (bus
width x clock speed).
• Real limitation is the size of the data block being
transferred ( See p. 145)
• Memory/CPU bandwidth is same as bandwidth of I/O
• Must be aware of limits memory puts on network
Memory Bandwidth on Modern
235 Mbps 1056 Mbps
• AMPS- Advance Mobile Phone System- standard
for cellular phones
• PCS- Personal communication Services – digital
cellular services in US and Canada
• GSM- Global System for Mobile Communication
in the rest of the world.
• They use a system of towers to transmit signals
and are moving toward ringing the globe with
Local Wireless Links
• Radio and infrared portions of the spectrum can
be used over short distances.
• Technology- limited to in-building environments
• Radio bands at 5.2 GHz and 17 GHz are
allocated to HIPPERLAN in Europe and 2.4
GHz for use with the IEEE 802.11 standard,
which supports data rates up to 54 Mbps.
• Bluetooth – radio, operates in the 2.45 GHz band
– Used for all devices, printers, PDAs, phones
– Networks of these devices are called piconets 33
Bit Rates and Baud Rates
• Rate at which the signal changes is called
the baud rate.
• When one bit is transmitted on a signal, the
bit rate and baud rate may be equal.
• Often multiple bits are encoded onto a
signal, where for example with 4 bits per
signal, the baud rate may be 4 times the bit
• First step in turning nodes and links into usable building
blocks is to understand how to connect them so that bits
can be transmitted.
• Next encode binary data that the source want to send
into signals that the links can carry and then decode the
data back into the corresponding data at the receiving
• The high and low signals correspond to 2 different
voltages on a copper based system or 2 different power
levels on an optical link.
• NRZ – non-return to zero, maps the data value 1 to the
high signal and 0 to the low signal
• A sequence of several consecutive 1‟s means that the
signal stays high for a prolonged period of time.
• Two fundamental problems;
– Baseline wander –makes it difficult to detect a significant change
in the signal
– Clock recovery needs frequent changes from high to low to be
• Sender and receiver clock must be precisely synchronized.
Bits 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0
• NRZI – non-return to zero inverted,
addresses the previous problem, by having
the sender make a transition from the
current signal to encode a 1 and stay at
current signal to encode a 0. ( Solves the
problem of consecutive 1‟s, but not 0‟s)
• Merges the clock with the signal by transmitting the
exclusive–OR of the NRZ encoded data.
• Results in 0 being encoded as a low-to-high transition
and 1 encoded as a high-to-low transition. Because
both 0s and 1 result in a transition, the clock can be
recovered at the receiver.
• Problem: doubles the rate at which transitions are
made on the link, which gives receiver half the time to
Bits 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0
• Attempts to address the inefficiency of
• It inserts extra bits into the bit stream to break up
long sequences of 0s and 1s:
– Every 4 bits of data are encoded in a 5 bit code
(See table 4B/5B encoding on p. 79)
Packets and Frames
Packet is ``generic'' term that refers to
a small block of data.
Each hardware technology uses a
different packet format.
Frame or hardware frame denotes a
packet of a specific format used on a
specific hardware technology.
• Blocks of data (frames), not bit streams, are
exchanged between nodes.
• The network adapter (NIC) enables the nodes to
• Recognizing what set of bits constitutes a frame,
and where the frame begins and ends, is the
challenge faced by the network adapter.
Need to define a standard format for data
to indicate the beginning and end of the
Header and trailer used to ``frame'' the
data (SOH and EOT)
Can choose two unused data values for
framing for example, if data is limited to
printable ASCII characters, you can use
``start of header'' (soh)
``end of text'' (eot) 44
• Framing in Practice
Incurs extra overhead - soh and eot take time to
transmit, but carry no data
Accommodates transmission problems:
Missing eot indicates sending computer crashed
Missing soh indicates receiving computer missed
beginning of message
Bad frame is discarded 45
• Suppose A wishes to transmit a frame to B
• It tells adapter to transmit a frame from the
• A sequence of bits is sent over the link
• The adapter on B then collects the sequence of
bits arriving on the link and deposits them in B‟s
Node A Adaptor Adaptor Node B
Bits flow between adaptors, frames between hosts
• There are several approaches to the framing
• Byte-Oriented Protocol (PPP)
– Sentinel Approach (frame start and end)
– Byte counting
• Bit –Oriented Approach (HDLC)
• Clock-based framing (SONET)
• One of the oldest approaches to framing is to view each
frame as a collection of bytes (characters) rather than
• BISYNC (Binary Synchronous Communication)
protocol is a byte-oriented approach developed by IBM
• DDCMP ( Digital Data communication Message
Protocol) was used in Digital Equipment‟s DECNET.
• These are examples of the sentinel approach and the
byte counting approach.
• A packet is a sequence of labeled fields.
• Above each field is a number indicating the number of
bits in the field.
• Packets are transmitted beginning with the leftmost
field. The beginning of the frame is the SYN
• Data is contained between sentinel characters – STX
(start of text) and ETX (end of text).
• The header begins with a SOH (start of header) field.
• It ends with a CRC (cyclic redundancy check) field.
BISYNC Frame Format
8 8 8 8 8 16
Header Body CRC
• ETX character may appear in the data.
• BISYNC overcomes this by using byte-stuffing
or character-stuffing by preceding the ETX
character with an escape character or DLE (data
link escape– (similar to \n or \t in programming)
• CRC (cyclic redundancy check) is used to
detect transmission errors.
The first computer communication systems were connected
by communication channels that connected exactly two
Called a mesh or point-to-point network
Had three useful properties:
– 1. Each connection was independent and different hardware could be
used. (bandwidth, modems, etc. did not have to be the same)
• Allow for greater flexibility.
– 2. The connected computers have exclusive access and could
decide how to send data across the connection. The can determine
the frame format and size, error detection mechanism, etc.
– 3. Since only two computers share the channel it is private and
Disadvantages of Point-To-Point
• 1. Number of wires grows as the number of
• 2. The total number of connections exceeds the
number of computers being connected.
• The number of connections needed is proportional
to the square of the number of computers, since the
new computer must have a connection to each of
the existing computers. So to add the Nth computer
requires N-1 new connections.
Disadvantages of Point-To-Point
• For N computers:
• Connections = (N2 - N)
• Point-to-Point Protocol (PPP) is run over dialup
modem links and is similar to BISYNC.
• Flag denotes the start-of-text character, address
and control fields contain default values.
• The protocol is the high level protocol, such as
IP or IPX.
• Payload size is usually 1500 bytes.
• Checksum field is either 2 or 4 bytes long.
PPP Frame Format
8 8 8 16 16 8
Flag Address Control Protocol Pay load Checksum Flag
• PPP framing is unusual in that several of the field
sizes are negotiable rather than fixed.
• The negotiation is conducted by the LCP (Link
Control Protocol) Protocol.
• PPP and LCP work in tandem:
– LCP sends control messages encapsulated in PPP frames
denoted by an LCP identifier
– Changes PP‟s frame format based on the information
contained in the control messages.
– LCP also establishes a link between the peers when both
sides detect the carrier signal.
• The alternative to detecting the end of a file
with a sentinel value is to include the number of
items in the file at its beginning.
• This is true in framing- the number of bytes in a
frame can be included in the header.
• DDCMP protocol uses this approach and the
COUNT field specifies the number of bytes in
the frame‟s body.
DDCMP Frame Format
8 8 8 14 42 16
Count Header Body CRC
• A transmission error could corrupt the COUNT field
and the end of the frame would be incorrectly
• A similar problem exists with the ETX field being
• This is called a framing error.
• The receiver waits for the next SYN character to
collect data for the next frame.
• A framing error may cause back-to-back frames to
be incorrectly received.
• Bit-oriented protocols are not concerned with byte
boundaries. It views the frame as a collection of bits.
• Synchronous Data Link Control ( SDLC), developed
by IBM is a bit-oriented protocol, later standardized
as the High Level Data Link Control (HDLC).
• Uses bit sequence 01111110 to denote beginning and
end of a frame.
• It is also transmitted when the link is idle.
HDLC Frame Format
8 16 16 8
sequence Header Body CRC sequence
• Networks usually insert extra bits or bytes
to change data for transmission and this is
called Data Stuffing
Bit stuffing and byte stuffing are two
techniques for inserting extra data to
encode reserved bytes
Byte stuffing translates each reserved byte
into two unreserved bytes
Can use esc as prefix, followed by x for
soh, y for eot and z for esc:
Sender translates each reserved byte into
the appropriate encoding pair of bytes
Receiver interprets pairs of bytes and
stores encoded byte in buffer
• Data still framed by soh and eot
• Anytime 5 consecutive 1‟s are transmitted, the
sender inserts a 0 before sending the next bit. On
the receiving side.
• When the receiver detects 5 consecutive 1‟s, it
assumes the next 0 was “stuffed” and removes it.
• If the next bit is a 1, either this is the end of frame
marker or an error has occurred.
• Size of the frame is dependent on the data being
sent in the frame payload.
• Third approach to framing is the Synchronous Optical
Network (SONET) standard, called clock-based framing.
• SONET was proposed by Bell Communications
Research (Bellcore) for digital transmission over an
• Addresses the framing and encoding problems as well as
multiplexing low speed links onto a high speed link.
• More complex protocol
• SONET Frame has special information that indicates
where the frame starts and ends.
• No bit stuffing is used
• How does receiver know where the frame starts and
• Frame consists of 9 rows of 90 bytes each.
– First 3 bytes of each row are overhead.
– First two bytes of frame contain special bit pattern
– Use of overhead bytes is complex
SONET STS-1 Frame
Ov erhead Pay load
First two bytes of the frame contain a special bit
pattern that indicates the start of the frame
STS-1 STS-1 STS-1
Three STS-1 frames are multiplexed onto one STS-3 frame.
SONET Frames Out of Phase
• Bit errors occur in frames due to electrical interference or
• Detecting errors is one part of the problem; correcting
errors is the other.
• What happens when an error is detected?
• Two basic approaches:
– Notify the sender that message is corrupt so the sender can
retransmit it; ( most often used in every day applications)
– Use an error-correcting code to reconstruct the correct message
External electromagnetic signals can
cause incorrect delivery of data
Data can be received incorrectly
Data can be lost
Unwanted data can be generated
Any of these problems are called
• Detecting Transmission Errors: basic idea is
to add redundant information to a frame that
can determine if errors have been introduced.
• Two-dimensional parity – based on a simple
parity bit added to balance the number of 1‟s
• Checksums – code created based on addition
• Cyclic Redundancy Check (CRC) – based
on a complex mathematical algorithm and
used in nearly all link level protocols. 75
Parity refers to the number of bits set to 1 in the
Even parity - an even number of bits are 1
Odd parity - an odd number of bits are 1
A parity bit is an extra bit transmitted with a data
item,chose to give the resulting bits even or odd
Even parity - data: 10010001, parity bit 1
• Odd parity - data: 10010111, parity bit 0
Parity and Error Detection
If noise or other interference introduces an error,
one of the bits in the data will be changed from a 1
to a 0 or from a 0 to a 1
Parity of resulting bits will be wrong
Original data and parity: 10010001+1 (even parity)
Incorrect data: 10110001+1 (odd number of 1’s)
Transmitter and receiver agree on which parity to
Receiver detects error in data with incorrect parity
Limitations of Parity Checking
Parity can only detect errors that change an
odd number of bits
Original data and parity: 10010001+1 (even
Incorrect data: 10110011+1 (even parity!)
Parity usually used to catch one-bit errors
• Two-dimensional parity involves adding on extra bit to
balance the number of 1‟s in each byte (making the total
either even or odd).
• Two-dimensional parity does a similar calculation for
each bit position across all the bytes in the frame,
resulting in adding an extra parity byte for the frame as
well as an additional parity bit for each byte.
• Two-dimensional parity catches all the one, two and 3
bit errors and most 4 bit errors.
Probability and Error Detection
All error detection methods are approximate
and aim at a low probability of accepting
• Parity can detect a single bit error, but not all
possible errors, especially where two bits ( or an
even number of bits) are changed.
Many alternative schemes exist:
Detect multi-bit errors
Correct errors through redundant information
• Checksum and CRC are two widely used
Internet Checksum Algorithm
• Simple idea: add up all the words that are to
be transmitted and then transmit the sum,
called the checksum, with the data.
• The receiver performs the same calculation
and compares it to the checksum received.
If they do not match, an error has occurred.
• Does not detect all errors…
• Algorithm is easy to implement ( See p. 94)
Sum of data in message treated as array of
Can be 8-,16- or 32-bit integers
Typically use 1s-complement arithmetic
Example -16-bit checksum with 1's
Advantages of Checksum
Fastest implementations of 16-bit checksum
use 32-bit arithmetic and add carries in at end
Easy to do - uses only addition
Small size of checksum means cost of
transmitting it is small.
• Ease of computation to create and verify
Does not detect all common errors (like
Cyclic Redundancy Check (CRC)
• CRC uses powerful mathematics ( finite
fields) to give strong protection against
common bit errors in messages that are
thousands of bytes long.
Detecting Errors with Cyclic
Consider data in message as coefficients of
Divide that coefficient set by a known
Transmit remainder as CRC
Good error detection properties
Easy to implement in hardware
The hardware used to computer a CRC is a shift
register, which act like a tunnel through which bits
move in a single file from right to left.
The shift register holds a fixed number of bits so
when a new bit moves in, another bit moves out.
The output gives the value of the leftmost bit.
When a bit changes, the output changes.
The shift register has two operations: initialize and
Initialize sets all bits to zero
Shift moves all bits one position to the left.
• X-Or and Shift Registers
• CRC Hardware consists of 3 shift registers
connected with X-Or units.
• Output from the leftmost unit goes to 3 places
simultaneously - the
• 3 X-Or units.
• To compute the CRC values in all registers are
initialized and the bits are shifted one at a time.
• One bit of the message is applied to the input unit
and all three registers perform a shift. This repeats
for each bit of the message.
CRC Calculation using Shift
x0 x 1 XOR gate x2
• After an entire message has been input,
the shift registers contain the 16 bit
CRC for the message.
• A CRC can compute more errors that a
simple checksum because:
An input bit is shifted through 3 registers;
The hardware uses feedback so that the
effect from a single bit cycles through the shift
registers more than once.
• Mathematically a CRC uses a polynomial to
divide the message:
• P(X) = x 16 + X 12 + X 5 + 1
• A message is treated as a long binary polynomial, P.
• Before transmitting, the data link layer divides P,
by a fixed polynomial function G(x), resulting in a
whole quotient Q and a remainder R/G. The
remainder is appended to the message and
• It is checked by the receiver to see if R agrees with
the locally generated value for R. (See Tanenbaum
p.208-210 for analysis)
• Frame: P: 1101011011
• Generating function G(x): 10011
• Message after appending 4 zero bits:
• Divide P by G to get remainder R:
• 1100001010 with R = 1110
• 10011 | 11010110110000
• Transmitted frame with remainder R appended:
Accuracy of CRC
• CRC actually adds 8, 16, 24, or 32 bits to
• This method detects up to 99.969% of
errors with CRC-8 and nearly 99.9%
with CRC-16 or CRC-24.
Another CRC Example
Generator 1101 10011010000 Message
See text. Pp. 94-95
Error Correction or Error
• When error is detected, frame is discarded
and resent, using bandwidth and causing
latency, waiting for its arrival.
• Error correction requires additional bit to be
sent with every frame.
• Correction is useful when
– 1) errors are probable or
– 2) the cost of retransmission is too high
• A data link level protocol that wants to deliver frames
reliably must recover from discarded ( lost) frames.
• Acknowledgements - (ack) is a small control frame
that a protocol sends back to report that it has
received the frame. If the sender does not receive a
frame in a reasonable amount of time, it retransmits.
• Timeouts -waiting a reasonable mount of time is
called a timeout
Automatic Repeat Request
• Using acknowledgements and timeout to
implement reliable delivery is called
automatic repeat request (ARQ).
• The simplest ARQ scheme is the Stop and
Stop and Wait
• After transmitting one frame the sender
waits for an ACK before transmitting the
• If it does not arrive in a reasonable time, the
sender retransmits the original frame.
Stop and Wait Algorithm
Sender Receiv er Sender Receiv er
a) Arrives c)ACK lost
Sender Receiv er Sender Receiv er
b) Frame lost ACK
e d) Timeout
• If a frame is late arriving another frame might
be retransmitted, resulting in duplicate frames.
• To correct this, a header usually contains a
sequence number (0,1), which is used for
• When sender retransmits frame 0, the receiver
can see that it is a second copy of frame 0, not
Timeline for Stop and Wait
Sender Receiv er
Sliding Window Protocol
Allows sender to transmit multiple packets before
receiving an acknowledgment
Number of packets that can be sent is defined by the
protocol and called the window
As acknowledgments arrive from the receiver, the
window is moved along the data packets; hence
Sliding window protocol can increase throughput
Sliding Window Protocol
• Sliding window algorithm allows the transmission of
a frame at about the same time as the ACK arrives.
• Sender assigns a sequence number (SeqNum) to
each frame and maintains 3 variables:
– Send window size (SWS) - # of unacknowledged frames
that sender can transmit
– Last acknowledgement received (LAR)
– Last frame sent (LFS)
– LFS - LAR <= SWS
Timeline for Sliding Window
Sender Receiv er
• When ACK arrives, the sender moves LAR to the right,
allowing the sender to transmit another frame.
• Sender buffers up to SWS (send window size) frames (in
case they need to be retransmitted).
• It also associates a timer with each frame it transmits, so
it can retransmit if an ACK is not received in time.
• LAR – Last Acknowledgement Received
• LFS – Last Frame Sent
• See pp. 105-115 for details and for interactive demo see
Sliding Window on Sender
• The receiver maintains 3 variables:
– The receive window size ( RWS) – the upper
bound on the number of out of order frames
that the receiver can accept.
– The sequence number of the largest acceptable
Sliding Window on Receiver
Sliding Window Algorithm
• When frame with sequence number SeqNum arrives, the
receiver does the following:
• If SeqNum <= LFR or SeqNum >LAF then frame is
outside the window and is discarded.
• If LFR < SeqNum <= LAF, then it is accepted.
• SeqNumToAck is largest not yet acknowledged
• Receiver acknowledges receipt of SeqNumToAck and
sets LFR = SeqNumToAck
• LAF=LFR +RWS
Comparison of Sliding Window and Stop & Wait
Frame Order and Flow Control
• Sliding Window can be used for:
– To reliably deliver frames on an unreliable link;
– To preserve the order in which the frames are
transmitted, using the sequence numbers;
– To support flow control- a feedback mechanism
by which the receiver is able to throttle the sender
to keep it from overrunning the sender.
Concurrent Logical Channels
• ARPANET Data Link protocol, or concurrent
logical channels, is an alternative to sliding
window protocol and can keep pipe full while
using the simple stop and wait protocol.
• It multiplexes several logical channels onto a
single point-to-point link and runs the stop and
wait protocol on each.
• The Ethernet is the most successful local area
• 1973- Developed at Xerox Park by Bob Metcalfe
and David Boggs, it is a general form of the Carrier
Sense Multiple Access with Collision Detection
• Based on Aloha, early packet network developed at
the University of Hawaii to support communication
across the islands.
•Developed the Ethernet with David Boggs
• 1979 Founded 3COM Corporation, which
makes wirelesss access points
• Founded Infoworld
•Authored numerous books and articles
•Recipient of many awards including the
National Medal of Technology (2005) and
induction into the National Inventors Hall of
Fame for his contributions to the “welfare of
•Spoke at the CCSCE Conference at SJC,
October, 2007 “ETHERNET IS THE
ANSWER; WHAT IS THE QUESTION?”
• Digital Equipment Corporation (DEC), Intel and
Xerox joined to form the 10 Mbps Ethernet
standard in 1978.
• This standard formed the basis of the IEEE
• It has recently been extended to include a 100
Mbps version, called Fast Ethernet and a 1000
Mbps version called Gigabit Ethernet.
• The Ethernet is a multiple-access network meaning that
a set of nodes send and receive frames over a shared link.
• The “carrier sense” means that the nodes can distinguish
between a busy and idle link.
• “Collision detect” means that a node listens as it
transmits and can detect when a transmitting frame has
interfered (collided) with a frame transmitted by another
• When a collision occurs, both nodes back off, wait a
random amount of time and then attempt to send again.
• An Ethernet is typically implemented on coaxial
cables of up to 500 meters.
• (On older versions, called thick-net or 10Base5, a
transceiver connected hosts to the cable and then
to the network adapter or NIC card.)
• Newer versions, 10Base2, connect directly
through the NIC, where all the logic is contained.
• 10BaseT, for twisted pair, uses Cat 5 cable and is
limited to 100meter.
• “Base” refers to the baseband system. 121
Ethernet Transceiver and Adapter
Thick Ethernet Wiring
Uses thick coax cable
AUI cable (or transceiver or drop cable connects from NIC to transceiver
AUI cable carries digital signal from NIC to transceiver
Transceiver generates analog signal on coax
• Wires in AUI cable carry digital signals, power and other control signals
Uses thin coax that is cheaper and easier to install than thick Ethernet coax
Transceiver electronics built into NIC; NIC connects directly to network
• Coax cable uses BNC connector
Coax runs directly to back of each connected computer
• T connector attaches directly to NIC
Useful when many computers are located close to each other
May be unreliable - any disconnection disrupts entire net
Twisted Pair Ethernet
• Variously called 10Base-T, twisted pair or TP
• Replaces AUI cable with twisted pair cable
• Replaces thick coax with hub
• Multiple Ethernet segments are joined by repeaters,
which forward a digital signal.
• No more than 4 repeaters may be connected to any pair
of hosts, limiting an Ethernet to a maximum of 2500
• An Ethernet can support a maximum of 1024 hosts.
• Any signal placed on the Ethernet is broadcast to all
• Terminators are attached to the end of each segment to
absorb the signal.
• The Ethernet uses Manchester encoding. 127
The common 10BaseT configuration is to have several point-
to-point segments connected to a hub or switch. This is also
true for 100Mbps Ethernet, but not for Gigabit Ethernet.
• On an Ethernet, all hosts are competing for
access to the same shared link.
• The media access control (MAC) algorithm
controls access to the link.
• It is implemented in hardware on the
Network Adapter Cards (NIC)
CPU can't process data at network speeds
Computer systems use special purpose
hardware for network connection
Typically a separate card in the backplane
Network adapter card or network interface card
Connector at back of computer then accepts
cable to physical network
Network Interface Hardware
The sockets for the NIC cards are usually
located near the back of the cabinet and a
network cable attaches to the end of the NIC.
NIC Cards and Wiring
NICS can provide all three connection technologies
Ethernet Frame Format
•Taken from the Digital-Intel-Xerox Ethernet Standard
•Each Ethernet frame is defined by the following format where the
preamble allows the receiver to synchronize with the signal.
•Both source and destination hosts are identified by addresses
•Packet type identifies the protocol
•Each packet can contain up to 1500 bytes of data (46bytes minimum)
•32-bit CRC for error detection
64 48 48 16 32
Preamble Dest Src Ty pe Body CRC
• Each host on an Ethernet has a unique Ethernet
• Technically the address belongs to the adaptor, not to
the host and is usually burned into the NIC card
• Each NIC card has a unique prefix and makes sure it
assigns unique addresses
• Addresses can be assigned statically, dynamically or
can be configurable and assigned by the network
Static: Hardware manufacturer assigns permanent Manufacturer must ensure
address to each interface - doesn't change every interface has a unique
Configurable: Address can be set by end user, either System administrators must
through switches or jumpers, coordinate to avoid conflict
or electronically ( EPROM) or
Dynamic: Interface automatically assigns Automatic scheme must be
hardware address each time it is reliable to prevent conflicts
powered up (tries random number)
Addressing Scheme Comparison
Addressing Scheme Advantages Disadvantages
Static: Ease of use and permanence Less flexibility
Configurable: Small permanent addresses Requires initial
hardware easily replaced configuration
Dynamic: Smaller addresses and Vendors do Lack of permanence
not have to coordinate to assign and potential conflict
• Each frame on an Ethernet is received by every
• Each adaptor recognizes the frames addressed to it and
passes those frames to it host. These are unicast
• A broadcast address, consisting of all 1‟s, is
recognized by all NIC cards.
• A multicast address, with first bit set to 1, is
recognized by a subset of NIC cards.
• Running in promiscuous mode, means that a NIC card
will pass all messages to its host.
Ethernet Address Summary
• An Ethernet adaptor receives all frames and
– Frames addressed to its own address
– Frames addresses to the broadcast address
– Frames addressed to a multicast address, if it is
part of that subset
– All frames if it is in promiscuous mode
• Receiver side is simple.
• Sender side implements Ethernet protocol.
• When NIC has frame to send and the line is busy, it waits
for the line to become idle.
• Because there is no centralized control, two (or more)
adaptors may send at once, causing a collision. When a
collision is detected, a jamming sequence is sent to stop
• The adaptors wait a random amount of time before trying
• Each time there is a collision, the delay interval doubles –
called exponential backoff. 142
Worst Case Scenario
Success of the Ethernet
• Extremely easy to administer, no switches
to fail, no routing or configuration tables
• Easy to add additional hosts
• It is inexpensive, since cables are relatively
• Most new LAN switching technology is
based on the Ethernet
Token Rings (802.5, FDDI, RPR)
• Token Rings are the other significant class of
shared media networks.
• IBM Token Ring, was the original – followed by
the IEEE 802.5 standard, which was nearly
identical, and finally the newer FDDI (Fiber
Distributed Data Interface) Standard, which is
declining in use.
• Resilient Packet Ring or RPR (802.17) is nearly
• Token ring Network consists of a set of nodes connected
in a ring.
• Data flows in a particular direction around the ring so
that each node receives a packet from its upstream
neighbor and forwards it to its downstream neighbor.
• Similar to Ethernet in that it involves an algorithm which
controls when a node can transmit, and all nodes see all
• Sending a message differs from that of the Ethernet.
Token Ring Network
Implementing a Token Ring
• Access to the network is controlled by a token.
• A „token” is a special sequence of bits, which
circulates around the ring.
• Each node receives the token, and when it has
the token, that node may send a packet and then
forward the token to the next node in a round-
• This is fair, since each node gets a turn to send.
• Any link or node failure makes the whole network
• When relay is open, the station is included in the ring; if
the relay closes, the ring bypasses the node.
• Several relays are packed into a single multi-station
access unit ( MSAU) – required by IBM token ring.
• Data rate is 4 or 16 Mbps and uses Manchester
• Twisted pair is required for IBM and not specified for
Relay on Token Ring
From prev ious To next From prev ious To next
host host host host
a) Relay open – host active b) Relay closed-host bypassed
Multimedia Access Unit
From prev ious
Used only in electrical rings to compensate for node failure.
Token Ring Media Access
• Network adapter contains a receiver, transmitter, and one
or more bits of data storage.
• When no node is sending, the token circulates.
• A sending station, “seizes” the token and sends data.
Token holding time (THT) is the time the node can hold
the token. Default THT = 10ms.
• 802.5 also supports a strict priority scheme
• Sending node can reinsert token immediately following
its frame (early) or after the frame circles the ring and is
removed (delayed) release.
Token Token Fra
a) early b) delayed 154
Token Ring Maintenance
• Token rings have a station designated as the monitor.
• Procedures are defined to elect a monitor when the ring is
first connected or when the monitor fails.
• Monitor must make sure there is always a toke in the ring
and that there is sufficient delay.
• It also checks for corrupted or orphaned frames.
• It also checks for “dead” stations.
Token Ring Frame Format
•Uses differential encoding codes in start and end delimiters.
•Access control byte includes the frame priority
•Frame control byte identifies the higher-level protocol
•Like Ethernet, addresses are 48 bytes long
•Includes a 32- bit CRC and A and C bits for reliable delivery
8 8 8 48 48 Variable 32 8 8
Start Access Frame Dest Src Body Checksum End Frame
delimiter control control addr addr delimiter status
• Fiber Distributed Data Interface (FDDI) is similar to
802.5 and IBM token ring.
• Significant differences are that it runs on fiber, not
copper and makes use of some newer innovations
• It is usually a dual ring – where each ring transmits
in the opposite direction.
• The second ring is only used if the primary ring fails
and there is a “loop back” toform a complete ring.
• Instead of a monitor all nodes participate equally in
maintaining the ring.
Dual Fiber Ring
a) Normal operation b) Failure of primary ring
• FDDI network consists of a dual ring- two rings that
transmit data in opposite directions. The second ring is
only used if the primary ring fails.
• Nodes attach to the ring with a single cable called single
attachment stations (SAS). A concentrator attaches
several SASs to the ring.
• FDDI is a 100 Mbps network and is limited to 500 hosts.
• FDDI uses 4B/5B encoding
• Token holding algorithms are more complex than 802.5
FDDI Frame Format
•Similar to 802.5 with these exceptions:
•Uses 4B/5B encoding instead of Manchester
•Has a bit in the header to distinguish synchronous
from asynchronous traffic
•Lacks the access control bits present in 802.5
8 8 48 48 32 8 24
Start of Control Dest Src Body CRC End of Status
f rame addr addr f rame
Resilient Packet Ring (RPR)
• Relatively recent technology – IEEE (802.17)
• Resiliency- the ability to recover quickly from a
link or node failure was its key design goal.
• Other goals were bandwidth efficiency and
Quality of Service (QoS) support.
• Like FDDI it uses 2 rings, but unlike FDDI ,
both are used for normal service.
• Uses buffer insertion instead of a token.
• Used in MAN‟s but “metro Ethernet” is
• Wireless is the rapidly evolving technology for
connecting communication devices:
– Wi-Fi -802.11
– Wi-MAX – 802.16
– and 3G cellular wireless
• They differ in how much bandwidth they can
provide, how far apart nodes can be and which part
of the electromagnetic spectrum they use. 162
BlueTooth Wi-Fi WiMAX 3G Cell
Link 10m 100m 10 km
Bandwidth 2.1 54 Mbps 70 Mbps 384+Kbps
Mbps Shared Shared Per
Use/link To Notebook Building Phone to
notebook to base to tower tower
Anology USB Ethernet Coaxial DSL
• The most widely used wireless links are
asymmetric – the two endpoints are different kinds
• One endpoint acts as a base station and has no
mobility and is wired to the Internet or other
• The client not is often mobile and relies on its link
to the base station to communicate with other
• Notice that wireless naturally supports point
to multipoint communications becaues
radiio waves sent out by one device can be
simultaneously received by many devices
• However communication between client
nodes is routed through the base node
Example Wireless Network
A B C D
Levels of Mobility
• No mobility- when a receiver must be in a
fixed location to receive a directional
transmission from a base station (true of the
• Mobility within the range of a base as in the
case of Bluetooth
• Mobility between bases as is the case with
cell phones and Wi-Fi
Mesh or Ad hoc Network
• A wireless mesh is an alternative topology
• Nodes are peers ( there is no base station)
• Messages are forwarded through a chian of
peers as long as each peer is within range of
the preceeding node.
• This allows a wireless portion of a network
to extend beyond the limited range of a
• Bluetooth provides very short range communication
between mobile phones, PDAs, notebook computers
and other peripheral devices.
• It is a convenient alternative to connecting with a wire.
• It has a range of only 10 m and operates at 2.45 GHz
• Because devices usually blong to an individual or
group it is often called a PAN ( personal area
• Network connects up to 7 devices to a master and is
called a piconet.
Wireless ( 802.11)
• Like Ethernet and Token Ring, 802.11 is
designed for use in a limited geographical
area (homes, office buildings, campuses).
• Primary challenge is to mediated shared
access through space.
• 802.11 supports additional features (time-
bound services, power management and
• 802.11 was designed to run over three different media-
two based on spread spectra and one based on diffused
• The radio based versions run at 11 and 54 Mbps.
• A chipping sequence spreads the signal over a wide
frequency using a random sequence and makes the
signal look like noise to any receiver that does not
know the sequence.
• Infrared signals are diffused so the sender and receiver
do not need to be aimed at each other, but must be
within buildings. 174
4-Bit Chipping Sequence
0 Data stream: 1010
0 Random sequence: 0100101101011001
0 XOR of the two: 1011101110101001
• The protocol is more complex than Ethernet, since
all nodes are not always within reach.
• Consider 4 nodes A,B,C,D that are able to send to
a node to its immediate left or right,so B can reach
A and C but not D.
• If A and C both send to B they collide, but are
unaware of each other and are called hidden
Hidden node problem
A & C can collide at B
• Another related problem is the exposed
• Suppose B is sending to A and C is aware
of this. It is a mistake for C to think it
• It is not a problem for C to transmit to D
because it will not interfere with A‟s ability
to receive from C
Exposed node problem
B can transmit to A and C can transmit to D
• 802.11 addresses these two problems with a Multiple
Access Collision Avoidance algorithm. (MACA)
• Sender and receiver exchange control frames before
• Sender sends a request to transmit (RTS) frame.
• Receiver relies with a clear to send (CTS) frame.
• Receiver also sends an ACK after successfully receiving
the frame. All nodes must wait for this before trying to
• CTS frames can collide and both must wait before
transmitting, similar to Ethernet backoff.
• Since an advantage of a wireless system is that
nodes are free to move around, reachable nodes
may change over time.
• Some nodes may roam and some, called Access
Points (AP) are connected to the network
infrastructure by a distribution system.
• Distribution system runs at layer 2 of the ISO
architecture and does not depend on higher layers.
Access Points connected to a
Distribution sy stem
A B G
Each node associates itself with one access point.
• For node A to communicate with node E
• A first sends a frame to its access point AP-1,
which forwards the frame across the
distribution system to AP-3, which finally
transmits the frame to E
Selecting an AP
Technique called scanning:
1. The node sends a Probe frame
2. All APs within reach reply with a Probe Response
3. The nodes selects one of the access points and sends
that AP an Association Request Frame.
4. The AP replies with an Association Response Frame
A node uses this when it joins the network and when it
becomes unhappy with current AP ( weak signal, etc.)
Active and Passive Scanning
• After a node has probed the network, it associates
itself with an Access Point. This is called active
• APs also periodically send a Beacon Frame that
advertise the capabilities of the Access Point,
including transmission rates. A node can change to
this point by sending an Association Request
Frame to the access Access Point . This is called
Distribution sy stem
A B G
802.11 Frame Format
48 bit Source and Destination addresses ( addr1, addr2)
Two additional address fields depends on the ToDS, From DS
Control fields: Type, ToDS, FromDS
Type fields indicates whether the frame is RTS, CTS or data
CRC for error detection
16 16 48 48 48 16 48 0Ð18,496 32
Control Duration Addr1 Addr2 Addr3 SeqCtrl Addr4 Pay load CRC
802.11 Frame Format
• WiMAX stands for Worldwide Interoperability for
• It is a metropolitan area network(MAN) with a
range of 1-30 miles.
• It odes not yet inclued mobility, but that will be
added as 802.16e
• Its clients are multiplexers for a building and to
adapt to different frequencies it uses different
physical layer protocols.
Cell Phone Technologies
• Frequency bands vary around the world:
– Europe 900 and 1800 MHz bands
– North America 850 and 1900 MHz bands
• Cost is high to users because of licensed spectrum
• Incompatible cell phone standards
• Phones designed to carry voice now carry video,
and audio which require high bandwidth
Cell Phone Technologies
• Relies on use of base stations that are part
of a wired network
• Geographic area served by the base
station‟s antenna is called a cell
• Cells overlap and a base station can serve
more than one cell using multiple antennae.
• As a phone begins to leave a cell, it moves into an
area of overlap with other cells
• The current base station senses the weakening
signal and give control to whichever base station
is receiving the stronger signal from it.
• If a phone is receiving a call, the call must be
transferred over to the new base station in what is
called a handoff.
Cell Phone Generations
• 1G – analog
• 2G – digital -most of the current technology, some
are referred to as 2.5 G – not quite third
generation, but more advanced. These are GSM-
Global System for Mobile Communications
• 3G – Based on CDMA (code division Multiple
• Satphones- class of phones that are not cellular,
but are satellite phones
• Five key problems so that links can exchange information:
• Encoding problem for physical links carrying signals;
• The framing problem determines how to package bits into
• The error detection problem using CRC, parity, and
• Problem of recovering lost frames discarded because of
• Problem of mediating access on shared media (Ethernet,
token ring and wireless)
• Metcalfe, Robert. and Boggs, David,
“Ethernet: Distributed Packet Switching For
Local Computer Networks”,
Communications of the ACM, 19(7):395-
403, July, 1976
• http://standards.ieee.org/ for status of IEEE
• See p. 145 for more complete list…