You are on page 1of 67

Unit I

Introduction to networks network architecture network performance Direct


link networks encoding framing error detection transmission Ethernet
Rings FDDI - Wireless networks Switched networks bridges
Introduction to networks
A network is a set of devices (often referred to as nodes) connected by
communication
links. A node can be a computer, printer, or any other device capable of sending and/or
receiving data generated by other nodes on the network.
A network is a group of connected communicating devices such as computers
and printers.
A network is a combination of hardware and software that sends data from one
location to another.
The hardware consists of the physical equipment that carries signals from one
point of the network to another. The software consists of instruction sets that
makepossible the services that we expect from a network.

Type of Connection
A network is two or more devices connected through links. A link is a
communications pathway that transfers data from one device to another.
There are two possible types of connections: point-to-point and multipoint.

Point-to-Point:
A point-to-point connection provides a dedicated link between two devices.
The entire capacity of the link is reserved for transmission between those two devices.
Multipoint:

A multipoint (also called multidrop) connection is one in which more than two
specific devices share a single link
In a multipoint environment, the capacity of the channel is shared, either
spatially or temporally. If several devices can use the link simultaneously, it is a spatially
shared connection. If users must take turns, it is a timeshared connection.

Physical Topology
physical topology refers to the way in which a network is laid out physically.:
two or more devices connect to a link; two or more links form a topology.
The topology of a network is the geometric representation of the relationship of
all the links and linking devices (usually called nodes) to one another.
There are four basic topologies possible: mesh, star, bus, and ring.

Mesh
In a mesh topology, every device has a dedicated point-to-point link to every
other device.
The term dedicated means that the link carries traffic only between the two
devices it connects.
To find the number of physical links in a fully connected mesh network with n
nodes, we first consider that each node must be connected to every other node.
Node 1 must be connected to n - I nodes, node 2 must be connected to n - 1
nodes, and finally node n must be connected to n - 1 nodes.
We need n(n - 1) physical links.
However, if each physical link allows communication in both directions (duplex
mode), we can divide the number of links by 2.
In other words, we can say that in a mesh topology, we need
n (n -1) /2 duplex-mode

links.

To accommodate that many links, every device on the network must have n 1
input/output (VO) ports.

Fully connected mesh topology

Advantages

Dedicated links guarantees that each connection can carry its own data load,
thus eliminating the traffic problems that can occur when links must be shared

by multiple devices mesh topology is robust


If one link becomes unusable, it does not incapacitate the entire system.
Third, there is the advantage of privacy or security

When every message travels along a dedicated line, only the intended recipient sees it.
Physical boundaries prevent other users from gaining access to messages.
Disadvantages

Installation and reconnection are difficult


Sheer bulk of the wiring can be greater than the available space
Hardware required to connect each link (I/O ports and cable) can be
prohibitively expensive.

One practical example of a mesh topology is the connection of telephone regional offices
in which each regional office needs to be connected to every other regional office

Star Topology

Star topology with four stations

In a star topology, each device has a dedicated point-to-point link only to a


central controller, usually called a hub.
Unlike a mesh topology, a star topology does not allow direct traffic between devices.
The controller acts as an exchange: If one device wants to send data to another, it sends
the data to the controller, which then relays the data to the other connected device
Advantages

A star topology is less expensive than a mesh topology robustness. If one link
fails, only that link is affected. All other links remain active.
Disadvantages

Dependency of the whole topology on one single point, the hub. If the hub goes
down, the whole system is dead.

Although a star requires far less cable than a mesh, each node must be linked to a
central hub. For this reason, often more cabling is required in a star than in some other
topologies (such as ring or bus).

Bus Topology
A bus topology, on the other hand, is multipoint. One long cable acts as a
backbone to link all the devices in a network
A bus topology connecting three stations

Nodes are connected to the bus cable by drop lines and taps.
A drop line is a connection running between the device and the main cable. A
tap is a connector that either splices into the main cable or punctures the sheathing of
a cable to create a contact with the metallic core. As a signal travels along the backbone,

some of its energy is transformed into heat. Therefore, it becomes weaker and weaker as
it travels farther and farther. For this reason there is a limit on the number of taps a bus
can support and on the distance between those taps.
Advantages

Ease of installation
Disadvantages

Difficult reconnection and fault isolation.


A bus is usually designed to be optimally efficient at installation. It can therefore

be difficult to add newdevices.


Signal reflection at the taps can cause degradation in quality.
A fault or break in the bus cable stops all transmission, even between devices on
the same side of the problem.

Ring Topology
In a ring topology, each device has a dedicated point-to-point connection
with only the two devices on either side of it.
A signal is passed along the ring in one direction, from device to device, until it
reaches its destination.
Each device inthe ring incorporates a repeater. When a device receives a signal
intended for another device, its repeater regenerates the bits and passes them along
A ring topology connecting six stations

Advantages

A ring is relatively easy to install and reconfigure.

Each device is linked to only its immediate neighbors (either physically or logically). To
add or delete a device requires changing only two connections.

The only constraints are media and traffic considerations (maximum ring length

and number of devices).


In addition, fault isolation is simplified.

Generally in a ring, a signal is circulating at all times. If one device does not

receive a signal within a specified period, it can issue an alarm. The alarm alerts the
network operator to the problem and its location.
unidirectional traffic can be a disadvantage.

In a simple ring, a break in the ring (such as a disabled station) can disable the
entire network. This weakness can be solved by using a dual ring or a switch capable
of closing off the break.

Hybrid Topology
A network can be hybrid. For example, we can have a main star topology
with each branch connecting several stations in a bus topology
A hybrid topology: a star backbone with three bus networks

Categories of Networks
The category into which a network falls is determined by its size. A LAN
normally covers an area less than 2 mi; a WAN can be worldwide. Networks of a size in
between are normally referred to as metropolitan area networks and span tens of miles.

Local Area Network


Usually privately owned and links the devices in a single office, building, or
campus.
Depending on the needs of an organization and the type of technology used, a LAN can
be as simple as two PCs and a printer in someone's home office; or it can extend
throughout a company and include audio and video peripherals. Currently, LAN size is
limited to a few kilometers.
An isolated IAN connecting 12 computers to a hub in a closet

Designed to allow resources to be shared between personal computers or


workstation
The resources to be shared can include hardware (e.g., a printer), software (e.g., an
application program), or data.
A common example of a LAN, found in many business environments, links a
workgroup of task-related computers, for example, engineering workstations or
accounting PCs.
One of the computers may be given a large capacity disk drive and may become a
server to clients. Software can be stored on this central server and used as needed by the
whole group.
In this example, the size of the LAN may be determined by licensing restrictions on
the number of users per copy of software, or by restrictions on the number of users licensed
to access the operating system.
In addition to size, LANs are distinguished from other types of networks by their
transmission media and topology. In general, a given LAN will use only one type of
transmission medium. The most common LAN topologies are bus, ring, and star.
Early LANs had data rates in the 4 to 16 megabits per second (Mbps) range.

Wide Area Network


Provides long-distance transmission of data, image, audio, and video
information over large geographic areas that may comprise a country, a continent, or
even the whole world.
A WAN can be as complex as the backbones that connect the Internet or as simple as
a dial-up line that connects a home computer to the Internet
The switched WAN connects the end systems, which usually comprise a router
(internetworking connecting device) that connects to another LAN or WAN.

The point-to-point WAN is normally a line leased from a telephone or cable TV


provider that connects a home computer or a small LAN to an Internet service provider (lSP).
This type of WAN
is often used to provide Internet access.

Switched WAN

Example of a switched WAN

X.25, a network designed to provide connectivity between end users.


Asynchronous transfer mode (ATM) network, which is a network with fixed-size
data unit packets called cells.

Metropolitan Area Networks


A metropolitan area network (MAN) is a network with a size between a LAN
and a WAN. It normally covers the area inside a town or a city.
It is designed for customers who need a high-speed connectivity, normally to the
Internet, and have endpoints spread over a city or part of city.
Example of a MAN

Part of the telephone company network that can provide a high-speed DSL line to
the customer.

Cable TV network that originally was designed for cable TV, but today can also be used
for high-speed data connection to the Internet.

1.3 Network Architecture- OSI Architecture- Internet Architecture


Network architecture that guides the design and implementation of networks.
Two of the most widely referenced architectures are
The OSI architecture and the Internet architecture.

1.1.

Layering

In OSI Architecture, there are 7 layers which can be combined into basic four layers
as shown in the below figure.

Example of a layered network system


1.2.1

Layering Characteristics

Each layer relies on services from layer below and exports services to layer above
Hides implementation - layers can change without disturbing other layers
1.2.2

1.2.

Features of Layering
First, it decomposes the problem of building a network into more manageable
components, rather than implementing a monolithic piece of software
Second, it provides a more modular design.
Protocol

Building blocks of a network architecture


Each protocol object has two different interfaces
service interface: defines operations on this protocol
peer-to-peer interface: defines messages exchanged with peer
Term protocol is overloaded
specification of peer-to-peer interface
module that implements this interface
Each protocol defines two different interfaces as shown in below figure.

Service and peer interfaces


1.4 OSI Architecture
The ISO Open Systems Interconnection (OSI) architecture is illustrated in below
figure which defines a partitioning of network functionality into seven layers, where one
or more protocols implement the functionality assigned to a given layer.
Note to Remember: PDNTSPA - People Do Need Touch Steves Pet Alligator

Starting at the bottom and working up, the physical layer handles the transmission
of raw bits over a communications link.
The data link layer then collects a stream of bits into a larger aggregate called a
frame.
The network layer handles routing among nodes within a packet-switched
network. At this layer, the unit of data exchanged among nodes is typically called
a packet rather than a frame.

The lower three layers are implemented on all network nodes, including switches
within the network and hosts connected along the exterior of the network.
The transport layer then implements what we have up to this point been calling a
process-to-process channel. Here, the unit of data exchanged is commonly called
a message rather than a packet or a frame.
The session layer performs the synchronization.
The presentation layer is concerned with the format of data exchanged between
peers
The application layer where application programs are running which interacts
with the user and receives the message from the user.

Note:
Most networked devices have (at least) two addressesthe hardware or network
address (also known as a MAC address) and the IP address.

a MAC address and an IP address for the wireless network adapter, and

a MAC address and an IP address for the wired network adapter (for plugging
into an Ethernet wall port).

The MAC, or Network, Address


The MAC address, also known as a network card address or physical address,
uniquely identifies your computer or device to the any type of network.

Note that the Network Card Address/Physical Address/MAC Address is an


alphanumeric value, which is listed in six groups of two hexadecimal digits, separated
by hyphens (-) or colons (:),
e.g., 01-2B-C5-67-89-ab or 01:2B:C5:67:89:ab.

The hardware MAC address is required to register a device on the any type of
network, and must be entered before your device can connect to the University
network. Knowing it can be very useful in network troubleshooting.

Definition:

A network address serves as a unique identifier for a computer on a network.

When set up correctly, computers can determine the addresses of other computers on
the network and use these addresses to send messages to each other.

The Internet Protocol (IP) addresses consist of four bytes (32 bits) that uniquely
identify all computers on the public Internet.

The Media Access Control (MAC) address. MAC addresses are six bytes (48 bits)
that manufacturers of network adapters burn into their products to uniquely identify
them.
Physical Layer Responsibilities
(Made up of H/W)
Responsible for transmitting individual bits from one node to the next
1. Defines the characteristics of interfaces and transmission media
2. Defines the type of transmission media
3. To transmit this stream of bits (0s and 1s), it must be encoded into
signals.
Physical layer only defines the type of representation of bits.
4. Internet Architecture
5. Defines the transmission rate. i.e., number of bits per second.
6. Sender and receiver machine clock must be adjusted in order to have a
same bit rate at both the sender and receiver side.
Data Link Layer Responsibilities
(Made up of H/W and S/W)
Responsible for transmitting frames from one to the next
1. Framing:
Divides the stream of bits into frames (splits the more num. of small
data units).
The complete (Larger size) informations divided or splits the more
num. of small
data units and each has its own header and tailor with meaningful
information.
2. Physical addressing:
It adds the header information to the frame.

The header information is the address of sender and receiver.


3. Flow control:
It provides the flow control mechanism.
The data rate received by the receiver < the data rate sent by the sender
4. Error control:
It provides the mechanism to find the damaged /lost/duplication of data
in the
transmission.
The error control information is usually added to trailer part of the
message
5. Access control:
It determines which device can use the medium when there are more
number devices involved in the transmission.
Network Layer Responsibilities
(Made up of H/W and S/W)
Source-to-destination delivery, possibly across multiple networks
1. Logical addressing:
Adding the network address in the header.
2. Routing:
Transmitting the packets to the correct destination in the network.
3. Forwarding:
The data packets are forwarded from network layer to transport layer.

Transport Layer Responsibilities


(Made up of H/W and S/W)
Delivery of message from one process (running programs) to another
1. Process-to-process delivery of entire message:
Delivering the message is not only to the correct destination but also to
the specific
Process.
2. Port addressing:
Inserting the port address in the header
3. Segmentation and reassembly:
Dividing the message into segments and each segment will have
sequence number
which is used by the transport layer at the receiver machine for
reassembling it.
4. Connection control:

It may may be of any one of the two service:


Connectionless or connection-oriented
5. End-to-end flow control
6. End-to-end error control
Session Layer Responsiblities
(Made up of S/W)
The services of this layer are
1. Dialogue discipline :
This may be full duplex or half duplex.
2. Recovery:
It has checkpointing concept. So, if some failure happens between
checkpoints then
session layer retransmit all data since the last checkpoint.
3. Grouping:
Defines the groups of data.
Presentation Layer Responsiblities
(Made up of S/W)
The services of this layer are
1. Data Compression :
The data is compressed by using any one of the compression method.
2. Encryption:
The groups of data is encypted by using a secret key with the
encryption algorithms.
3. Data translation:
The data is translated by using some mechanisms.
4. Decryption:
The encrypted data can be decrypted by using decryption algorithms with
a secret key.
Application Layer Responsibilities
(Made up of S/W)
Responsible for providing services to the user
1. Enables user access to the network
2. User interfaces and support for services such as
i. E-Mail services forwarding and storage.
ii. File transfer and accesses to and from the remote host.
iii. Remote log-in: User can enter into a remote system and have the
resources.
iv. WWW Services.
1.5 Internet Architecture

The Internet architecture, which is also sometimes called the TCP/IP


architecture

a four-layer model

At the lowest level are a wide variety of network protocols, denoted NET1,
NET2, and so on.
In practice, these protocols are implemented by a combination of hardware
(e.g., a network adaptor) and software (e.g., a network device driver).

The second layer consists of a single protocolthe Internet Protocol (IP). This is
the protocol that supports the interconnection of multiple networking
technologies into a single, logical internetwork.

The third layer contains two main protocolsthe Transmission Control Protocol
(TCP) and the User Datagram Protocol (UDP).

TCP provides a reliable byte-stream channel, and UDP provides an unreliable


datagram delivery channel

Running above the transport layer are a range of application protocols, such as
FTP, TFTP (Trivial File Transport Protocol), Telnet (remote login), and SMTP
(Simple Mail Transfer Protocol, or electronic mail), that enable the
interoperation of popular applications.

Advantages of using IP Arch. over OSI Arch.

The Internet architecture does not imply strict layering. That is, the application is
free to bypass the defined transport layers and to directly use IP or one of the
underlying networks
Looking closely at the internet protocol graph, it has an hourglass shapewide at
the top, narrow in the middle, and wide at the bottom. That is, IP serves as the
focal point for the architectureit defines a common method for exchanging
packets among a wide collection of networks.

It has the ability to adapt rapidly to new user demands and changing technologies.

1.6 ISO OSI Model Vs TCP/IP Model


OSI MODEL

TCP/IP MODEL

Seven layers:
Physical layer, Data link layer, Network
layer, Transport Layer, Session layer,
Presentation layer, Application layer

Four layers:
Network layer, Transport layer, IP layer,
Application layer

Each layer defines a family of functions


and the functions are interdependent

Each layer defines number of protocols


and they are not dependent

Widely used in Local Area Network

Used in internet

1.7 Network Performance

Bandwidth (also called as throughput)


Bandwidth is the amount of data that passes through a network connection over
time (in a certain period of time) as measured in bps (bits per second).
Throughput = Transfer Size / Transfer Time
For example, a standard dialup modem supports 56 Kbps of peak bandwidth. On a 10
Mbps network, for example, it takes 0.1 microseconds (us) to transmit each bit.
Numerous tools exist for administrators to measure the bandwidth of network
connections. On LANs (local area networks), these tools include netperf and ttcp.
Likewise a traditional Ethernet network theoretically supports 100 Mbps of bandwidth,
but this maximum amount cannot reasonably be achieved due to overhead in the
computer hardware and operating systems.
What Is Network Latency (also called as delay)
The term latency refers to any of several kinds of delays typically incurred in
processing of network data.
A so-called low latency network connection is one that generally experiences small delay
times, while a high latency connection generally suffers from long delays.
Network tools like ping tests and traceroute measure latency by determining the time it
takes a given network packet to travel from source to destination and back, the so-called

round-trip time (RTT). Round-trip time is not the only way to specify latency, but it is the
most common.
Latency = Propagation+Transmit+Queue
Propagation = Distance / Speed of Light
Transmit = Size / Bandwidth
Light travels across different medium at different speeds: It travels at 3.0 x 108
Where Distance is the length of the wire over which the data will travel,
SpeedOfLight is the effective speed of light over that wire.
1.8 Links
Links are medium that connects nodes to form a computer network.
Types of Links

The communication between the nodes is either based on a point-to-point model or a


Multicast model. In the point-to-point model, a message follows a specific route across
the network in order to get from one node to another. In the multicast model, on the other
hand, all nodes share the same communication medium and, as a result, a message
transmitted by any node can be received by all other nodes. A part of the message (an
address) indicates for which node the message is intended.
All nodes look at this address and ignore the message if it does not match their own
address.
Connection Types:
Connections between devices may be classified into three categories:
Simplex

This is a unidirectional connection, i.e., data can only travel in one direction.
Simplex connections
are useful in situations where a device only receives or only sends data (e.g., a
printer).
Half-duplex
This is a bidirectional connection, with the restriction that data can travel in one
direction at a
time.
Full-duplex
This is a bidirectional connection in which data can travel in both directions at
once.
A full-duplex connection is equivalent to two simplex connections in opposite
directions.
1.9 Direct Link Networks
There are five problems that must be addressed before the nodes can successfully
exchange packets.
encoding problem
framing problem
error detection problem
Network adapter:
A Network adapter a piece of hardware that connects a node to a link. The network
adapter contains a signaling component that actually encodes bits into signals at the
sending node and decodes signals into bits at the receiving node.
Lets return to the problem of encoding bits into signals.
1.10 ENCODING
NRZ
Non-return to zero transmits 1s as High Signal and 0s as Low signal.
Problem: Consecutive 1s (signal stays high on the links for an extended
period of time) or 0s (signal stays low for a long time).

There are two fundamental problems caused by long strings of 1s or 0s.

Low signal (0) may be interpreted as no signal and High signal (1)
leads to baseline wander.

Unable to recover clock (clock Recovery).

Baseline Wander:
Specifically, the receiver keeps an average of the signal, and then uses this
average to distinguish between low and high signals.

Whenever the signal is significantly lower than this average, the receiver
concludes that it has just seen a 0, and likewise higher than the average is
interpreted to be a 1.

The problem, if too many consecutive 1s or 0s cause this average to change,


making it more difficult to detect a significant change in the signal.

Clock Recovery:

The frequent transitions from high to low and vice versa are necessary to
enable clock recovery.

The clock recovery problem is that both encoding and the decoding processes
are driven by a clock.

Every clock cycle the sender transmits a bit and the receiver recovers a bit.

The senders and receivers clocks have to be precisely synchronized in order


for the receiver to recover the same bits the sender transmits.

If the receivers clock is even slightly faster or slower than the senders clock,
then it does not correctly decode the signal.

So far clock recovery process, the receiver derives the clock from the received
signal. Whenever the signal changes, such as 0 to 1 or from 1 to 0, then the
receiver knows it is at a cycle boundary, and it can resynchronize itself.

NRZI (non-return to zero inverted ):


Transition data if input is 1, and no transition if input is 0.

Manchester encoding: A transition occurs in the middle of the bits. 0 becomes a low to
high transition and 1 high to low

Differential Manchester: a transition in the beginning of the interval to transmit 0. No


transition in the beginning of the interval to transmit 1. The transition in the middle is
always present.

4B/5B Encoding:
Problem: consecutive zeros
Idea: Every 4 bits of data is encoded in a 5-bit code, with the 5-bit codes selected
to have no more than one leading 0 and no more than two trailing 0 (i.e., never get
more than three consecutive 0s).
Resulting 5-bit codes are then transmitted using the NRZI encoding. Achieves
80% efficiency.

1.11 Framing

Breaking sequence of bits into a frame


Must determine first and last bit of the frame
Typically implemented by network adapter
Adapter fetches (deposits) frames out of (into) host memory

The network adaptor that enables the nodes to exchange frames.

When node A wishes to transmit a frame to node B, it tells its adaptor to transmit a frame
from the nodes memory. This results in a sequence of bits being sent over the link. The
adaptor on node B then collects together the sequence of bits arriving on the link and
deposits the corresponding frame in Bs memory. Recognizing exactly what set of bits
constitutes a framethat is, determining where the frame begins and endsis the central
challenge faced by the adaptor.
.
1.11.1 Approaches
There are several ways to address the framing problem.
Some of them are:
1. Byte Oriented: Special character to delineate frames, replace character in
data stream
a. Sentinel approach
b. Byte counting approach
2. Bit Oriented: use a technique known as bit stuffing
3. Clock Based: fixed length frames, high reliability required
1.11.1.1

Byte-Oriented Protocols

A byte-oriented approach is exemplified by the BISYNC (Binary Synchronous


Communication) protocol developed by IBM. The BISYNC protocol illustrates the
sentinel approach to framing;
its frame format is depicted in the following figure
Sentinel Approach
PPP protocol uses 0x7e=01111110 as the flag byte to delimit a frame
When a 0x7e is seen in the payload, it must be escaped to keep it from
being seen as an end of frame

The beginning of a frame is denoted by sending a special SYN (synchronization)


character. The data portion of the frame is then contained between special sentinel
characters: STX (start of text) and ETX (end of text). The SOH (start of header) field
serves much the same purpose as the STX field. The frame contains additional header
fields that are used for, among other things, the link-level reliable delivery algorithm
The problem with the sentinel approach, is that the ETX character might appear in the
data portion of the frame. BISYNC overcomes this problem by escaping the ETX
character by preceding it with a DLE (data-link-escape) character whenever it appears in
the body of a frame;
The DLE character is also escaped (by preceding it with an extra DLE) in the frame body.
This approach is often called character stuffing because extra characters are inserted in
the data portion of the frame.
Point-to-Point Protocol (PPP) is similar to BISYNC in that it uses character stuffing.
The format for a PPP frame is given in Figure.

The special start-of-text character, denoted as the Flag field is 01111110. The
Address and Control fields usually contain default values, and so are uninteresting. The
Protocol field is used for demultiplexing. The frame payload size can be negotiated, but it
is 1500 bytes by default.
The Checksum field is either 2 (by default) or 4 bytes long used for error detection.
Byte counting approach
The number of bytes contained in a frame can be included as a field in the frame
header.
DDCMP protocol uses this approach, as illustrated in the following figure

The COUNT field specifies how many bytes are contained in the frames body. One
danger with this approach is that a transmission error could corrupt the COUNT field, in
which case the end of the frame would not be correctly detected.
1.11.1.2

Bit Oriented approach

The High-Level Data Link Control (HDLC) protocol developed by IBM is an


example of a
bit-oriented protocol.

HDLC: High-Level Data Link Control


Delineate frame with a special bit-sequence: 01111110
Its frame format is given in below figure.

Bit-oriented protocols use a technique known as bit stuffing.


Bit Stuffing:
The delimiting bit pattern used is 01111110 and is called a flag. To avoid this bit
pattern occurring in user data, the transmitter inserts a 0 bit after every five consecutive 1
bits it finds. This is called bit stuffing.
Sender: any time five consecutive 1s have been transmitted from the body of the
message, insert a 0.
Receiver: should five consecutive 1s arrive, look at next bit(s):
if next bit is a 0: remove it
if next bits are 10:end of frame
if next bits are 11: error
Bit stuffing Example
Original Data
001111111000011111100
Bit Stuffed
00111110110000111110100
Receiver
0011111011000011111010001111110
1.11.1.3

Clock-Based Framing

This approach to framing is used by the Synchronous Optical Network (SONET)


standard.
1.12 Error Detection and Correction
Data can be corrupted during transmission. For reliable communication, errors must be
detected and corrected

Types of Error
Single-Bit Error
Burst Error
Single-Bit Error
In a single-bit error, Only one bit is changed: 0 changed to 1, or a 1 to a 0

Burst Error
Two or more bits in data unit are in error, not necessarily consecutive in order

The basic idea behind any error detection scheme is to add redundant information to a
frame that can be used to determine if errors have been introduced. In other words, error
detection uses the concept of redundancy, which means adding extra bits for detecting
errors at the destination as shown in below figure.

We say that the extra bits we send are redundant because they add no new information to
the message. Instead, they are derived directly from the original message using some
well-defined algorithm. Both the sender and the receiver know exactly what that
algorithm is. The sender applies the algorithm to the message to generate the redundant

bits. It then transmits both the message and those few extra bits. When the receiver
applies the same algorithm to the received message, it should (in the absence of errors)
come up with the same result as the sender. It compares the result with the one sent to it
by the sender. If they match, it can conclude (with high likelihood) that no errors were
introduced in the message during transmission. If they do not match, it can be sure that
either the message or the redundant bits were corrupted, and it must take appropriate
action, that is, discarding the message, or correcting it if that is possible.

1.13 Error Detection methods

Parity Check
1. Simple-parity check
2. Two dimensional parity check
Simple-parity check
In this parity check, a parity bit is added to every data unit so that the total number
of 1s is even (or odd for odd-parity). The following figure illustrates this concept.

Suppose the sender wants to send the word world. In ASCII the five characters are coded
as
1110111 1101111 1110010 1101100 1100100
The following shows the actual bits sent
11101110 11011110 11100100 11011000 11001001
Now suppose the word world is received by the receiver without being corrupted in
transmission.

11101110 11011110 11100100 11011000 11001001


The receiver counts the 1s in each character and comes up with even numbers (6, 6, 4, 4,
4).
The data are accepted.
Now suppose the word world is corrupted during transmission.
11111110 11011110 11101100 11011000 11001001
The receiver counts the 1s in each character and comes up with even and odd numbers (7,
6, 5, 4, 4). The receiver knows that the data are corrupted, discards them, and asks for
retransmission.
Performance
Simple parity check can detect all single-bit errors. It can detect burst errors only if the
total number of errors in each data unit is odd.
Two dimensional parity check
In two-dimensional parity check, a block of bits is divided into rows and a redundant row
of bits is added to the whole block.
Example 1:

Example 2:
Suppose the following block is sent:
10101001 00111001 11011101 11100111 10101010
1010100 1

0011100 1
1101110 1
1110011 1
--------------1010101 0
--------------However, it is hit by a burst noise of length 8, and some bits are corrupted.
10100011 10001001 11011101 11100111 10101010
1010001 1
1000100 1
1101110 1
1110011 1
--------------0001000 0
--------------When the receiver checks the parity bits, some of the bits do not follow the even-parity
rule and the whole block is discarded.
10100011 10001001 11011101 11100111 10101010
CRC

Parity checks based on addition; CRC based on binary division

A sequence of redundant bits (a CRC or CRC remainder) is appended to the


end of the data unit

These bits are later used in calculations to detect whether or not an error had
occurred.
CRC Steps
On senders end, data unit is divided by a predetermined divisor; remainder is
the CRC
When appended to the data unit, it should be exactly divisible by a second
predetermined binary number
At receivers end, data stream is divided by same number
If no remainder, data unit is assumed to be error-free
Deriving the CRC
A string of 0s is appended to the data unit; n is one less than number of bits in
predetermined divisor
New data unit is divided by the divisor using binary division; remainder is
CRC
CRC of n bits replaces appended 0s at end of data unit

CRC Generator function

Uses modulo-2 division


Resulting remainder is the
CRC

CRC Checker function

Performed by receiver
Data is appended with CRC
Same modulo-2 division
If remainder is 0, data are
accepted
Otherwise, an error has
occurred

Polynomial
The divisor number used in the CRC algorithm, which is (n+1) bit in length, can also be
considered as the coefficients of a polynomial, called Generator Polynomial which is
shown below.

The divisor can give n-bit length CRC remainder. For example, for the divisor 11001 the
corresponding polynomial is X4+X3+1.
A polynomial is
Used to represent CRC generator
Cost effective method for performing calculations quickly

Standard CRC polynomials


Name

Polynomial

Application

CRC-8

x8 + x2 + x + 1

ATM header

CRC10

x10 + x9 + x5 + x4 + x 2 + 1

ATM AAL

ITU16

x16 + x12 + x5 + 1

HDLC

ITU32

x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 +


x7 + x5 + x4 + x2 + x + 1

LANs

A polynomial is selected to have at least the following properties:

It should not be divisible by X.


It should not be divisible by (X+1).

The first condition guarantees that all burst errors of a length equal to the degree of
polynomial are detected.

The second condition guarantees that all burst errors affecting an odd number of bits are
detected.
CRC Performance

CRC can detect all single-bit errors


CRC can detect all double-bit errors (three 1s)
CRC can detect any odd number of errors (X+1)
CRC can detect all burst errors of less than the degree of the polynomial.
CRC detects most of the larger burst errors with a high probability. For example
CRC-12 detects 99.97% of errors with a length 12 or more.

Checksum generator function


Suppose the following block of 16 bits is to be sent using a checksum of 8 bits.
10101001 00111001
The numbers are added using ones complement
10101001
00111001
-----------Sum
Complements of Sum
Checksum
Now the pattern sent is

11100010
00011101
10101001 00111001 00011101

Checksum checker function


Now suppose the receiver receives the pattern sent without any corruption:
10101001 00111001 00011101
The receiver performs the checksum checker function to ensure whether the received
pattern is corrupted or not.
When the receiver adds the three sections, it will get all 1s, which, after complementing,
is all 0s and shows that there is no error.
10101001
00111001
00011101
----------Sum
11111111
Complement

00000000

means that the pattern is OK.

Now suppose there is a burst error of length 5 introduced as


10101111 11111001 00011101
When the receiver adds the three sections, it gets

Partial Sum
Carry
Sum

10101111
11111001
00011101
----------1 11000101
1
----------11000110

Complement

00111001 the pattern is corrupted.

Performance
Detects all errors involving odd number of bits, most errors involving even
number of bits
If one or more bits of a segment are damaged and the corresponding bits of
opposite value in a second segment are also damaged, the sums of these columns
will not change and the receiver will not detect a problem.
1.14 Transmission Media
There are 2 basic categories of Transmission Media:
o Guided
o Unguided
Guided Transmission Media: uses a "cabling" system that guides the data signals along
a specific path.
Unguided: The medium transmits the waves but does not guide

Twisted Pair Cable


The popularity can be attributed to the fact that it is lighter, more flexible, and
easier to install than coaxial or fiber optic cable
It is also cheaper and can achieve greater speeds than its coaxial competition.
Ideal solution for most network environments.
Two main types of twisted-pair cabling are:
Unshielded Twisted Pair (UTP)
more commonplace than STP and is used for most networks
Shielded Twisted Pair (STP)
used in environments in which greater resistance to EMI and
attenuation is required.
the greater resistance comes at a price.
This extra protection increases the distances that data signals can travel over STP
but also increases the cost of the cabling
UTP: one or more pairs of twisted copper wires insulated and contained in a
plastic cover
Uses RJ-45 telephone connector
STP: Same as UTP but with a aluminium/ polyester shield.
Connectors are more awkward to work with

Twisted nature to reduce crosstalk.


Any interference from a physically adjacent channel that corrupts the signal and
causes trans- mission errors is what is known as crosstalk.

UTP Categories:
Categories 1 and 2 (CAT 1 and CAT 2)
voice grade
low data rates up to 4 Mbps
Category 3 (CAT 3)
suitable for most LANs
up to 16 Mbps
Category 4
up to 20 Mbps
Category 5
Supports Fast Ethernet
100Mbps
more twists per foot
more stringent standards on connectors
Category 5e
up to 1000 Mbps
Category 6
up to 1000 Mbps +
Data grade UTP cable usually consists of either 4 or 8 wires, two or four pair
Coaxial Cable
Commonly referred to as coax
Coax found success in both TV signal transmission as well as in network
implementations.
Constructed with a copper core at the centre that carries the signal, plastic
insulation, braided metal shielding, and an outer plastic covering
Constructed this way to avoid:
Attenuation
the loss of signal strength as it travels over distance
Crosstalk
the degradation of a signal caused by signals from other cables
running close to it
EMI
Electromagnetic Interference
Networks can use two types of coaxial cabling: thin coaxial and thick coaxial
Thin coax is only .25 inches in diameter, making it fairly easy to install
Disadvantages of all thin coax types are that they are prone to cable breaks

Size of Coax
RG-8, RG-11
50 ohm Thick Ethernet
RG-58
50 ohm Thin Ethernet
RG-59
75 ohm Cable T.V.
Fiber Optic
Addresses the shortcomings associated with copper-based media
Use light transmissions instead of electronic pulses
Advantages:
Threats such as EMI, crosstalk, and attenuation become a nonissue
Well suited for the transfer of data, video, and voice transmissions
It is the most secure of all cable media
Disadvantages:
difficult installation and maintenance procedures of fiber
often require skilled technicians with specialized tools
the cost of a fiber-based solution limits the number of organizations that
can afford to implement it
incompatible with most electronic network equipment; you have to
purchase fiber-compatible network hardware.
Composed of a core glass fiber surrounded by cladding
An insulated covering then surrounds both of these within an outer protective
cover
Two types of fiber-optic cable are available: single and multimode fiber
multimode fiber, many beams of light travel through the cable bouncing
off of the cable walls
weakens the signal, reducing the length and speed the data signal can
travel
Single-mode fiber uses a single direct beam of light
allows for greater distances and increased transfer speeds

core: inner-most section


cladding: surrounding the core
jacket: outermost layer, surrounding one or a bundle of cladded fibers
Common types of fiber-optic cable include the following:
62.5 micron core/125 micron cladding multimode
50 micron core/125 micron cladding multimode
8.3 micron core/125 micron cladding single mode
The main advantage of optical fiber is the great bandwidth it can carry.
2 Unguided Media
Provides a means for transmitting electro-magnetic signals through air but do not
guide them.
Also referred to as wireless transmission
Wireless communications uses specific frequency bands which separates the
ranges.
Main types: radio waves, microwaves, Bluetooth and Infrared.
Transmission and reception are achieved by means of antennas
For transmission, an antenna radiates and electromagnetic radiation in the
air
For reception, the antenna picks up electromagnetic waves from the
surrounding medium
The antenna plays a key role; the characteristics of the antenna and the
frequency that it receives
Reliable Transmission-Stop and Wait ARQ - Sliding Window Algorithm- Selective
Repeat ARQ
Even when error-correcting codes are used some errors will be too severe to be corrected.
As a result, some corrupt frames must be discarded. A link-level protocol that wants to
deliver frames reliably must somehow recover from these discarded (lost) frames.
This is usually accomplished using a combination of two fundamental mechanisms
1. acknowledgments
2. timeouts
An acknowledgment (ACK for short) is a small control frame that a protocol
sends back to its peer saying that it has received an earlier frame. By control
frame we mean a header without any data.
If the sender does not receive an acknowledgment after a reasonable amount of
time, then it retransmits the original frame. This action of waiting a reasonable
amount of time is called a timeout.
Piggybacking: To improve the use of network bandwidth, an acknowledgment method
known as piggybacking is often used. In piggybacking, instead of sending a separate

acknowledgment frame, the receiver waits until it has data frame to send to the sender
and embeds the acknowledgment in that data frame.
Thus the link bandwidth can be utilized better also it increases the speed of data
transmission.
Propagation delay is defined as the delay between transmission and receipt of packets
between hosts. Propagation delay can be used to estimate timeout period
The general strategy of using acknowledgments and timeouts to implement reliable
delivery is sometimes called automatic repeat request (ARQ).
There are four different ARQ algorithms:

Stop-and-Wait ARQ
Sliding Window ARQ
Go back N ARQ
Selective Repeat ARQ

Stop and Wait ARQ

Sender doesnt send next frame until hes sure receiver has last packet
The data frame/Ack. Frame sequence enables reliability. They are sequenced
alternatively 0 and 1
Sequence numbers help avoid problem of duplicate frames
If the sender does not receive an acknowledgment after a reasonable amount of
time, then it retransmits the original frame
The sender also starts retransmission when the timeout occurs.

a) Normal operation b) The Original frame is lost c) The ACK is lost d) Timeout
occurs
Disadvantage

The link capacity can not be utilized effectively since only one data frame or ACK
frame can e sent at a time

Sliding Window Algorithm


The sliding window algorithm works as follows:

1. The sender assigns a sequence number, denoted SeqNum, to each frame.


2. The sender maintains three variables:
a. SWS denotes the send window size, gives the upper bound on the number
of outstanding (unacknowledged) frames that the sender can transmit;
b. LAR denotes the sequence number of the last acknowledgment received;
and
c. LFS denotes the sequence number of the last frame sent.
3. The sender maintains the following invariant:
LFS LAR SWS
This situation is illustrated in below figure

When an acknowledgment arrives, the sender moves LAR to the right,


thereby allowing the sender to transmit another frame.
The sender associates a timer with each frame it transmits, and it
retransmits the frame should the timer expire before an ACK is received.
4. The receiver maintains the following three variables:
a. RWS denotes the receive window size, gives the upper bound on the
number of out-of-order frames that the receiver is willing to accept;

b. LAF denotes the sequence number of the largest acceptable frame;


c. LFR denotes the sequence number of the last frame received.
5. The receiver also maintains the following invariant:
LAF LFR RWS
6. if LFR<SeqNum<-LFA, then the corresponding SeqNum frame is accepted
7. if SeqNum<=LFR or SeqNum > LFA, then the correspong SeqNum frame is
discarded
This situation is illustrated in below figure

Operation:
The sender window denotes the frames that have been transmitted but remain
unacknowledged.
This window can vary in size, from empty to the entire range.
The receiver window size is fixed. A receiver window size of 1 means that frames must
be received in transmission order. Larger window sizes allow the receiver to receive as
many frames out of order.
When a frame with sequence number SeqNum arrives, the receiver takes the
following action.
a. If SeqNum LFR or SeqNum > LAF,
then the frame is outside the receivers window and it is discarded.
b. If LFR < SeqNum LAF,
then the frame is within the receivers window and it is accepted.
c. It then sets LFR = SeqNumToAck and adjusts LAF = LFR + RWS.
The following figure illustrates the operation of sliding window.

The receiver can set RWS to whatever it wants.


Two common settings are:
1. RWS = 1, implies that the receiver will not buffer any frames that arrive out of
order
2. RWS = SWS implies that the receiver can buffer any of the frames the sender
transmits.
It is no sense to set RWS > SWS since its impossible for more than SWS frames to arrive
out of order.
Advantages
Reliable transmission: The algorithm can be used to reliably deliver messages
across an unreliable network
Frame Order: The sliding window algorithm can serve is to preserve the order in
which frames are transmitted. Since each frame has a sequence number.
Flow control: The receiver not only acknowledges frames it has received, but
also informs the sender of how many frames it has room to receive
The link capacity can be utilized effectively since multiple frames can be
transmitted at a time
Selective Repeat ARQ:
Upon encountering a faulty frame, the receiver requests the retransmission of that
specific frame. Since additional frames may have followed the faulty frame, the receiver
needs to be able to temporarily store these frames until it has received a corrected version
of the faulty frame, so that frame order is maintained.

Go Back N ARQ:
A simpler method, Go-Back-N, involves the transmitter requesting the
retransmission of the faulty frame as well as all succeeding frames (i.e., all frames
transmitted after the faulty frame).
Advantages
o The advantage of Selective Reject over Go-Back-N is that it leads to better
throughput, because only the erroneous frames are retransmitted.
o Go-Back-N has the advantage of being simpler to implement and requiring less
memory.

Ethernet Token ring FDDI - Wireless LAN Bridges and Switches


Ethernet (802.3)
Most successful local area networking technology of the last 20 years.
The Ethernet is a working example of the more general Carrier Sense Multiple
Access with Collision Detect (CSMA/CD).
CSMA/CD:
Ethernets Media Access Control (MAC) policy
o CS = carrier sense
Send only if medium is idle
o MA = multiple access, i.e. a set of nodes send and receive frames over a
shared link.
o CD = collision detection
Stop sending immediately if collision is detected
Physical Properties:
Addresses:
Unique, 48-bit unicast address assigned to each adapter
Example: 8:0:e4:b1:2
The address will be used for broadcast all 1s in the address
The address is multicast if the first bit is 1
Bandwidths:
10Mbps, 100Mbps, 1Gbps
Max bus length:

2500m

500m segments with 4 repeaters


Bus and Star topologies are used to connect hosts
Hosts attach to network via Ethernet transceiver or hub or switch
Detects line state and sends/receives signals
Hubs are used to facilitate shared connections
All hosts on an Ethernet are competing for access to the medium

Transceiver:
A small device directly attached to the tap
It detects when the line is idle and drives the signal when the host is
transmitting. It also receives incoming signals.
The transceiver is, in turn, connected to an Ethernet adaptor, which is plugged
into the host.

Repeater:
Multiple Ethernet segments can be joined together by repeaters.
A repeater is a device that forwards digital signals, much like an amplifier
forwards analog signals.
Any signal placed on the Ethernet by a host is broadcast over the entire
network
Ethernet standards

10Base2 - can be constructed from a thinner cable called as thin-net, 200m length
10Base5 - can be constructed from a thick cable called as thick-net, 500m length
10BaseT - can be constructed from twisted pair cable;
10 in 10Base2 means that the network operates at 10 Mbps,
Base refers to the fact that the cable is used in a baseband system,
2 means that a given segment can be no longer than 200 m.
T stands for twisted pair, limited to less than 100 m in length
Access Method: CSMA/CD
Carrier Sense:
This protocol is applicable to a bus topology.
Before a station can transmit, it listens to the channel to see if any other station is
already transmitting.
If the station finds the channel idle, it attempt to transmit;
Otherwise, it waits for the channel to become idle.

If two or more stations find the channel idle and simultaneously attempt to
transmit.
This is called a collision. When collision occurs, the station should suspend
transmission and re-attempts after a random period of time.
Use of a random wait period reduces the chance of the collision recurring.
The following flow chart depicts this technique.

If line is idle
send immediately
upper bound message size of 1500 bytes
minimum frame is 64 bytes (header + 46 bytes of data)

If line is busy
wait until idle and transmit immediately
If collision
send jam signal, and then stop transmitting frame
delay for exponential Back off time and try again
Exponential Back off
1st time: 0 or 51.2us (us means micro seconds)
2nd time: 0, 51.2, or 102.4us
3rd time51.2, 102.4, or 153.6us
nth time: k x 51.2us, for randomly selected k=0..2^n - 1
give up after several tries (usually 16)
Transmitter Algorithm:
When the adapter has a frame to send and the line is idle; it transmits the frame
immediately.
When the adapter has a frame to send and the line is busy; it waits for the line to go idle
and then transmits immediately.
1-Persistent protocol:
An adaptor with a frame to send transmits with probability 1 whenever a busy line
goes idle.
P-Persistent protocol:
An adaptor with a frame to send transmits with probability 0<=p<=1 after a line
becomes idle, and defers with probability q=1-p.
Collision Detection
Suppose host A begins transmitting a frame at time t as shown in below figure a.

It takes one link latency for the frame to reach host B.


Thus it arrives at B at time of t+d (d -> distance) which is shown in figure b.

Suppose an instant before host As frame arrives,


B begins transmit its own frame and it collides with the As frame as shown in figure c.

This collision is detected by host B.


Host B will send a jamming signal which is known as runt frame.
The runt frame is a combination of 32 bit jamming sequence and 64 bit preamble bits.
Bs runt frame arrives at A at time t+2d. That is A sees the collision at the time of t+2d.

Exponential Back off strategy


Once the adaptor has detected the collision,
It stops transmission, and it waits a certain amount of time and tries again transmission.
Each time it tries to transmit bit fails, and then the adapter doubles the amount of time it
waits before trying again.
This strategy of doubling the delay interval between each transmission attempt is known
as exponential back off.
The adapter delays are,
1st time: 0 or 51.2us
2nd time: 0, 51.2, or 102.4us
3rd time51.2, 102.4, or 153.6us
nth time: k x 51.2us, for randomly selected k=0..2^n - 1
give up after several tries (usually 16)
Frame format

Preamble allows the receiver to synchronize with the signal. It is 10101010.


Src addr and Dest addr are address of the source and destination which are 48 bit
address.
Type is a demultiplexing key. It tells the frame can be used by higher level
protocol.
Body is the field where it holds the data. Maximum of 1500 bytes of data can be
stored.
Minimum data length should be 46 bytes so that the collision can be detected.

CRC is a 32 bit used for error detection


Advantages
1.
2.
3.
4.
5.
6.

It works better under lightly loaded conditions


No flow of control in Ethernet which is done by upper layers
New host can be added easily to the network\
Very easy to administer and maintain
Relatively very cheap
It uses round trip delay of closer to 5 us than 51.2us

Token Ring (IEEE 802.5)

Specified by the IEEE 802.5


standard.
Set of nodes are connected in a
ring.
Data always flows in one
direction
Node receiving frames from
upstream neighbor passes it to
downstream neighbor.
Distributed algorithm dictates
when each node can transmit.

All nodes see all frames


Destination saves a copy of the
frame when it flows past.
Token used to control who
transmits.

Physical Properties
Electromechanical relays are used to Protection against failures -- single node
failure should not cause the entire ring to fail.

One approach: change one bit in token which transforms it into a


start-of-frame sequence and appends frame for transmission.

Second approach: station claims token by removing it from the


ring.
Frame circles the ring and is removed by the transmitting station.
Each station interrogates passing frame, if destined for station, it copies the frame
into local buffer.
After station has completed transmission of the frame, the sending station should
release the token on the ring.
Access control: Token passing

Token circulates around the ring.


The token allows a host to transmit -- contains a special sequence of bits.
When a node that wishes to send sees the token, it
picks up the token
inserts its own frame instead on the ring.
When frame traverses ring and returns, the sender takes frame off and reinserts
token.
Transmitted frame contains dest addr.
Each node looks at the frame -- if frame meant for the node, copy frame onto
buffer, otherwise just forwards it.
Sending node responsible for removal of frame from ring and releases the token
back on the ring
Token Holding Time
How long can a node hold onto the token? This is dictated by the token holding
time or THT.
If lightly loaded network you may allow a node to hold onto it as long as it wants
-- very high utilization.
In 802.5, THT is specified to be 10 milliseconds.
Timers

Token Holding Time (THT)

defined as upper limit on how long a station can hold the token
Token Rotation Time (TRT)

defined as how long it takes the token to traverse the ring.

TRT <= Active Nodes X THT + Ring Latency

Target Token Rotation Time (TTRT)

Agreed-upon upper bound on TRT


Measured TRT

- The time between successive arrivals of the token.

Reliable Delivery in 802.5


Two bits in a frame trailer A and C bits.
Both are zero initially.
When a station notices that it is the destination for a frame it sets the A bit.
When it copies frame, it sets C bit.
When sender sees:
1. The A bit set to zero; it assumes that the recipient is absent / nonfunctional.
2. If A bit =1 but C bit = 0, it assumes that for some reason destination
could not accept frame and tries to retransmit.
Token Release

(a)

EARLY RELEASE: Release


token right after frame
Better utilization

(b)

DELAYED RELEASE: Release


token after frame is removed
from ring.

The Monitor
A special node that ensures the health of the ring.
Any station can become the monitor.
If monitor is healthy, it periodically announces its presence.
If no message seen for awhile, a node will assume that the monitor has failed and
will try to become a monitor. Then It transmits a claim token --> the purpose is to
become a monitor. If more than one station sends claim token then highest
address node wins.
Maintaining the token by the monitor

Monitor ensures the presence of token. Token may get corrupted or lost
If no token seen for this time i.e,
TRT = Num_stations X THT + Ring Latency
The monitor assumes that the token may be lost; and it creates a new

token.
Other Monitor Functions
Check for corrupted frames
Check for orphaned frames. The orphaned frame is an frame which inserted
by a node that dies during the flow.
The monitor uses a monitor bit, and sets this to 1 to see if the frame
keeps on circulating.
It bypass the malfunctioning stations

Frame Format in 802.5

S tart
Acces s
delimiter control

48

Frame Des t
control addr

48

S rc
addr

Variable

Body

32

Frame
Checks um End
delimiter s tatus

Token Frame Format

Start of frame: indicates the start of the frame


Control: it identifies the frame type i.e. token or a data frame.
Dest addr: contains the physical address of the destination
Src addr: contains the physical address of the source.
Body: Each data frame carries up to 4500 bytes.
CRC: is used for error detection
End of frame: This represents end of the Token.
Status: FDDI FS field is similar to that of Token Ring. It is included only in
data/Command frame and consists of one and a half bytes.

FDDI (Fiber Distributed Data Interface)

Fiber Distributed Data Interface


Similar to Token ring but uses -- optical fiber. The copper version is known as
CDDI.
In FDDI, token is absorbed by station and released as soon as it completes the
frame transmission
FDDI uses a ring topology of multimode optical fiber transmission links operating
at 100 Mbps to span up to 200 kms and permits up to 500 stations.
Data is encoded using a 4B/5B encoder
Two rings instead of one; second used if first fails.
Two independent rings transmitting data in opposite direction
o FDDI can tolerate single node or link failures.

In case of failure of a node or a fiber link, the ring is restored by wrapping the
primary ring to the secondary ring as shown in Figure b. If a station on the dual
ring fails or is powered down, or if the cable is damaged, the dual ring is
automatically wrapped (doubled back onto itself) into a single ring. When the ring
is wrapped, the dual-ring topology becomes a single-ring topology. Data
continues to be transmitted on the FDDI ring without performance impact during
the wrap condition. Network operation continues for the remaining stations on
the ring. When two or more failures occur, the FDDI ring segments into two or
more independent rings that are incapable of communicating with each other.

Single Access Stations

FDDI is expensive for nodes to connect to two cables and so FDDI allows nodes
to attach using a single cable
called Single Access Stations or SAS.

as shown in below figure.

Ups tream
neighbor

Downs tream
neighbor
Concentrator (DAS )

S AS
S AS
S AS

A Concentrator is used to attach several SASs to a ring.

Access control: Timed Token Algorithm for FDDI

S AS

Each node measures TRT.


If measured TRT > TTRT,
then Token is late, so that station does not transmit data
If measured TRT < TTRT,
then Token is early; station holds token for difference between TTRT and
measured TRT and can transmit data.
Division into traffic classes
Traffic is divided into two classes

1. Synchronous traffic

Traffic is delay sensitive

station transmits data whether token is late or early

But synchronous cannot exceed one TTRT in one TRT


2. Asynchronous traffic

Station transmits only if token is early


Token Maintenance

Every node monitors ring for valid token. If operations are correct, a node
must observe a token or a data frame every so often.
Claim frames
When Greatest idle time = Ring latency + frame transmission time,
and if nothing seen during this time, a node suspects something is wrong
on the ring and sends a claim frame.
Then, node bid (propose) for the TTRT using the claim frame.
The bidding process

A node can send a claim frame without having the token when it suspects
failure
If claim frame came back, node knows that its TTRT bid is the lowest. And
now it is responsible for inserting token on the ring.
When a node receives a claim frame, it checks to see if the TTRT bid is lower
than its own.
If yes, it resets local definition of TTRT and simply forwards the claim
frame.
Else, it removes the claim frame and enters the bidding process
Put its own claim frame on ring.
When there are ties, highest address wins.
FDDI Analysis

In the worst case:


First async. traffic use one TTRT worth of time.
Next sync. traffic use one TTRT worth of time.
So, TRT at a node = 2 * TTRT
It is important to note that if Sync. traffic was transmitted first and used TTRT, no
async. traffic can be sent.

Difference between Token Ring and FDDI

Token Ring
FDDI
Shielded twisted pair
Optical Fiber
4, 16 Mbps
100 Mbps
No reliability specified
Reliability specified (dual ring)
Differential Manchester
4B/5B encoding
Centralized clock
Distributed clocking
Access control: Token
Access control: Timed Token
Passing
algorithm
It uses delayed release of
Early release of token is used
token

Wireless LAN - IEEE 802.11

802.11 was designed to run over three different physical mediatwo based on
spread spectrum radio and one based on diffused infrared.
The idea behind spread spectrum is to spread the signal over a wider frequency
band than normal, so as to minimize the impact of interference from other devices

Frequency Hopping Spread Spectrum (FHSS)


Frequency hopping is a spread spectrum technique that involves transmitting the
signal over a random sequence of frequencies; that is, first transmitting at one
frequency, then a second, then a third, and so on.
The receiver uses the same algorithm as the senderand initializes it with the
same seedand hence is able to bound with the transmitter to correctly receive
the frame.
Direct Sequence Spread Spectrum (DSSS)
The DSSS encoder spreads the data across a broad range of frequencies using a
mathematical key.
The receiver uses the same key to decode the data.
It sends redundant copies of the encoded data to ensure reception.
Infrared (IR)
The Infrared utilizes infrared light to transmit binary data using a specific
modulation technique. The infrared uses a 16-pulse position modulation (PPM).
Access control: CSMA/CA(Carrier Sense Multiple Access /Collision Avoidance)

a wireless protocol would follow exactly the same algorithm as the Ethernet
wait until the link becomes idle before transmitting and back off should a collision
occur.
Consider the situation depicted in figure, where each of four nodes is able to send
and receive signals that reach just the nodes to its immediate left and right.
For example, B can exchange frames with A and C but it cannot reach D, while C
can reach B and D but not A.

a carrier sensing scheme is used.

a node wishing to transmit data has to first listen to the channel for a
predetermined amount of time to determine whether or not another node is
transmitting on the channel within the wireless range. If the channel is sensed
"idle," then the node is permitted to begin the transmission process. If the channel

is sensed as "busy," the node defers its transmission for a random period of time.
This is the essence of both CSMA/CA and CSMA/CD. In CSMA/CA, once the
channel is clear, a station sends a signal telling all other stations not to transmit,
and then sends its packet.

Assume that node A has data to transfer to node B. Node A initiates the process by
sending a Request to Send frame (RTS) to node B. The destination node (node B)
replies with a Clear to Send frame (CTS). After receiving CTS, node A sends data.
After successful reception, node B replies with an acknowledgement frame
(ACK). If node A has to send more than one data fragment, it has to wait a
random time after each successful data transfer and compete with adjacent nodes
for the medium using the RTS/CTS mechanism.

To sum up, a successful data transfer (A to B) consists of the following sequence


of frames:

Request To Send frame (RTS)


from A to B

Clear To Send frame (CTS)


from B to A

Data frame (Data) from A to B

Acknowledgement frame (ACK)


from B to A.

1.

2.

The following flow graph explains the


CSMA/CA technique

3.
4.
5.
6. Hidden nodes problem
7.
8. Suppose both A and C want to communicate with B and so they each send it a
frame. A and C are unaware of each other since their signals do not carry that far.
These two frames collide with each other at B, but A and C is not aware of this
collision. A and C are said to be hidden nodes with respect to each other.
9.
10. Solution for the hidden node problem
11.
When node A wants to send a
When a node C sees a CTS, it
packet to node B
should keep quiet for the duration
Node A first sends a
of the transfer

Request-to-Send (RTS) to
B

On receiving RTS
Node B responds by
sending
Clear-to-Send
(CTS)
provided node B is able to
receive the packet

Exposed node problem


A related problem, called the exposed node problem, occurs under the following
circumstances.

B talks to A
C wants to talk to D
C senses channel and finds it to
be busy
So, C stays quiet

B is sending to A in figure. Node C is aware of this communication because it


hears Bs transmission. It would be a mistake for C to conclude that it cannot
transmit to anyone just because it can hear Bs transmission.

Solution for Exposed Terminal Problem

Sender transmits Request to Send


See RTS, but no CTS
(RTS)
then O.K to transmit
Receiver replies with Clear to

Send (CTS)
Reliability
If Neighbors

See CTS - Stay quiet

When node B receives a data packet


from node A, node B sends an Acknowledgement (ACK)

If node A fails to receive an ACK


Retransmit the packet
Frame Format

The frame contains the source and destination node addresses, each of which are
48 bits long; up to 2312 bytes of data; and a 32-bit CRC. The Control field
contains three subfields of interest (not shown): a 6-bit Type field that indicates
whether the frame carries data, is an RTS or CTS frame. Addr1 identifies the
target node, and Addr2 identifies the source node. Addr3 identifies the
intermediate destination.

Switches

forwards packets from input port to output port


port selected based on address in packet header
adding more hosts will not deteriorate older connections

Advantages
it covers large geographic area (tolerate latency)
it supports large numbers of hosts (scalable bandwidth)
Types
I.
II.
III.

Datagram switching
Virtual Circuit switching
Source Routing switching

I Datagram Switching
No connection setup phase
Each packet forwarded independently
Sometimes called connectionless model
Packets may follow different paths to reach their destination
Receiving station may need to reorder
Switches decide the route based on source and destination addresses in the packet
Analogy: postal system

Each switch maintains a forwarding table

Switching table for switch2

II Virtual Circuit Switching

Sometimes called connection-oriented model


Relationship between all packets in a message or session is preserved
Single route is chosen between sender and receiver at beginning of session
Call setup establishes virtual circuit; call teardown deletes the virtual circuit
All packets travel the same route in order
Approach is used in WANs, Frame Relay, and ATM
Analogy:phone call
Each switch maintains a VC table
The VC table in a single switch contains
o a Virtual circuit identifier (VCI)
o an incoming interface on which packets for this VC arrives
o an outgoing interface on which packets for this VC leave
o potentially different VCI for outgoing packets

III Source Routing

A third approach to switching that uses neither virtual circuits nor conventional
datagrams is known as source routing. The name derives from the fact that all the
information about network topology that is required to switch a packet across the network
is provided by the source host. Assign a number to each output of each switch and to
place that number in the header of the packet. The switching function is then very simple:
For each packet that arrives on an input, the switch would read the port number in the
header and transmit the packet on that output. There will be more than one switch in the
path between the sending and the receiving host. In such a case the header for the packet
needs to contain enough information to allow every switch in the path to determine which
output the packet needs to be placed on.

In this example, the packet needs to traverse three switches to get from host A to host B.
At switch 1, it needs to exit on port 1, at the next switch it needs to exit at port 0, and at
the third switch it needs to exit at port 3. Thus, the original header when the packet leaves
host A contains the list of ports (3, 0, 1), where we assume that each switch reads the
rightmost element of the list. To make sure that the next switch gets the appropriate
information, each switch rotates the list after it has read its own entry. Thus, the packet
header as it leaves switch 1 en route to switch 2 is now (1, 3, 0); switch 2 performs
another rotation and sends out a packet with (0, 1, 3) in the header.

Bridges and Extended LANs


A class of switches that is used to forward packets between shared-media LANs such as
Ethernets. Such switches are sometimes known by the name of LAN switches;
historically they have also been referred to as bridges. Operate in both physical and data
link layers

LANs have physical limitations (e.g 2500m). Bridge is used to connect two or more
LANs as shown below It uses Store and forward technique.

Extended LANs

a collection of LANs connected by one or more bridges is usually said to form an


extended LAN.

Learning Bridges/Transparent bridge

A bridge maintains a forwarding table to forward the packet that it receives. The
forwarding table contains two fields. One is host address filed and another one is used for
storing the port number of bridge on which the host is connected. For example,

Each packet carries a global address, and the bridge decides which output to send a frame
on by looking up that address in a table. Bridge inspects the source address in all the
frames it receives and records the fact in the table. When a frame is received by the
bridge, it opens the frame to see the destination address and then it checks the destination
address in the forwarding table. Suppose if the destination address is available in the table
then it forwards the frame to the respective one of its output port which is mentioned for

that destination host in the table. Suppose if the destination address is not in the table then
it floods the frame to all of its output port and then it uses the source address of the frame
to update the table. Thus the bridge learns the table entry to decide whether to
forward/discard the frame or to update the table and the algorithms are listed below:

Learning bridge example

Spanning Trees
It ensures the topology has no loops
Spanning tree
Sub-graph that covers all vertices but contains no cycles
Links not in the spanning tree do not forward frames

Constructing a Spanning Tree


Need a distributed algorithm
Switches cooperate to build the spanning tree

Key ingredients of the algorithm


Switches need to elect a root
The switch with the smallest identifier
Each switch identifies if its interface is on the shortest path from the root and it exclude
from the tree if not
Messages (Y, d, X)
From node X
Claiming Y is the root
And the distance is d

Steps in Spanning Tree Algorithm

Initially, each switch thinks it is the root


Switch sends a message out every interface
identifying itself as the root with distance 0

Example: switch X announces (X, 0, X)


Switches update their view of the root
Upon receiving a message, check the root id
If the new id is smaller, start viewing that switch as root
Switches compute their distance from the root
Add 1 to the distance received from a neighbor
Identify interfaces not on a shortest path to the root
and exclude them from the spanning tree

Example From Switch #4s Viewpoint

Switch #4 thinks it is the root


Sends (4, 0, 4) message to 2 and 7
Then, switch #4 hears from #2
Receives (2, 0, 2) message from 2
and thinks that #2 is the root
And realizes it is just one hop away
Then, switch #4 hears from #7
Receives (2, 1, 7) from 7
And realizes this is a longer path
So, prefers its own one-hop path
And removes 4-7 link from the tree
Switch #2 hears about switch #1
Switch 2 hears (1, 1, 3) from 3
Switch 2 starts treating 1 as root
And sends (1, 2, 2) to neighbors
Switch #4 hears from switch #2
Switch 4 starts treating 1 as root
And sends (1, 3, 4) to neighbors
Switch #4 hears from switch #7
Switch 4 receives (1, 3, 7) from 7
And realizes this is a longer path

So, prefers its own three-hop path


And removes 4-7 Iink from the tree

You might also like