Computer Networks
Computer Networks
ANNAMALAI UNIVERSITY
DIRECTORATE OF DISTANCE EDUCATION
COMPUTER NETWORKS
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Copyright Reserved
(For Private Circulation Only)
Computer Networks
Table of Content
UNIT – I Page No
1.0 Introduction 1
1.1 Objective 3
1.2 Content 3
1.2.1 Network Structure 3
1.2.2 Network Topology 5
1.2.3 Network Architecture 9
1.2.4 OSI Reference Model 10
1.2.5 Data Transmission in the OSI Model 13
1.2.6 Design issues for the layers 13
1.2.7 Communication between Layers 14
1.2.8 Standards Organization 18
1.2.9 Example Networks 19
1.3 Revision Points 23
1.4 In-text Questions 23
1.5 Summary 24
1.6 Terminal Exercises 25
1.7 Supplementary Materials 25
1.8 Assignment 25
1.9 Suggested Readings 25
1.10 Learning Activities 26
1.11 Keywords 26
UNIT – II
2.0 Introduction 27
2.1 Objective 27
2.2 Content 27
2.2.1 A Simplex Stop-and-Wait Protocol 27
2.2.2 Sliding Window Protocols 29
2.2.3 Protocol Performance 39
2.2.4 Protocol Specifications and Verification 42
2.2.5 Polling / Selection Protocol 48
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
2.2.6 Binary Synchronous Control (BSC)
2.2.7 High-Level Data Link Control (HDLC)
2.2.8 Synchronous Data Link Control (SDLC)
48
51
57
2.3 Revision Points 58
2.4 In-text Questions 58
2.5 Summary 58
2.6 Terminal Exercises 59
2.7 Supplementary Materials 60
2.8 Assignment 60
2.9 Suggested Readings 60
2.10 Learning Activities 60
2.11 Keywords 60
UNIT – III
3.0 Introduction 61
3.1 Objective 61
3.2 Content 61
3.2.1 What is LAN? 61
3.2.2 Characteristics of LAN 61
3.2.3 Components of LAN 64
3.2.4 IEEE Standard 802 for LAN 67
3.2.5 LAN Topologies 76
3.2.6 Transmission Media 85
3.2.7 Routing 87
3.2.8 Routing Algorithms 88
3.2.9 Congestion 98
3.2.10 Congestion Control Algorithms 99
3.2.11 Transport Protocols 102
3.3 Revision Points 106
3.4 In-text Questions 107
3.5 Summary 107
3.6 Terminal Exercises 108
3.7 Supplementary Materials 108
3.8 Assignment 109
3.9 Suggested Readings 109
3.10 Learning Activities 109
3.11 Keywords 109
UNIT – IV
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Computer Networks
UNIT – I
1.0 Introduction
The term Computer Networks can be referred to as an interconnected collection
of computers for information exchange. One or more transmission paths, often the
universally present telephone lines, can establish the interconnection.
The Uses of Computer Network
1. Resource Sharing:
Resource sharing is the primary goal, which makes all programs, data and
equipment available to everyone on the network regardless of the physical location of
the resource and the users. A network of computers can provide a powerful
communication medium among widely separated people.
2. High Reliability:
High reliability can be achieved by having alternative sources of supply. Since all
information can be replicated on more than one machine, if one of them is
unavailable due to a failure, the other copies could be used. The presence of multiple
CPUs means that if one goes down, the others may be able to take over its work,
although at reduced performance. The ability to continue to work even during a
hardware failure is of great importance.
3. Economical:
Another goal is saving money. Small computers have a much better price and
performance ratio than large ones. A network of small powerful personal computers
can achieve almost the same performance as that of larger mainframes.
4. Communication Medium:
A computer network can provide a powerful communication medium among
widely separated people. Using a network a report can be prepared by two or more
people together living far apart. Changes made to a document kept online will be
reflected to everyone on the network. This speedup makes cooperation among people
easy. In the long run, the use of networks to enhance human-to-human
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
communication may prove more important than technical goals.
Network Objectives
1. To provide sharing of resources such as information or processors.
2. To provide interprocess communication such as among users and processors.
3. To improve reliability of the networks through backup and recovery.
4. To provide distribution of processing functions.
5. To furnish centralized control for a geographically distributed system.
6. To provide centralized management and allocation of network resources.
Page 1
Computer Networks
Applications of Networks
1. Access to Remote Programs:
Programs residing on various remote terminals could be executed or used for
various purposes like gathering statistical information. A company that has produced
a model simulating the world economy may allow its clients to log in over the
network and run the program to see how various projected inflation rates, interest
rates, and currency fluctuations might affect their businesses.
2. Access to Remote Databases:
Another major area of network use is access to remote databases. A centralized
database is maintained to provide various services. With the help of this database, a
person sitting at home can make reservations for airplanes, trains, buses, hotels,
restaurants, theaters, and so on, anywhere in the world with instant confirmation.
Home banking and the automated newspaper also fall in this category.
3. Communication Medium:
A third category of potential widespread network use is as a communication
medium. One can send electronic mail from one terminal to another anywhere in the
world. The mail can contain digitized voice, still pictures and even moving television
and video images.
Advantages of Networks
The important advantages of computer network can be summarized as below:
1. Modern organizations today are widely dispersed, with offices located in diverse
parts of a country and the world. Many of the computers and terminals at the sites
need to exchange information and data. A network provides the means to
exchange data and to make programs and data available to all the people of the
enterprise.
2. The networking of computers permits the sharing of resources. Such load sharing
permits a better, more even utilization of resources.
3. Networking also supports the critical function of backup.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
4. The use of networking allows a very flexible working environment. Employees
can work at home by using terminals tied through networks to the computer at the
office.
Page 2
Computer Networks
1.1 Objective
The objective of this lesson is to understand the fundamentals of Computer Networks,
which include a wide range of topics from network and data communication concepts.
The fundamental concepts include applications of network, advantages of network and
network topology. The Open System Interconnection model is a layered frame work for
design of network systems that allows for communication across all types of computer
systems. Understanding the fundamentals of the OSI model provides a solid basis for
exploration of data communication. At the end of the lesson you learn about Standard
organizations and Example Networks.
1.2 Content
In any network there exists a collection of machines intended for running user or
application programs. These machines are called host or end system. The hosts are
connected by the communication subnet. The job of the subnet is to carry messages from
host to host. The subnet consists of two distinct components: transmission lines and
switching elements. Transmission lines move bits between machines. The switching
elements are specialized computers used to connect two or more transmission lines.
When data arrive on an incoming line, the switching element will choose one of them and
place it on the output line, called IMPs (Interface Message Processors).
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
There are two types of communication subnet;
1. Point-to-Point Channel:
When a message called packet is sent from one IMP to another, the packet is received
at every intermediate IMP, stored there until the required output line is free and then
forwarded towards the destination. Here the network contains numerous cables or leased
telephone lines each connecting a pair of IMPs. This principle is also called store-and
forward or packet-switched subnet. Almost all wide area networks use this kind of
subnets. When point-to-point subnet is used, the design of IMP interconnection topology
is important. The following figure shows the several topologies available.
Page 3
Computer Networks
Figure 1.2: Some possible topologies for a Point-to-point Subnet (a) Star (b) Ring (c)
Tree (d) Complete (e) Intersecting Rings (f) Irregular
Local area networks have a symmetric topology, whereas wide area network have
irregular topologies.
2. Broadcast Channel:
Most local area networks and a small number of wide area networks are of this type.
In a local area network, the IMP is reduced to a single chip embedded inside the host, so
there is always one host per IMP, whereas in a wide area network there may be many
hosts per IMP. Broadcast systems have a single communication channel that is shared by
all the machines on the network. Packets sent by any machine are received by all the
others. An address field within the packet specifies for whom it is intended. Upon
receiving a packet, a machine checks the address field. If the packet is intended for some
other machine, it is just ignored.
Broadcast systems generally also allow the possibility of addressing a packet to all
destinations by using a special code in the address field. When a packet with this code is
transmitted, it is received and processed by every machine on the network. Some
broadcast systems also support transmission to a subset of the machines, known as
multicasting.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
The following figure shows some broadcast topologies:
Page 4
Computer Networks
In a bus or cable network, at any instant one machine is master and is allowed to
transmit. All other machines should not send the messages. An arbitration mechanism is
needed to resolve conflicts when two or more machines want to transmit simultaneously.
This mechanism may be centralized or decentralized.
A second possibility is a satellite or ground radio system. Each IMP has an antenna
through which they can send and receive. All IMPs can hear the output from the satellite,
and in some cases they can also hear the upwards transmissions of their fellow IMPs to
the satellite as well.
A third broadcast system is ring in which each bit propagates around on its own, not
waiting for the rest of the packet to which it belongs. Typically, each bit circumnavigates
the entire ring in the time it takes to transmit a few bits, often even before the complete
packet has been transmitted.
Broadcast subnets can be further divided into static and dynamic, depending on how
the channel is allocated. A typical static allocation would be to divide uptime into
discrete intervals, and run a round robin, allowing each Mac machine to broadcast only
when its time slot comes up. Static allocation wastes channel capacity when a machine
has nothing to say during its allocated slot.
Dynamic allocation methods for a common channel are either centralized or
decentralized. In the centralized channel allocation method, there is a single entity,
which determines who goes next. It might do this by accepting requests and making a
decision according to some internal algorithm. In the decentralized channel allocation
method, there is no central entity; each machine must decide for itself whether or not to
transmit.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
2. Route the traffic across the least-cost path within the network between the sending
and receiving host (although the least-cost route may not be chosen if other
factors, such as reliability, are more important).
3. Give the end user the best possible response time and throughput.
The more common network topologies are:
The hierarchical topology (tree)
The horizontal topology (bus)
The star topology
The ring topology (hub)
The completely connected topology
Page 5
Computer Networks
Hierarchical Topology
The Hierarchical topology is also called a tree topology or a tree network. It is one of
the common networks found today.
Page 6
Computer Networks
Advantage:
1. Easy to construct the network.
2. Simplicity in traffic control between and among hosts.
3. All stations receive every transmission.
Disadvantage:
1. Only one-communication channel exists to service all the devices on the network.
2. The entire network is lost, in the event of communication channel failure.
Star Topology
In a star configuration of computer network, there is a host computer which is
attached to local computers through multiple communication lines. The local computers
are not linked directly to each other and can communicate only via the host computer.
The routing function is performed by the host computer which centrally controls
communication between any two local computers by establishing a logical path between
them.
Advantage:
1. Traffic flow is simple and easy to control
2. Star topology has minimal line cost because only n-1 lines are required for
connecting n nodes.
3. Transmission delays between two nodes do not increase by adding new nodes to
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
the network because any two nodes may be connected via two links only.
4. If any of the local computers fail, the remaining portion of the network is
unaffected.
Disadvantage:
The system crucially depends on the central node. If the host computer fails, the
entire network fails.
Page 7
Computer Networks
Ring Topology
The Ring topology is so named because of the circular aspect of the data flow. In
most instances, data flows in one direction only, with one single station receiving the
signal and relaying it to the next station on the ring. The logic to implement a ring
network is relatively simple. Each component is tasked with a straightforward job of
accepting the data, sending it to the host, attached to it, or sending it out on the ring to the
next intermediate component.
Advantage:
1. The ring network works well where there is no central-site computer system. It is
a truly distributed data processing system.
2. It is more reliable because communication is not dependent on a single host
computer. If one line between any two computers breaks down, or if one of the
computers breaks down, alternate routing is possible.
Disadvantage:
1. In a ring network, communication delay is directly proportional to the number of
nodes in the network. Hence addition of new nodes in the network increases the
communication delays.
2. If a channel between two nodes fails, the entire network is lost.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Completely Connected Topology
A completely connected network has a separate physical link for connecting each
node to any other node. Thus, each computer of such network has a direct dedicated link,
called a point-to-point link with all other computers of the network. The control is
distributed with each computer deciding its communication priorities.
Page 8
Computer Networks
Disadvantage:
1. It is the most expensive system from the point of view of line costs.
Mesh Topology
The Mesh topology has been used in the last few years. Its attraction is its
relative immunity to bottleneck and failure problems. Due to the multiplicity of paths
from the DTEs and DSEs (Data Switching Equipment), traffic can be routed around
failed components or busy nodes. Even though this approach is an expensive
undertaking, some users prefer the reliability of the mesh network to that of the others,
especially for networks with only a few nodes that need to be connected.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
1.2.3 Network Architecture
To reduce the network design complexities, most networks are organized as a
series of layers or levels, each one built upon its protocol predecessor. The number of
layers, the name of each layer, the contents of each layer and the function of the layer
differ from network to network. A layer format is as shown below:
Page 9
Computer Networks
But according to OSI reference model, the principles used to arrive at the layers
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
can be noted as below:
1. A layer should be created where a different level of abstraction is needed.
2. Each layer should perform a well-defined function.
3. The function of each layer should be chosen with an eye towards defining
internationally standardized protocols.
4. The layer boundaries should be chosen to minimize the information across the
interfaces.
Page 10
Computer Networks
5. The number of layers should be large enough that the distinct functions need not
be thrown together in the same layer and small enough that the architecture does
not become unwieldy.
The Physical layer is concerned with transmitting raw bits over a communication
channel. Efforts should be made to see that, when a 1 bit is sent, it is received by the
other side as a 1 bit, not as a 0 bit. The design issues here largely deal with mechanical,
electrical, and procedural interfaces, and the physical transmission medium.
The main task of the data link layer is to take a raw transmission facility and
transform it into a line that appears free of transmission errors to the network layer. It
accomplishes this task by having the sender break the input data into data frames
(typically a few hundred bytes), transmit the frames sequentially, and process the
acknowledgement frames sent back by the receiver. Frame boundary identification is
taken care of by this layer. In case of information frame loss, this layer retransmits the
same frame in a controlled manner. It handles flow control and uses the channel
bandwidth efficiently (piggy backing).
Page 11
Computer Networks
If traffic can only go one way at a time the session layer can help keep track of whose
turn it is.
Another service provided is the token management. This service prevents both
the sides from performing the same operation at the same time. Session layer provides
tokens. Only the side holding the token can perform the critical operation.
Yet another service is Synchronization. This service attempts to solve problems
that might arise during long duration file transfer between machines on the network.
The sending process has some data it wants to send to the receiving process. It
gives the data to the application layer, which attaches an application header to the front of
presentation layer. The presentation layer, not aware of what data has been received,
transforms it in various ways, adds a header to the front of it and gives the result to the
session layer. This process is repeated till the data reaches the physical layer, where the
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
actual transmission of data to receiving machine takes places. On the receiving machine,
as the data moves up the layers, the various headers are removed before the message
arrives at the receiving process.
Page 12
Computer Networks
The key design issues in computer networking are found in several layers.
1. Connection Management:
2. Connection Termination:
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
When a connection across the network is no longer needed, efforts should be
taken to terminate them.
3. Addressing Techniques:
Page 13
Computer Networks
5. Error Control:
6. Packet Sequencing:
A data block is divided into number of fragments. Protocol must provide some
way of sequencing these packets, to prevent any possible loss. Maintenance of sequence
of information transferred is important.
7. Synchronization:
Alleviating the problem of speed mismatch between faster sender and slower
receiver must be taken care. Due to varying speeds between different machines, some
method of speed compatibility among these is essential to prevent the swamping of data
over a slow terminal.
8. Routing Information:
When there are multiple paths existing between source and destination, a route
must be chosen taking into account the cost per each feasible route. Message
disassembling, transmitting and assembling details are considered in case of long
message transfer.
The basic idea for a layer is to add a value to the upper layers it services.
Consequently, the top layer, which interfaces directly with the end-user applications, is
Page 14
Computer Networks
provided with full range of services offered by all the lower layers. The upper layers to
the lower layers dictate the actual services invoked.
i. invoke a function or
ii. indicate a function has been invoked at a service access point
(SAP)
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
A user application invokes a service provider function by sending a request to the
next lower layer. This service request is affirmed by the service provider returning a
confirm. If the service is going to provide a function for another user (here user B), the
service provider must send an indication to B, after which B is required to provide a
response. Assuming the service provider is a layer, it connects to the users A and B
through layer service access points (SAPs). A and B must know the associated SAP to
receive the specific service from the service provider. The SAP contains the address or
identifier of the specific service function.
Page 15
Computer Networks
Page 16
Computer Networks
A Pragmatic Illustration
Page 17
Computer Networks
Page 18
Computer Networks
Network Standardization
The procedure adopted by ISO is as follows:
1. A working group is formed and the DP (Draft Proposal) is designed first. The DP
is circulated among the member bodies for comments.
2. After a majority approves, a DIS (Draft International Standard) is developed and
circulated for comments.
3. At the end of the DIS round, the final text called IS (International Standard) is
developed, approved and published.
After this the trough indicates a low standardization effort. This may be due to
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
poor understanding of the concept. Once the concept is standardized and well framed, a
lot of interest is shown by organizations in incorporating the facility and perhaps a lot of
investment in the project.
Numerous networks are currently operating around the world. Some of them
owned by governments, some for research work, some are owned by private
organizations and so on.
Page 19
Computer Networks
Public Networks
The networks which is owned either by Government or by private organization
but by an individual network operator, providing communication services for the
customers’ hosts and terminals. Such a system is called public networks.
All of them use of OSI model and the standard CCITT (Consultative Committee
International for Telephony and Telegraphy, a French standard organization) or OSI
protocols for all the layers. For the lowest three layers, CCITT has issued
recommendations that have been universally adopted by public networks worldwide.
These layers are always known collectively as X.25 standards.
The physical layer protocol, called X.21, specifies the physical, electrical and
procedural interface between the host and the network. The data link layer standard has a
number of variations. They all are designed to deal with transmission errors on the
telephone line between the user’s equipment and the network. The network layer
protocol deals with addressing flow control, delivery confirmation, interrupts and related
issues.
ISO has developed standards for a connection-oriented transport layer service
definition and a connection-oriented transport layer protocol. Also it has adopted
standards for the connection-oriented session service and protocol and presentation
service and protocol.
The Application layer contains following protocols:
FTAM (File Transfer, access and Management) protocol, which provides a way
to transfer, access and generally manipulate remote files in a uniform way.
MOTIS (Message-Oriented Text Interchange Systems) protocol is used for
electronic mail.
VTP (Virtual Terminal Protocol) provides a terminal-independent way for
programs to access remote terminals.
JTM (Job Transfer and Manipulation) protocol is used for submitting jobs to
remote mainframe computers for batch processing.
ARPANET
The ARPANET (American Research Project agency NET work), now called
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
DARPA, owned by US Defense, does not follow the OSI model at all. The IMP-IMP
protocol really corresponds to a mixture of the layer 2 and layer 3 protocols. Layer 3 also
contains an elaborate routing mechanism. In addition, there is a mechanism that
explicitly verifies the correct reception at the destination IMP of each and every layer of
protocol sent by the source IMP.
The ARPANET does have protocols that roughly cover the same territory as the
OSI network and transport protocols. The network protocol, called IP (Internet Protocol)
is connectionless and was designed to handle the interconnection of the vast number of
WAN and LAN. The ARPANET transport protocol is a connection-oriented protocol
Page 20
Computer Networks
Enduser
NAU Services
Data Flow Control
Transmission Control
Path Link Control
Data Link Control
Physical Link Control
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Figure 1.18: Protocol Hierarchy in SNA
The lowest SNA layer takes care of physically transporting bits from one machine
to another. The data link layer constructs frames from the raw bit stream, detecting and
recovering from transmissions errors.
Layer 3 in SNA, called Path Control, is concerned with establishing a logical path
from source NAU to destination NAU. Path Control consists of three sublayers. The
highest sublayer does the global routing, deciding which sequence of subareas should be
used to get from the source sub area to the destination subarea. The sequence is called
virtual route. Two sub areas may be connected by several kinds of communication lines
Page 21
Computer Networks
so that the next sub layer chooses the specific lines to use, giving an explicit route. The
lowest sublayer splits traffic among several parallel communication links of the same
type to achieve greater bandwidth and reliability.
It is the job of Transmission Control Layer to create, manage and delete transport
connections (sessions). The Data Link Layer keeps track of which end of session is
supposed to talk next. This layer is also doing error recovery functions. The NAU
services layer provides two classes of services to the user process. First there are
presentation services such as text compression. Second there are session services for
setting up connections. In addition there are network services which maintain the
operation of the network.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Page 22
Computer Networks
Computer Network
A network is a communication system that allows users to access resources on other
computers and exchange messages with other users. It allows users to share resources on
their own systems with other network users and to access information on centrally
located systems or systems that are located at remote offices. It may provide connections
to the Internet or the networks of other organizations.
Protocol
It is a set of rules that governs the data communication is called Protocol. The Key
elements of protocol are Syntax, Semantics and Timing.
Topology
A network topology is the physical layout of a network.
Network Architecture
A set of layers and protocols is called as network architecture.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
1.4 Intext Questions
Page 23
Computer Networks
5. Describe the ISO/OSI reference model of computer network and the services
provided by the layers with neat diagram.
6. Discuss in detail the design issues for layers.
7. List some of the major disadvantages with the layered approach to protocols.
8. Explain briefly the SNA architecture.
1.5 Summary
The term Computer Networks can be referred to as an interconnected collection
of computers for information exchange. The interconnection can be established by
one or more transmission paths, often the universally present telephone lines.
Computer Network is a powerful communication medium with varied use and
advantages. Its primary goal is to provide Resource Sharing, High Reliability and
Saving money.
Most wide area networks have a collection of hosts communicating via a subnet.
The subnet may utilize multiple point-to-point lines between IMPs, or a single
common broadcast channel, as in a satellite network.
Local area networks connect the hosts directly onto a cable using an interface chip
that is somewhat analogous to the IMP in a wide area network.
Network Topology is nothing but the network configuration which determines
the data paths that may be used between any pair of stations of the network.
These topologies serve to reduce the costs and to provide reliability, high
throughput and low delay in the networks.
Networks are always designed as a series of protocol layers, with each layer
responsible for some aspect of the network’s operation. The seven-layer OSI
model consists of the physical link layer, data link layer, network layer, transport
layer, session layer, presentation layer and application layer.
The physical layer is concerned with standardizing network connectors and their
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
electrical properties. The data link layer breaks the raw bit stream up into discrete
units and exchanges these units using a protocol. The network layer takes care of
routing. The transport layer provides reliable, end-to-end connections to the
higher layers. The session layer enhances the transport layer by adding facilities
to help recover from crashes and other problems. The presentation layer deals
with standardizing the way data structures are described and represented. Finally,
the application layer contains file transfer, electronic mail, virtual terminal and a
number of application specific protocols.
Few of the networks in operation are the public networks, ARPANET, MAP and
TOP, USENET, CSNET, BITNET, SNA.
Page 24
Computer Networks
1.8 Assignments
1. Find out what networks are used at your school or place of work. Describe the
network types, topologies, and switching methods used there.
2. Which of the OSI layers handles each of the following:
a. (a) Dividing the transmitted bit stream into frames.
b. (b) Determining which route through the subnet to use.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
3. If the unit exchanged at the data link level is called a frame and the unit
exchanged at the network level is called a packet, do frames encapsulate
packets or do packets encapsulate frames? Explain your answer.
Page 25
Computer Networks
3. http://www.isoc.org/internet-history
4. http://www.ibm.com/Products
5. http://pclt.cis.yale.edu/pclt/COMM/SNA.HTM
1.11 Keywords
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Page 26
Computer Networks
UNIT - II
2.0 Introduction
This unit provides a general description of how the Data Transmitting Equipments
(DTE) or the end user machines exchange data among them. The term protocol describes
the procedures and logic used for this purpose.
Several protocols are available to manage the communication. Two important protocols
are
1. Link or Line Protocol: This is responsible for controlling the flow of the traffic
on each channel.
2. Switching or Routing Protocol: This selects the best among several available
channels for the line protocol.
2.1 Objective
This unit provides a detailed description about the Elementary Data link protocols
and Bit oriented and Character oriented protocols. It includes Simplex stop and wait
protocol, Sliding window protocols, Binary Synchronous Control and High Level Data
Link Control. HDLC is a bit-oriented, link layer protocol for the transmission of data
over synchronous networks and is defined by the ISO. At the end of the lesson you learn
about how the end user machines exchange data among them.
2.2 Content
Page 27
Computer Networks
Stop and wait protocols use sequence numbers during data transmissions. In the
figure data are transmitted with sequence number starting from 0, from site A to site B.
Sequence numbers are added to each transmission. Data transmitted from site A are
checked in site B. The computer then responds with an ACK (event 2). The ACK has the
same sequence number as that of its data. On receiving ACK, site A transmits another
data with sequence number 1 (event 3). The data is checked for error in site B and ACK
of 1 is sent. Since there is a frame loss during ACK 1 of event 4, site A performs a
timeout. After not receiving reply to its transmission within a given period, it retransmits
the data. Hence data transmitted in event 5 and event 3 are the same. If the sequence
number does not exist, this kind of loss cannot be compensated. Since the sequence
number received by site B is the same as the one received previously, it discards it to
avoid redundancy and retransmits ACK 1, to complete the accountability.
The stop-and-wait protocol (Protocol 2) provides for a one directional flow of
data from sender to receiver. The communications channel is assumed to be error free.
However, the receiver has only a finite buffer capacity and a finite processing speed, so
the protocol must explicitly prevent the sender from flooding the receiver with data faster
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
than it can be handled.
The following program illustrates the protocol:
type EvType = (FrameArrival);
procedure sender 2;
var s: frame;
buffer: packet;
event : EvType;
begin
Page 28
Computer Networks
repeat
FromNetworkLayer (buffer); {fetch information from the network
layer}
s.info : = buffer; {copy it into s for subsequent transmission}
ToPhysicalLayer(s); {bye bye little frame}
Wait (event) {do not proceed until given go ahead}
until doomsday
end; {sender2}
procedure receiver2;
var r,s: frame;
event : EvType;
begin
repeat
wait (event); {only possibility is FrameArrival}
FromPhysicalLayer(r); {go get the frame}
ToNetworkLayer (r.info); {give the packet to the network layer}
ToPhysicalLayer(s) {send a dummy frame as a go ahead
signal}
until doomsday
end; {receiver2}
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
The essence of all sliding window protocol is that at any instance of time, the
sender maintains a list of consecutive sequence numbers corresponding to frames it is
permitted to send. These frames are said to fall within the sending window. The receiver
also maintains a receiving window corresponding to frames it is permitted to accept.
State variable or counters control the windows at the transmitting and receiving
site. The transmitting site maintains a send state variable [V(S)], which is the sequence
number of the next frame to be transmitted. The receiving site maintains a receive state
variable [V(R)], which contains the number that is expected to be in the sequence
number of the next frame. The V(S) is incremented with each frame transmitted and
placed in the send sequence field in the frame. Upon receiving the frame, the receiving
site checks for a transmission error and the send sequence number with its V(R). If the
Page 29
Computer Networks
frame is acceptable, it increments V(R) by one, places it into a receive sequence number
field in an acknowledgement (ACK) frame, and sends it to the original transmitting site
to complete the accountability for the transmission. If the V(R) does not match the send
sequence number in the frame, an error is detected. After a timeout occurs, a NAK
(Negative Acknowledgement) is sent to the original transmitting site. The transmitting
site on receiving NAK, reset its V(S) and retransmit the frame whose sequence number
matches the value of V(R).
Window size is an important design consideration. The larger the window, the
more frames can be transmitted without a response from the receiver. Yet the larger
window size also means that the receiver must allocate more resources and larger buffer
to handle the incoming transmissions.
const MaxSeq = 1;
Page 30
Computer Networks
procedure protocol4;
var NextFrameToSend : SequenceNr; {0 or 1 only}
FrameExpected : SequenceNr; {0 or 1 only}
r,s : frame; {scratch variables}
buffer : packet; {current packet being sent}
event : EvType;
begin
NextFrameToSend := 0; {initialize outbound stream}
FrameExpected := 0; {initialize inbound stream}
FromNetworkLayer(buffer); {fetch packet from network layer}
s.info := buffer; {prepare to send initial frame}
s.seq := NextFrameToSend; {frame sequence number}
s.ack := 1 – FrameExpected; {piggybacked ack}
ToPhysicalLayer(s); {transmit the frame}
StartTimer (s.seq); {start the timer running}
repeat
wait(event); {FrameArrival,CksumErr,Timeout}
if event = FrameArrival then
begin {an inbound frame made it without
error}
FromPhysicalLayer(r); {go get it}
if r.sqe = FrameExpected then
begin {handle inbound frame stream)
ToNetworkLayer(r.info); {pass the packet to the network
layer}
inc(FrameExpected) {invert the receiver seq number}
end;
if r.ack = NextFrameToSend then
end;
s.info := buffer; {construct outbound frame}
s.seq := NextFrameToSend; {insert sequence number into it}
s.ack := 1 – Frame Expected; {this is sequence number of last
received frame}
ToPhysicalLayer(s); {transmit a frame}
StartTimer(s.seq) {Start the timer running}
Page 31
Computer Networks
until doomsday
end; {protocol 4}
Figure 2.2: Two scenarios for protocol 4. The notation is (seq, ack, packet, number).
An asterisk indicates where a network layer accepts a packet.
In part (a) the normal operation of the protocol is shown. In part B the peculiarity
is illustrated. If B waits for A’s first frame before sending its own, the sequence is as
shown in (a), and every frame is accepted. But if A and B simultaneously initiate
communication, their first frames cross, and the data link layers then get into situation
(b). In (a) each frame arrival brings a new packet for the network layer and there are no
duplicates. In (b) half of the frames contain duplicates, even though there are no
transmission errors.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Protocol Using Go Back n
The time required for a frame to arrive at the receiver plus the transmission m
acknowledgement frame was assumed negligible in the other protocols. In case of
satellite communication, it takes 270 millisecond to transmit a frame and 520 millisecond
is needed before the acknowledgement arrives. The solution here is the sender is allowed
to send up to w frames and the acknowledgement will arrive after the roundtrip time gets
equal. The technique of allowing the sender to send the data and receiver acknowledging
them in parallel is called Pipelining.
If the channel capacity is b bits/sec and frame size l bits and the roundtrip
propagation time R sec, the time required to transmit a single frame is l/b sec. There is a
Page 32
Computer Networks
delay of R/2 before the last bit arrives and another R/2 before acknowledgement arrives.
The line utilization for the stop-and-wait is l/(l+bR). Pipelining has a serious drawback
when one of the frames gets damaged in the middle. This could be overcome by the Go
Back n protocol.
This approach is mainly used for dealing with errors when the frames are
pipelined. The receiver simply discards all subsequent frames, sending no
acknowledgements. Here the receiver window is of size 1. In other words, the data link
layer refuses to accept any frame except the next one it must give to the network layer. If
the sender’s window fills up before the timer runs out, the pipeline will begin to empty.
Eventually, the sender will time out and retransmit all unacknowledged frames in order,
starting with the damaged or lost one. This approach can waste a lot of bandwidth if the
error rate is high. This approach is shown in the figure 2.3
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
var NextFrameToSend: SequenceNr;
AckExpected:SequenceNr;
FrameExpected:SequenceNr;
{MaxSeq.1; used for outbound frame stream}
{oldest frame as yet unacknowledged}
{next frame expected on inbound stream}
r.s:frame; {Scratch variables}
buffer:array[sequenceNr] of {buffers for the outbound stream}
packet;
nbuffered:SequenceNr; {how many buffer slots are currently in use}
i:SequenceNr; {used to index into buffer}
event:EvType;
Page 33
Computer Networks
Repeat
wait(event); {FrameArrival, CksumErr, TimeOUt,
NetworkLayerReady}
case event of
NetworkLayerReady: {the network layer has a packet to send}
Begin {accept, save and transmit a new frame}
FromNetworkLayer(buffer[NextFrame {accept packet from network layer)
ToSend]);
nbuffered := nbuffered + 1; {one more frame buffered now}
SendData(NextFrameToSend); {transmit the frame}
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
inc(NextFrameToSend)
end;
{expand sender’s window}
Page 34
Computer Networks
{ack n implles n – 1 , n – 2,
etc; check for this}
while between (AckExpected,
r.ack, NextFrameToSend) do
Begin {handle the piggybacked ack}
nbuffered := nbuffered – 1; One frame fewer buffered}
StopTimer(AckExpected); {frame not lost, stop timer}
inc(AckExpected) {contract sender’s window}
End
end;
CksumErr: ; {just ignore bad frames}
{trouble;retransmit all outstanding
TimeOut: frames}
Begin
NextFrameToSend := AckExpected; {start retransmitting here}
for i := 1 to nbuffered do
Begin
SendData(NextFrameToSend)
inc(NextFrameToSend)
End
end
end;
This strategy corresponds to a receiver window larger than 1. Any frame within
the window may be accepted and buffered until all the preceding ones have been passed
Page 35
Computer Networks
to the network layer. This approach can require large amounts of data link layer memory
if the window is large.
Figure 2.4: Effect of an error when the receiver window size is large
The problem here is that after the receiver has advanced its window, the new
range of sequence numbers overlapped the old one. To overcome this, the maximum
window size must be half the range of sequence numbers. In general, the window size
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
for this protocol will be (Max.seq + 1). The number of buffers, number of timers is equal
to the window size.
Page 36
Computer Networks
This protocol (Protocol 6 non-sequential receive) accepts frames out of order, but
passes packets to the network layer in order. Associated with each outstanding frame is a
timer. When the timer goes off, only that frame is retransmitted, not all the outstanding
frames.
A sliding window protocol using selective repeat
Page 37
Computer Networks
Begin
EnableNetworkLayer; {initialization begins here}
NextFrameToSend := 0;AckExpected := 0 FrameExpected:= 0
TooFar := NrBuf; nbuffered := 0; NoNak := true;
for i : = 0 to MaxBuf do arrived[i] := false;
Repeat
wait(event); {five possibilities; see EvType above}
case event of
NetworkLayerReady: {accept, save, and transmit a new
frame}
Begin
nbuffered := nbuffered + 1; {expand window}
FromNetworkLayer(OutBuf[NextFrameToSend {fetch new packet}
mod NrBufs]):
SendFrame(data, {transmit frame}
NextFrameToSend);
Inc(NextFrameToSend) {advance upper window edge}
end;
FrameArrival: {a data or control frame has arrived}
begin FromPhysicalLayer (r); {fetch the frame from the physical
layer}
if r.kind = data then
Begin {frames may be accepted in any order}
arrived [r.seq mod NrBufs] {mark buffer as full}
:= true
InBuf[r.seq mod NrBusf] := [insert data in buffer}
r.info;
while arrived [FrameExpected
mod NrBufs] do
Begin {pass frames and advance window}
To NetworkLayer(InBuf[FrameExpected
mod NrBufs]);
NoNak := true;
arrived [FrameExpected mod
NrBufs] := false;
inc(FrameExpected); {advance lower edge of receiver
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
inc(TooFar);
window}
{advance upper edge + 1 of receiver
window
StartAckTimer {to see if separate ack needed}
End
End
end; {end of code for data frame}
if (r.kind = nak) and
Page 38
Computer Networks
NetworkLayerIdle: Send Frame(ack, 0) {network layer idle too long, send ack}
end; {end of case}
until doomsday
end; {protocol6}
The basic approach for determining the efficiency of any protocol is to determine
how much bandwidth is utilized to send the statistically average frame, considering all
retransmissions and timeouts. The following notations are used for the derivation:
Page 39
Computer Networks
If the receivers time has a low variance, the sender adjusts it’s time just above the
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
time required for the acknowledgement to arrive T = A/C +2I approximately. The
channel efficiency then becomes,
D 1
U = x (1 - P1) (1 - P2) x
H+D 1 + CT/(H + D)
The first factor represents the loss due to header overhead. The second due to
errors and the third due to stop-and-wait.
Page 40
Computer Networks
Each bit has a probability E of being in error, independent of its predecessors and
successors is assumed. With this assumption and A = H the channel utilization is given
by the formula,
D 1
H+D H
U = x (1 - E) (1 - E) x
H+D 1 + CT/(H + D)
The frame size must neither be too short nor too long. So, the optimum frame
size is chosen depending on the header size, error rate, raw bandwidth and timeout
interval. By taking the partial derivative of U with respect to D and set it to zero,
H + CT
D2 + D(H + CT) + =0
ln(1 – E)
with solution,
H + CT
Dopt = 1 – 4 /[H + CT) ln(1 – E)] - 1
2
If E is very small
Dopt (H + CT)/E
The telephone system’s actual measurement shows that the errors are not random
but in burst. So, P1 = 1 – (1 – E)H + D is not accurate. P1 =K(H = D)α provides a better
fit.
For the protocol with Go Back n, the efficiency can also be determined by
assuming that piggybacked acknowledgements are free. The total bandwidth occupied is,
H + D + R[W(H + D) + CT]. The channel efficiency then becomes,
D
U =
H + D + R[W(H + D) + CT]
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
piggybacked onto reverse traffic, interrupt-processing time is negligible, so I is equal to
the one-way propagation time T.
There are two cases to consider when considering an error free channel. If the
window is large enough, the sender can just keep going full speed because the
acknowledgements get back before the senders window fills up. The frame transmission
time is F/C, so the sender may continue for a time WF/C at which point it must stop if the
first frame has not yet been acknowledged. The first acknowledgement can come back 2I
after the first frame has been transmitted so the acknowledgement arrives at F/C + 2I.
The transmitter will be able to run continuously if WF/C ≥ F/C + 2I. This can be solved
for W giving:
Page 41
Computer Networks
D W
U= x
H+D 1 + 2CI/(H + D)
Considering the effect of errors, the performances are different due to the number
of transmissions.
In the large window case, transmission is still continuous, except that now extra
frames must be sent to correct damaged frames. The expected number of transmissions
per frame is 1/(1 – L), so to receive W frames without error, W/(1 – l) of them must be
transmitted. This implies,
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Case 4: W < 1 = 2CI/F (small window, with errors)
D W
U= x (1 – L) x
H+D 1 + 2CI/(H + D)
Page 42
Computer Networks
Page 43
Computer Networks
At the beginning of time, all processes are in their initial states. Then events
begin to happen, such as frames becoming available for transmission or timers going off.
Each event may cause one of the processes or the channel to take an action and switch to
a new state. By carefully enumerating each possible successor to each state, one can
build the rechability graph and analyze the protocol. Reachability analysis can be used to
detect a variety of errors in the protocol specification.
As an example of the finite state machine model, consider the figure 2.5.
(a)
Transition who Frame Frame To network
runs? accepted emitted layer
0 - (Frame lost) -
1 R 0 A Yes
2 S A 1 -
3 R 1 A Yes
4 S A 0 -
5 R 0 A No
6 R 1 A No
7 S (Timeout) 0 -
8 S (Timeout) 1 -
(b)
Figure 2.5: (a) State diagram of the Protocols (b) Transitions
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Each protocol machine has two states and the channel has four states. Each state
is labeled by three characters, XYZ, where X is 0 or 1, corresponding to the frame the
sender is trying to send; Y is also 0 or 1, corresponding to the frame the receiver expects,
and Z is 0,1,A or empty (--), corresponding to the state of the channel. Here the initial
state has been chosen as (000). The sender has just sent frame 0, the receiver expects
frame 0, and frame 0 is currently on the channel.
Transition 0 consists of the channel losing its contents. Transition 1 consists of
the channel correctly delivering packet 0 to the receiver, with the receiver then changing
its state to expect frame 1 and emitting an acknowledgement. Transition 1 also
Page 44
Computer Networks
0 - (frame lost) -
1 R 0 A YES
2 S A 1 -
3 R 1 A YES
4 S A 0 -
5 R 0 A NO
6 R 1 A NO
7 S (timeout) 0 -
8 s (timeout) 1 -
The arrival of a frame with a checksum error does not change the state. During
normal operation, transitions 1,2,3, and 5 are repeated in order over and over. In each
cycle, two packets are delivered, bringing the sender back to the initial state of trying to
send a new frame with sequence number 0. If the channel loses frame 0, it makes a
transition from state (000) to state (00-). The sender times out (transition 7) and the
system moves back to (000). The loss of an acknowledgement is more complicated,
requiring two transitions, 7 and 5, or 8 and 6, to repair the damage.
The following table gives a simplified version of the 802.5 token ring protocol,
which is fully specified in the standard as a finite state machine.
A simplified finite state machine for IEEE 802.5
Current Event Event/Action New
State Number State
1 1 Frame available and token captured 2
1 2 Frame error/Set E=1 1
1 3 Destination = MA / Set A = 1 1
1 4 Frame copied/Set C=1 1
2 5 Error (e.g. control frame seen)/Put token 1
2 6 End of frame transmission 3
ANNAMALAI
ANNAMALAI UNIVERSITY
3
3 UNIVERSITY
7
8
Frame header comes around
Timer expires/Put token on ring
4
1
4 9 Frame drained/Put token on ring 1
4 10 Timer expires/Put on ring 1
In this model the station can be of the four states:
1. In repeat mode, copying bits (i.e., not transmitting)
2. Transmitting a frame
3. Waiting for the newly transmitted frame to come around
4. Draining the frame from the ring
Page 45
Computer Networks
In each state one or more events are possible. Some of the events trigger actions
like setting bits in the frame passing through the station in addition to possible state
changes. A brief description of the ten possible events follows:
1. The station has a frame to send and has captured the token.
2. An error has been detected on a frame being copied.
3. The frame is directed to the station (My Address, station busy).
4. The frame can be copied to the station (MY Address, station idle).
5. Error detected after token capture (e.g., claim token frame seen).
6. The frame has been fully transmitted.
7. The header of the transmitted frame has circumnavigated the ring.
8. The frame just transmitted has apparently been lost.
9. The entire frame just transmitted has been removed from the ring.
10. The end-to-frame sequence has apparently been damaged.
trans
from state_1 {current state}
to state_2 {new state}
when event {some even occurs}
provided predicate {some Boolean condition holds}
priority expression {priority of this transition}
begin
. {actions to take}
end.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
The Estelle programmer can define protocol states and give them symbolic
names. These names appear in the from and to clauses of the transition. When the
process is in state State _ 1, the transition described can occur. Otherwise it cannot
occur. The when clause tells what event triggers the transition. Often this will be the
arrival of a certain frame.
The provided clause allows the programmer to specify a Boolean condition of the
process state variables that must hold in order for the transition to happen. The priority
clause makes it possible to assign priorities to transitions. When the transition is
triggered, the body of the transition is carried out. A module consists of a set of
definitions for data types, variables, auxiliary procedures, and a list of transitions. An
Page 46
Computer Networks
Figure 2.6: (a) Petri Net with two places and two transitions
of them may fire. The choice of a transition to fire is indeterminate, which is why Petri
nets are useful for modeling protocols. The Petri Net Model of Figure 2.6(a) is
deterministic, and can be used to model any two-phase process.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
In figure 2.6(b), unlike the finite state machine model, there are no composite
states here; the sender’s state, channel state, and receiver’s state are represented
separately. Transitions 1 and 2 correspond to transmission of frame 0 by the sender,
normally, and on a timeout respectively. Transitions 3 and 4 are analogous for frame 1.
Page 47
Computer Networks
With only one O/P line, all terminals might try to send data at once. Polling is a
technique that solves this problem. This technique requires each terminal to keep quiet
until the controller gives “Go ahead signal”.
Polling / selection systems revolve around two commands poll and select. The
purpose of poll command is to transmit data to the primary site and the select command
transmits data from the primary site to the secondary site.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
BSC Message Formats and Control Codes
BISYNC supports three character sets: ASCII, EBCDIC, and IBM’s 6-bit Transcode.
The BISYNC message format is shown in figure 2.7. The contents of the header field
are up to the network; they are not defined by the protocol. ETB is used to terminate a
block when there are more blocks to follow. ETX is used to terminate the last block.
Addressing of terminals on a multidrop line is not done in the header, but by a separate
control message.
Page 48
Computer Networks
ETB
SYN SYN SOH Header STX Data Or Checksum
ETX
When ASCII code is used, the party bit is set and the checksum is simply a
vertical party check. With EBCDIC or 6-bit Transcode, the individual characters are not
parity-checked.
BSC is a half-duplex protocol. Transmissions are provided two ways, alternately.
BSC is a code-sensitive protocol, and every character transmitted across a BSC channel
must be decoded at the receiver to see if it is either a control character or end-user data.
The control codes have several functions which depend on the particular line mode at a
given moment. Since BSC is a character-oriented protocol, it has a problem in
distinguishing user data fields from control fields. It is possible that the user application
process could create a code recognized as BSC control. BSC addresses the problem with
the DLE control code. This code is placed in front of the control codes STX, ETX, ETB,
ITB, and SOH to identify these characters as valid line control characters. The simplest
means to achieve code transparency is the use of DLE.STX or DLE.SOH to signify the
beginning of noncontrol data (user data) and DLE.ETX, DLE.ETB, or DLE.ITB to
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
signify the end of user data. If bit patterns resembling any of these control characters are
created in the user text the receiving station assumes they are valid user data, because the
DLE does not precede them.
The DLE places the line into a transparent text mode, which allows the
transmission of any bit pattern. This capability is important when BSC is used on
different types of application. The DLE presents a special problem if it is generated by
the end-user application process, since it could be recognized as a control code. BSC
handles this situation by inserting a DLE next to a data DLE character. The receiver
discards the first DLE of two successive DLEs and accepts the second DLE as valid user
data.
Page 49
Computer Networks
Line Modes
The BSC channel or link operates in one of two modes. The control mode is used
by a master station to control the operations on the link, such as the transmission of
polling and selection frames. The message of text mode is used for the transmission of
an information block or blocks to and from the stations. Upon receiving an invitation to
send data (a poll), the slave station transmits user data with either an STX or SOH in
front of the data or heading. These control characters place the channel in the message or
text mode. Thereafter, data are exchanged under the text mode until an EOT is received,
which changes the mode back to control. During the time the channel is in text mode, it
is dedicated to the exchange of data between two stations only. All other stations must
remain passive. The two-station text mode is also called the select-hold mode.
The polls and selects are initiated by a frame with the contents: Address.ENQ
(where address is the address of the station). The control station is responsible for
sending polls and selects.
A select performs one of the two functions:
1. it places the selected station into a slave mode and
2. it places all other stations (on a multipoint channel) into passive mode.
The STX or STH initiates the passive state. The selected station maintains the
slave mode condition until it receives an EOT, ETB or ETX. The passive stations
maintain the passive mode condition until they receive an EOT.
BSC also provides for contention operation on a point-to-point circuit. The ENQ
code plays an important role in BSC control modes. Its functions are:
Poll. Control station sends with an address prefix.
Select Control station sends with an address prefix.
Bid Point-to-point stations send to contend for control stations status.
The lower-case code of a station address is used to indicate a select, and the upper
case is used to indicate a poll.
Line Control
The transmitting station knows the order of frames it transmits, and it expects to
receive ACK’s to its transmissions. The receiving site transmits the ACKs with sequence
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
numbers. Only two numbers are used, a 0 and a 1. This sequencing technique is
sufficient, since the channel is inherently half duplex and only one frame can be
outstanding at one time. An ACK0 indicates the correct receipt of even-numbered
frames; and ACK1 indicates the receipt of odd-numbered frames. BSC uses several other
line control codes:
ACK0 Positive acknowledgement to even-sequenced blocks of data or a response
to a select or bid.
ACK1 Positive acknowledgement to odd-sequenced blocks of data.
Page 50
Computer Networks
Page 51
Computer Networks
Figure 2.9: Control field of (a) an information frame (b) a supervisory frame
(c) an unnumbered frame
The protocol uses a sliding window, with a 3-bit sequence number. Up to seven
unacknowledged frames may be outstanding at any instant. The Seq field in figure 2.9
(a) is the frame sequence number. The Next field is a piggybacked acknowledgement.
The P/F bit stands for a Poll/Final. It is used when a computer is polling a group of
terminals. When used as P, the computer is inviting the terminal to send data. All the
frames sent by the terminal, except the final one, have the P/F bit set to P. The final one
is set to F.
HDLC Options
HDLC provides for a number of options in its implementation. It supports both
half-duplex and full-duplex transmission, point-to-point and multipoint configurations, as
well as switched or nonswitched channels. An HDLC station is classified as one of three
types:
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
The primary station is in control of the data link (channel). This station transmits
command frames to the secondary stations on the channel. In turn, it receives
response frames from those stations.
The secondary station acts as a slave to the primary station. It responds to the
commands from the primary station in the form of responses. It maintains only one
session, that being with the primary station. It has no responsibility for control of the
link.
The combined station transmits both commands and responses and receives both
commands and responses from another combined station. It maintains a session with
one other combined station.
Page 52
Computer Networks
Stations communicate with each other through one of these logical states:
The Logically Disconnected State (LDS) prohibits a station from transmitting or
receiving information. If the secondary station is under a normal disconnected mode,
it can transmit a frame only after receiving explicit permission from the primary
station to do so. If the station is under an asynchronous disconnected mode, the
secondary station may initiate a transmission without receiving explicit permission to
do so, but the frame must be a single frame, indicating the secondary station status.
The Initialization State (IS) is defined by specific vendors and is outside the standards
of HDLC.
The Information Transfer State (ITS) permits the secondary, primary, and combined
stations to transmit and receive user information. The information transfer state can
be changed by the issuance of disconnect commands.
While the stations are in an information transfer state, they are allowed to communicate
in one of three modes of operation.
Normal Response Mode (NRM) requires the secondary station to receive explicit
permission from the primary station before transmitting. After receiving permission,
the secondary station initiates a response transmission, which may contain data. The
transmission may consist of one or more frames while the secondary station is using
the channel. After the last frame transmission, the secondary station must again await
explicit permission before it can transmit again.
Asynchronous Response Mode (ARM) allows a secondary station to initiate
transmissions without receiving explicit permission from the primary station (usually
when the channel is idle). The transmission may contain single or multiple frames of
data, or it may contain control information reflecting status changes of the secondary
station. ARM can decrease overhead because the secondary station does not need a
poll sequence in order to send data.
Asynchronous balanced mode (ABM) uses combined stations. The combined station
may initiate transmissions without receiving prior permission from the other
combined station.
HDLC provides for three ways of configuring the channel for primary, secondary and
combined station use.
An unbalanced configuration provides for one primary station and one or more
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
secondary stations to operate as point-to-point or multipoint, half-duplex or full
duplex, or switched or nonswitched. The configuration is called unbalanced because
the primary station is responsible for controlling each secondary station and for
establishing the mode-setting commands.
The Symmetrical configuration provides for two independent, point-to-point
unbalanced station configurations. Each station has a primary and secondary status,
and therefore each station is considered logically to be two stations: a primary and a
secondary station. The primary station transmits commands to the secondary station
at the other end of the channel and vice versa.
Page 53
Computer Networks
Control field determines how HDLC controls the communication process. The
control field defines the function of the frame, and therefore invokes the procedures to
control the movement of the traffic between the receiving and sending stations. The
control field identifies the commands and responses used to control the traffic flow on the
link. The actual format of the control field (information, supervisory, or unnumbered)
determines how the field is coded and used. The simplest format is the information
format. The information frame control field contains two sequence numbers. The N(S)
(send sequence) number indicates the sequence number, and indicates the next sequence
number that is expected at the receiving site. The N(R) serves as an acknowledgement of
the previous frames.
For example, if the N(R) field was set to 4, the station, upon receiving N(R) = 4,
would understand that its transmissions of frames 0,1,2, and 3 had been received
correctly, and that the station with which it is communicating is expecting the next frame
to have a send sequence number of 4 in it. The N(R) field provides for inclusive
acknowledgement; that is, the N(R) of 4 could inclusively acknowledge more than one
message that had preceded it. The concept of send [V(S)] and receive state [V(R)]
variables are used with the HDLC N(S) and N(R) fields.
The fifth-bit position, the P/F or poll/final is recognized only when set to 1 and is
used by the primary and secondary stations to provide the following functions:
The primary station uses the P bit to solicit a status response from a secondary station.
The P bit also can signify a poll.
The secondary station responds to a P bit with data or a status frame and on F bit.
The F bit also can signify the end of the transmission from the secondary station
under normal response mode (NRM). The P/F bit is termed the P bit when used by
the primary station and F bit when used by the secondary. Only one P bit should be
outstanding at any time on the link. A P bit set to 1 can be used as a checkpoint. The
P/F bit is used and interpreted in several ways.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Commands and Responses
HDLC Commands / Responses
Control Field Bit Encoding
Format 1 2 3 4 5 6 7 8 Commands Responses
Information 0 __N(S)__ * ___N(S)___ I-Information I-Information
Page 54
Computer Networks
The supervisory format provides four of the commands and responses. These are:
Receive Ready (RR)
Reject (REJ)
Receive Not Ready (RNR)
Selective Reject (SREJ)
The purpose of this format and the four commands and responses is to perform
numbered supervisory functions, such as acknowledgement polling, temporary
suspension of data transfer, and error recovery. Supervisory format frames do not
contain an information field. The supervisory format can be used to acknowledge the
receipt of frames from the transmitting station. The commands and responses used by the
supervisory format include the following:
Receive Ready (RR), used by the primary or secondary station to indicate that it is
ready to receive an information frame and/or acknowledge previously received frames by
using the N(R) field. If the station has indicated that it was previously busy by using a
Receive Not Ready command, it then uses the Receive Ready command to indicate it is
now free to receive data. The primary station may also use the Receive Ready command
to poll a secondary station.
Receive Not Ready (RNR) is used by the station to indicate a busy condition. This
tells the transmitting station that the receiving station is unable to accept additional
incoming data. The (RNR) frame may acknowledge previously transmitted frames by
using the N(R) field. Sending the RR frame, as well as several other frames can clear the
ANNAMALAI
ANNAMALAI UNIVERSITY
busy condition.
UNIVERSITY
A station to request the retransmission of a single frame that is established in the
N(R) field uses selective Reject (SREJ). All information frames numbered up to N(R) -
are acknowledged. Selective Reject provides the selective repeat capability. Once the
SREJ has been transmitted, subsequent frames are accepted and held for the retransmitted
frame.
Reject (REJ) is used to request the retransmission of frames starting with the frame
numbered in the N(R) field. Frames numbered N(R) – 1 are all acknowledged. The REJ
frame can be used to implement the Reject Technique.
Page 55
Computer Networks
The unnumbered format provides for unnumbered commands and responses. This
format is used to send the majority of the command and response indicators. Unnumbered
commands are further grouped by the function performed:
Mode-setting commands: SNRM, SABM, SNRME, SARME, SABME, SIM,
DISC (SNRME, SARME, SARME for extended addressing)
Information transfer commands: UI, UP
Recovery commands: RESET
Miscellaneous commands: XID, TEST.
The commands and responses for the unnumbered formats are:
UI (Unnumbered Information): This command allows for transmission of user
data in an unnumbered (i.e., unsequenced) frame.
RIM (Request Initialization Mode): The RIM frame is a request from a secondary
station to a primary station for an SIM command.
SIM (Set Initialization Mode): This command is used to initialize the
primary/secondary session. UA is the expected response.
SNRM (Set Normal Response Mode): This places the secondary station in a NRM
(Normal response mode). The NRM preludes the secondary station from sending
any unsolicited frames. This means the primary station controls all message flow
on the line.
DM (Disconnect Mode): This frame is transmitted from a secondary station to
indicate that it is in the disconnect mode (in-operational).
DISC (Disconnect): This command from the primary station places the secondary
station in the disconnected mode. This command is valuable for switched lines.
UA is the expected response.
UA (Unnumbered acknowledgement): This is an ACK to set mode commands
and SIM, DISC, RESET. UA is also used to report the end of a station-busy-
condition.
FRMR (Frame Reject): The secondary station sends this frame when it encounters
an invalid frame. This is not used for a bit error indicated in the frame check-
sequence field, but for more unusual conditions. The information field contains
ANNAMALAI
ANNAMALAI UNIVERSITY
the reason.UNIVERSITY
RD (Request Disconnect): This is a request from a secondary station to be
disconnected and placed in a logically disconnected state.
XID (Exchange Station Identification): This command asks for the identification
of a secondary station. It is useful on switched facilities to identify the calling
station.
UP (Unnumbered Polls): This is used in loop configurations.
TEST (Test): This frame is used to solicit testing responses from the secondary
station.
Page 56
Computer Networks
ARM (Set Asynchronous Response Mode): Sets mode to allow secondary station
to transmit without a poll from the primary station. It places the secondary station
in the information transfer state (IS) of ARM. Since SARM establishes two
unbalanced stations, SARM must be issued in both directions on the link.
SABM (Set Asynchronous Balanced Mode): Sets mode to SABM, in which
stations are peers with each other. No polls required to transmit, since each
station is a combined station.
SNRME (Set Asynchronous Balanced Mode Extended): Sets SABM with two
more bytes in the control field.
UP (Unnumbered Poll): Polls a station without regard to sequencing or
acknowledgement. Response is optional of poll bit I set to 0. Provides for one
response opportunity.
RSET (Reset): Transmitting station resets its N(S) and receiving station resets its
N(R). The command is used for recovery.
HDLC also utilizes the timeout (T1 timer) which is started with the transmission of
every frame. T1 is used to initiate a retransmission if it expires. Also the N2 counter
determines the maximum number of transmissions to be performed upon the expiration of
T1.
Page 57
Computer Networks
Page 58
Computer Networks
Protocols in which the sender sends one frame and then waits for an
acknowledgement before proceeding are called stop-and-wait protocol.
The Sliding Window mechanism is widely used to integrate error control and
flow control in a convenient way.
Sliding window protocols can be categorized by the size of the sender’s
window and the size of the receiver’s window. When both are equal to 1, the
protocol is stop-and-wait. When the sender’s window is greater than 1, for
example to prevent the sender from blocking on a circuit with a long
propagation delay, the receiver can be programmed either to discard all frames
other than the next one in sequence (protocol using go back n) or buffer out-
of-order frames until they are needed (protocol using selective repeat).
Protocols can be analyzed for a variety of properties, for example performance
and correctness. Popular models for protocol specification and verification
are Finite State Models, Estelle Protocol Specification Language and Petri Net
Models.
BSC is a character-oriented code sensitive protocol. It supports multipoint
and point-to-point configurations. It is widely used for polling remote
terminals.
Many networks use bit-oriented protocols like HDLC, SDLC. All of these
protocols use flag bytes to delimit frames, and bit stuffing to prevent flag
bytes from occurring in the data. All of them also use a sliding window for
flow control.
HDLC is a standard published by ISO. It provides for many functions and
covers a wide range of applications. It is a bit-oriented protocol and the
various options it provides make it more of a hybrid type.
SDLC is IBM’s version of HDLC. It used unbalanced normal response mode.
SDLC, a bit-oriented protocol provides support for point-to-point, multipoint
or loop configurations.
1. In sliding window flow control, the frames to the left of the receiver window
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
are the frames __________
2. Regulation of the rate of transmission of data frames is known as __________
3. Poll/select line discipline requires____________ to identify packet recipient.
4. BSC stands for ___________________
5. The HDLC __________ field defines the beginning and end of frame.
Page 59
Computer Networks
2.8 Assignments
1. In stop and wait protocol, define and discuss the handling of
a. A damaged frame
b. A lost frame
2. A sliding window protocol uses a window of size 15. How many bits are
needed to define the sequence number?
3. Which sliding window ARQ is more popular? Why?
Collect research reports and information on Datalink Protocols in the Internet and
in Networking Journals.
ANNAMALAI
ANNAMALAI UNIVERSITY
2.11 Keywords UNIVERSITY
Stop and wait protocol
Sliding Window protocol
Binary Synchronous Control (BSC)
High Level Data Link Control (HDLC)
Synchronous Data Link Control (SDLC)
Page 60
Computer Networks
UNIT - III
3.0 Introduction
The purpose of this chapter is to help us understand the basic concepts of Local
Area Network (LAN), IEEE LAN Standards, and Transmission Media. Further this
chapter includes the various routing algorithms, congestion control and transport
protocols.
3.1 Objective
3.2 Content
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
LANs are characterized by communication rates. The useful characteristic of
LANs is the presence of a Network Operating System (NOS), which ties all the
components together and makes operations transparent to the user. This turns a group of
isolated personal computers into a functional system with transparent resource sharing.
Page 61
Computer Networks
people and equipment. The system normally is able to support transmission between
workstations at the maximum speed at which they can communicate, a limited
geographic range: generally defined as less than 10 miles or 16 kilometers. To minimize
the error rate, a built-in method of detecting and compensating for system errors is
implied.
Resource Sharing
LAN eliminates the possibility of overspending by allowing workstations to share
peripherals like printers, plotters, digitizers, tape drives and hard disks. This lowers the
overall cost of data processing. Provides for efficient and flexible communication. By
providing a facility through which, a wise variety of computer equipment can be shared
by many people, the local area network presents a cost-effective solution. In a LAN the
shared resources need not be just hardware, software and information also may be shared.
As a resource-sharing tool, a LAN can:
- Permit sharing of expensive hardware.
- Facilitate sharing of complex programs and the information that they generate and
manage.
Aid in the integration of all aspects of information processing, particularly transforming
a group of individual, not very powerful microcomputers into a powerful distributed
processing system.
Productivity
Productivity depends on ensuring that people have timely access to the equipment
and information required to perform their job. LAN increases productivity because key
individuals in the organization will be able to get access to and share databases,
documents and expensive peripherals.
As a productivity tool a LAN can:
- Enable wider distribution of information and the technologies needed to deal with it
- Improve information retrieval, processing, storage and dissemination through a
distributed database.
- Minimize or even if possible, eliminate redundant and repetitive tasks.
- Improve efficiency by facilitating the unification of systems and procedures.
- ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Provide graphic capabilities and other specialized application that are not cost-
effective on stand-alone micros.
Communication
LAN facilitates communication through its powerful Electronic Mail system
(EMS) among authorized network users across time boundaries and distance. Network
provides fast responses and transmits urgent notes, messages and circulars.
As a communication resource, a LAN can:
Page 62
Computer Networks
Management
As a management tool the LAN can:
Increased system performance through the distribution of tasks and equipments;
improve the availability of computer resources. Tasks can be assigned to several
machines; increase system reliability. Crucial processes can be duplicated and/or divided
so that, on the failure of one machine, other machines can quickly take up the load.
Minimize the adverse effects of loss of any one system. Help regain administrative
control of equipment, LAN improves the efficiency with more information accessible at
workstation which can be used for taking better and timely decisions. LAN can have
dramatic impact on efficiency where the data is dynamic. The LAN server concept
allows efficient centralization of information by allowing control over who uses the
network and for what purpose. A LAN has extensive security system. A LAN has
configuration flexibility. PCs and other resources can be added as and when needed.
Page 63
Computer Networks
Workstation
As most common component, a workstation is an individual, single-user
microcomputer with communications capabilities added. The term includes the
microcomputer itself as well as all its attached bits and pieces-memory cards, CRT,
floppy disk drives, hard disks and printers. A workstation is distinguished from a
personal computer by the network operating system software that controls what the
workstations can and cannot do and by a network interface unit that supplies the
communications capabilities.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Every workstation will run memory resident software, called Workstation Shell,
which is the software interface between file server and workstation. This will filter local
and network requests/commands.
A workstation can send or receive messages to or from other workstation or file
server. For some LANs, the connection to a workstation can be made with a serial port.
In that case, the LAN interface unit is not a plug-in board internal to the computer but an
external component.
Workstations may have one to several floppy-disk drives and hard disk drives.
Workstations may be divided into two classes: users and servers, User Work stations are
Page 64
Computer Networks
File Server
The file server is a powerful computer, which runs special software to act as a
file server. As the name suggests, it serves the files to networked computers, which share
and use these files. The files can be programs, text or data. The file server is a
completely enclosed logical structure, which is secure against accidental or malicious
abuse as it can be accessed only through Network Operating System (NOS).
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
The activity of each file server can be monitored from the file server’s screen.
The system supervisor monitors and control operation of each individual network through
the file server and uses it to control the print spooling, send/broadcast messages and
perform many other system functions. The file server has a large volume of memory
which is used for caching directories, files and directory hashing. File servers also
support backup facilities, print serving and so on.
Novell NetWare, for example, requires users on a workstation to log on to a file
server to enter the LAN. Under Novell NetWare, specifically designed machines are
converted to file servers. Under the PC Network Program, any workstation can perform
the function of file serving on any files that have been designated as public.
Page 65
Computer Networks
Gateway
This component is used to connect two different LANs which are having
dissimilar components. The gateway assists in transferring bits from one LAN to the
other. A workstation is dedicated to act as the gateway. Network adapter cards for both
types of LANs are inserted in the machine, and a special set of Novell program transfers
the bits from one LAN to the other. Similarly a LAN can also be connected to another
mainframe computer by a gateway.
Page 66
Computer Networks
transmits the data. The communications interface also monitors the channel for messages
addressed to its workstation, stores the data and transfers the data to the device.
The host interface supplies the connection between a specific workstation’s
internal circuitry and the communication interface unit. It fits into the input/output
structure of a particular computer, and governs all data exchange between the workstation
and the communication-oriented portion of the network interface.
Active Hub
An active hub is a powered distribution point with active devices which drive
distant nodes up to 1 kilometer away. Active hubs can be cascaded to connect 8
connections to which passive hubs, file servers or another active hubs can be connected.
The maximum distance covered by an active hub is about 2000 ft.
Passive Hub
It is a passive distribution point which does not use power or active devices in a
network to connect up to 4 nodes within a very short distance. Maximum distance
covered by a passive hub is about 300 ft.
LAN Cable
LAN uses coaxial cable RG-62. This is a relatively superior cable that allows for
base band transmission. The cable is capable of transferring up to 10 Mbps. Special end
connectors are used to interface with network interface card or hubs.
The advantages of the coaxial cable are:
1. Wider band width.
2. Interference resistance.
3. High conductivity without distortion.
4. Longer distance covered.
Page 67
Computer Networks
cable. This system was called Ethernet after the luminoferous ether, through which
electromagnetic radiation propagated.
Two types of coaxial cables are commonly used, thick ethernet and thin ethernet.
Thick ethernet had markings for 2.5 meters to show where the taps to go, like a yellow
garden hose. Thin ethernet use industry standard BNC connectors to form T-Junctions
and are cheaper and flexible, run only for short distances. Both of them are compatible.
A technique called Time Domain Reflectometry is used to detect cable breaks,
bad taps or loose connectors. A pulse of known shape when injected into a cable, may hit
an obstacle or end of the cable and the echo will be generated. The origin of the echo can
be measured accurately by timing the interval between the sending pulse and the
receiving echo.
Ethernet used Manchester encoding scheme, in which the cable can be in one of 3
states namely, transmitting a 0 bit, 1 bit or idle.
A transceiver is clamped onto the cable and inner core is contacted by the tap.
The transceiver has the electronics to detect and handle collisions. The transceiver
contains the electronics that handle carrier detection and collision detections. When a
collision is detected, the transceiver also puts a special invalid signal on the cable to
ensure that all other transceivers also realize that a collision has occurred.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
A transceiver cable connects the interface board and the transceiver, usually 50m
long and contains 5 individually shielded twisted pairs for data in, data out, control signal
in, control signal out and to power the transceiver electronics. The transceiver cable
terminates on an interface board inside the computer. The interface board contains a
controller chip that transmits frames to and receives frames from the transceiver. The
controller is responsible for assembling the data into the proper frame format, computing
checksums on outgoing frames and verifying them in incoming frames. Buffer
Management, DMA transfers are also done by some controller.
Page 68
Computer Networks
Figure 3.3: Cable Topologies (a) Linear (b) Spine (c) Tree (d) Segmented
A single cable is snaked from room to room with tapping to its nearest point (3.3
a). The horizontal cables on each floor are connected to a vertical spine (3.3 b). The tree
is the most popular as it prevents interference between the 2 signals (3.3 c). A collection
of separate segments connected by bridges in which the frames pass only with other
segments (3.3 d).
Start of Length of
frame data field
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
delimiter
Figure 3.4: The 802.3 frame format
Each frame starts with a preamble of 7 bytes, each containing the bit pattern
10101010. The Manchester encoding of this pattern synchronizes the sender with the
receiver clock. The bit patters 10101011 indicate the start of the frame.
The frame contains 2-byte and 6-byte addresses, but 10 Mbps base band use only
6-byte. High order bit is 0 for ordinary addresses and 1 for group addresses. Sending to a
group of stations is called Multicast and sending to all stations on the network is called
Broadcast.
Page 69
Computer Networks
The use of bit 46 distinguishes local addresses from the global addresses. There
are 7 x 1013 global addresses available to uniquely address any station.
The length field determines the bytes present in the data field from 0 to 1500. The
valid frames must be 64 bytes long to distinguish the valid frames from the garbled ones.
The pad fields are used for adding the bytes to the data field if it is not of a minimum
size.
The checksum field is effectively a 32-bit hash code of the data to detect the error.
CRC (Cyclic Redundancy Check) is one of the algorithms used.
A Binary exponential backoff algorithm was used to prevent the consecutive
occurrence of collisions. By having the randomizing interval to grow exponentially as
more collisions occur, it ensures a low delay when few stations collide and also ensures
the collision is resolved when many collides.
802.3 Performance
When each station transmits during a slot with probability p, the probability A
that some station acquires the ether during the slot is
A = kp ( 1 – p) k-1
A is maximum when p = 1/k . The probability that the contention interval has
exactly J slots is A (1-A)J-1 the mean number of slots per contention is
∞
JA (1-A) J-1 = 1/A
J=0
Each slot has a duration 2T. The channel efficiency when the mean frame takes P
sec to transmit is,
P
P + 2T/A
The longer the cable, the longer the contention period. In terms of frame length F,
the network bandwidth B, the cable length L and the speed of signal prorogation C, the
channel efficiency is,
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
1
Substituting
F
p=
P + 2B Le/cF B
The efficiency will be low when the second term in the denominator is large.
Page 70
Computer Networks
The token bus is a linear or tree-shaped cable to which the stations are attached
and are organized into a ring with each station knowing the address of the neighbour.
A special control frame called token is propagated around the logical ring with
only the token holder is allowed to transmit. Whenever the ring is initialized, the highest
numbered station may send the frame and then the token is propagated. No collisions
occur since only one station holds the token.
The physical order in the ring is not important for stations to transmit. The token
bus uses the 75-ohm Broadband co-axial cable. Both single and dual cable settings are
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
used with or without headends. The different analog modulation schemes are, Phase
continuous frequency shift keying, Phase coherent frequency shift keying, Multilevel duo
binary amplitude modulated phase shift keying.
The token bus defines 4 priority classes, 0, 2, 4 and 6 for traffic with 0 the lowest
and 6 the highest. When the token comes into the cable, the token is passed to the priority
6, then to 4, then to 2 and 0. This is repeated until the timer expires.
Page 71
Computer Networks
Bytes ≥1 1 1 2 or 6 2 or 6 0-8182 4 1
Frame control
Preamble
ANNAMALAI
ANNAMALAI UNIVERSITY
0000 0010
UNIVERSITY Solicit-Successor-2 All no stations to enter the
ring
0000 0011 Who-follows Recover from lost token
Page 72
Computer Networks
The token holder asks the stations which are not in the ring to join by sending of
the SOLICIT-SUCCESSOR frames. If no response, then the token holder continues with
its work. The RESOLVE-CONTENTION frame is started to avoid collusion between two
stations. A station can leave the ring by appropriately setting the successors and
predecessors by SET-SUCCESSOR frame. When the ring is initialized, the station sends
a CLAIM-TOKEN with initializing itself. Afterwards, the station bids to enter the ring. A
station transmits a WHO-FOLLOWS frame specifying its successors address so that the
failed station can be found out.
Figure 3.8: (a) Ring Network (b) Listen Mode (c) Transmit Mode
In the token ring, a special bit pattern called token is circulated which must be
seized by stations before transmission. The Ring must have a sufficient delay to contain a
complete token. The delay has two components, the signal propagation delay and the 1-
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
bit delay by each station.
Ring Interface has 2 operating modes, listen and transmit. In the former, the bits
are copied from input to output with a 1-bit delay. In transmit mode, the token must be
captured, the interface breaks the connection between the input and output, entering the
data onto the ring.
When the traffic is light, the token will be idle most of the time. But when the
traffic is heavy, a queue will be formed at each station and as soon as it finishes
transmission, the next will seize the token for transmission. The network efficiency can
approach 100 percent under conditions of heavy load.
Page 73
Computer Networks
At the physical layer 802.5 uses the shielded twisted pairs and signals are encoded
using differential Manchester encoding.
The major problem with ring networks is that if the cable breaks, the ring goes
down. This is solved by the use of wire center in which there will be 2 twisted pairs cable
are connected, one for data to and one for data from the station. The wire center has
bypass relays, which are released by the loss of the drive current whenever ring dies.
1 1 1 2 or 6 2 or 6 No limit 4 1 1
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
SD AC FC Destination Source Data Checksum ED FS
(b) address address
Frame control
Ending delimiter
Access control
Frame status
Starting delimiter
Figure 3.10: (b) Data frames format
Page 74
Computer Networks
The starting and the ending delimiter mark the beginning and the end of the
frame. The Access control contains the token bit, priority bit and reservation bits. The
frame control distinguishes data from control frames. The Destination address, source
address and the checksum fields are the same as with others.
The Frame status byte contains the A and C bits. The 3 combinations are:
Destination not present or not powered up
Destination present but frame not accepted
Destination present and frame copied.
This provides an automatic acknowledgement for each frame. The ending
delimiter contains an E bit which is set if any interface detects an error.
Ring Maintenance
Each token ring has a monitor station to see the ring. A contention protocol
selects another monitor’s station, whenever the current on fails.
When there is no monitor, the station can transmit a CLAIM TOKEN control
frame which when circulated successfully becomes the monitors. The Responsibilities of
a monitor are taking care that token is not lost, taking care when the ring breaks, cleaning
the ring when frames are destroyed, watching out for orphan frames. A timer is set by the
monitor to find the loss of the token. The monitors may insert extra bits when the length
of the ring less than the token.
A BEACON control frame is used to locate the breaks in the ring. The Bypass
relay in the wire center is used to find out the stations that are deleted and that are dead.
Token Ring Control Frames
Frame Control Field Name Meaning
0000 0000 Duplicate Address Test Test if two stations have same
address
0000 0010 Beacon Used to locate breaks in the ring
0000 0011 Claim Token Attempt to become monitors
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
0000 0101 Active monitor present Issued periodically by the monitors
Page 75
Computer Networks
Slotted Rings
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
3.2.5 LAN Topologies
Page 76
Computer Networks
Selection of a Topology
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Page 77
Computer Networks
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
control of the medium for transmission purposes is easily solved. Thus in a star
network, access protocols are simple.
Disadvantages: -
1. Long cable length: Because each node is directly connected to the center, the star
topology necessitates a large quantity of cable. While the cost of the cable is often
small, congestion in cable ducts, maintenance and installation problems can increase
costs considerably.
2. Difficult to expand: The addition of a new node to a star network involves a
connection to the central node. Providing large number of redundant cables during the
Page 78
Computer Networks
initial wiring usually creates expansion. However, the problems can arise if a lengthy
cable is needed or an unanticipated concentration of nodes is required.
3. Central node dependency: If the central node in a star network fails, the entire
network is rendered inoperable. That introduces heavy reliability and redundancy
constraints on this node. The star topology has found extensive application in areas
where intelligence in the network is concentrated at the center node.
Star Evaluation Factors
Application: Presently, a star network is the best way to integrate voice and data
services. A star-based network using the newer digital PBXs often can be
justified by the savings and features for voice-based telephone services alone.
Complexity: The star can be quite complex: workstations attached to the central
workstation may in turn act as the central server for other workstations or may be
connected to communication links.
Performance: Good for moderate load. However, the size and capacity of the
network, and hence the performance, is a direct function of the power of the
center node.
System overhead: Network overhead is high: the server usually cannot be used
for any other purpose while acting as network server. The number of separate
lines is also high.
Vulnerability: System reliability id depends on the central server. If the server
fails, all the activity on the network ceases. Failure of an individual workstation
does not affect the system. In either case identification of problems and repair is
simplified by centralized control.
Expandability: Expandability may be severely restricted. Most servers can
support a limited number of network interfaces. Bandwidth and data are
limitations often imposed on each user. The limits are necessary to protect the
central processing functions from overload and to keep the cost of each port on
the central server low.
Bus Topology
This consists of a single length of the transmission medium. This topology is
used in traditional data communication networks where the host at one end of the bus
communicates with several terminals attached along its length. This configuration is
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
known as a multidrop line. It is also the topology used in the Ethernet LAN.
Page 79
Computer Networks
When long distance workstations are there, the signal strength may be reduced as
the signals has to go over a long distance. Having amplifiers or repeaters in specific
locations can solve this.
Advantages: -
1. Short cable length and simple wiring layout: Because there is a single common
data path connecting all the nodes, the bus topology allows a very short cable length
to be used. This decreases the installation cost, and also leads to a simple, easy to
maintain layout.
2. Resilient Architecture: The bus architecture has an inherent simplicity that makes it
very reliable from hardware point of view. There is a single cable through which all
data passes and to which all nodes are connected.
3. Easy to extend: Additional nodes can be connected to an existing bus network at any
point along its length. More extensive additions can be achieved by adding extra
segments connected by a type of signal amplifier known as a repeater.
Disadvantages: -
1. Fault diagnosis is difficult: Although the topology looks simple, fault detection is a
tedious matter. In most LANs, control of the network is not centralized in any
particular node. This means that detection of a fault may have to be performed from
many points in the network.
2. Fault isolation is difficult: If a node is faulty on a bus, it must be rectified at the
point where the node is connected to the network. Once the fault has been located,
the node can simply be removed. In case, where the fault is in the network medium
itself, an entire segment must be disconnected.
3. Repeater configuration: When a bus-type network has its backbone extended using
repeater, reconfiguration may be necessary. This may involve tailoring cable lengths,
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
adjusting terminators etc.
4. Nodes must be intelligent: Each node on the network is directly connected to the
central bus. This means that some way of deciding who can use the network at any
given time must be performed in each node. It tends to increase the cost of the nodes
irrespective of whether this is performed in hardware or software.
Bus Evaluation Factor
Application: Bus networks are a good choice for small networks and networks with
low traffic.
Complexity: Bus networks tend to be relatively uncomplex.
Page 80
Computer Networks
Performance: Excellent under light load, may degrade rapidly as load increases.
System overhead: Comparatively low, particularly because much of the hardware is
fully developed and readily available. Some redundancy of communications channel
is advisable to reduce the vulnerability to channel outrage.
Vulnerability: Failure of one workstation on a bus network does not usually affect
the network. Bus networks are vulnerable to damage due to the main link and other
problems affecting the bus. Problems on the bus are hard to locate. Once located,
problems are easy to repair.
Expandability: Expansion and reconfiguration of a bus network are easy. A new or
relocated device may be co-connected to the nearest convenient network access point
with little disruption to the network. Interconnecting microcomputers and equipment
from different manufactures is difficult because all connected devices must be able to
accept the same forms of address and data.
Ring Topology
In this topology each node is connected to only two neighbouring nodes in a
circular fashion as shown in figure 3.15. Data is accepted from one of the neighbouring
node to node around the ring. At any time only one pair of nodes can communicate.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
is sometimes called the Token-Ring Topology.
Ring network consists of an unbroken circle of point-to-point connections of
adjacent workstations. Messages travel from workstation to workstation in a round robin
fashion. Workstations are connected to a repeater, which in turn, retransmits messages
addressed to other workstations. In order to receive messages, each workstation must be
capable of recognizing its own address.
The transmission of data on a ring goes through every connected node on the ring
before returning to the sender. If node fails to pass data through itself, the entire network
has failed and no traffic can flow until the defective one is removed form the ring.
Page 81
Computer Networks
Advantages: -
1. Short cable length: The amount of cabling involved in a ring topology is relatively
small. This means that fewer connections will be needed, which will in turn increase
network reliability.
2. No wiring closet space required: Since there is only cable connecting each node to
its immediate neighbour, it is not necessary to allocate space in the building for
wiring closets.
3. Suitable for optical fibers: Optical fibers offer the possibility of very high-speed
transmission. Because the traffic on a ring travels in one direction, it is easy to use
optical fibers as a medium of transmission.
Disadvantage: -
1. Node failure causes network failure: The transmission of data on a ring goes
through every connected node on the ring, before returning to the sender. If one node
fails to pass data, the entire network fails and no traffic can flow until the defective
nodes are removed from the ring.
2. Difficult to diagnose faults: The fact that failure of one node will affect all others
has serious implications for fault diagnosis. It may be necessary to examine a series
of adjacent nodes to determine the faulty one. This operation may also require
diagnostic facilities to be built into each node.
3. Network reconfiguration is difficult: The all or nothing nature of the ring topology
can cause problems when one decides to extend or modify the geographical scope of
the network. It is not possible to shutdown a small section of the ring while keeping
the majority of it working normally.
4. Topology affects the access protocol: Each node on a ring has a responsibility to
pass on data that it receives. This means that the access protocol must take this into
account. Before a node can transmit its own data, it must ensure that the medium is
available for use.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Application: A ring is good in situations where capacity must be allocated equally or
where a small number of workstations operating high speeds over short distances are
to be connected.
Complexity: A ring requires relatively complex hardware to implement. Message
routing is simple. Since only one message path is possible, the sending workstation
needs to know an address for the destination workstation. Routing information is not
necessary.
Performance: Performance under heavy traffic remains stable with less delay and
degradation of service than other networks. Average transmission delays are long,
Page 82
Computer Networks
even under light traffic. Actual performance is dependent on the control protocols
implemented.
System Overhead: Duplication of resources or a method of bypassing failure points
is needed if the ring is to keep functioning when equipment fails.
Vulnerability: Failure in a single workstation or in the channel can cause system
failure because of the interdependence of workstations. Locating a failed repeater is
particularly difficult in a system with wide geographical distribution and it may not
be possible to repair it immediately.
Expandability: It is moderately easy to add or delete workstations on a ring network
without making numerous connections for each change. Therefore system
modifications costs are relatively low. Expansion does disrupt the whole system,
even though it may be only briefly disturb it.
Hybrid Topology
Modifying or combining some of the characteristics of the network topologies
may obtain a more useful result. These combinations are called hybrid topologies.
Tree Topology
This topology is a variant of the bus. The shape of the network is that of an
inverted tree with the central root branching to the extremities of the network as shown in
figure 3.16. It is normally implemented using coaxial cable as the transmission medium
and broadband transmission techniques.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Figure 3.16: The Tree Topology
Technically, a tree is a bus network comprised of a main cable, which connects
floors in a building, and branches, which connect individual workstations in a more
limited area. In effect, the network is divided into different segments. This topology is
sometimes called a rooted tree.
Page 83
Computer Networks
Advantages: -
1. Easy to extend: Because the tree is, of its very own nature, divided into subunits, it is
easier to add new nodes or branches to it.
2. Fault isolation: It is possible to disconnect whole branches of the network from the
main structure. This makes it easier to isolate a defective node.
Disadvantage: -
1. Dependent on the root: If the headend device fails to operate, the entire network is
rendered inoperable. In this respect, the tree suffers from reliability problem.
Star-Ring Topology
Advantages: -
1. Fault, diagnosis and isolation: The presence of concentration points in the network
greatly eases the fault diagnosis. If a fault is detected on the network, the initial
problem is to find out which concentration point in the ring is to blame. The
offending concentration point can be isolated easily, leaving the network in a fully
functional state while further fault diagnosis is carried out.
2. Ease of expansion: The modular construction of a star-ring network means that, new
sections may be easily added. When designing the network originally, each
concentration can have extra, unused lobes, which can be called upon later if needed.
The next growth step involves adding a new concentration point and wiring it into the
ring.
3. Easy cabling: The concentrations points in a star-ring are connected via a single
cable. This simplifies wiring between areas in an installation and cuts down the
congestion of cable ducts.
ANNAMALAI
ANNAMALAI UNIVERSITY
Disadvantages: -
UNIVERSITY
1. Intelligent concentration points required: Depending on the implementation used,
the concentration points may need to have built-in intelligence/processing ability.
This will be necessary if it is to assist in network fault diagnosis, node isolation or
conversion from one form of transmission medium to another.
2. Redundant cabling: The intercloset cabling in a star-ring is critical to its operation.
This means that redundant cabling in the form of one or more back up rings are
necessary to meet the reliability requirements.
Page 84
Computer Networks
Choosing a Topology
In choosing a topology for a LAN, many factors are to be considered. It must be
easy to install both in existing buildings and those that are being prewired. Once installed,
it must be able to cope with growth requirements. It should be possible to carry extensive
changes to the network without completely depriving current users of service.
Breakdowns in LAN are to be expected. It is desirable to have a system where
faults can be detected quickly and subsequently isolated, leaving the main section of the
network operating normally.
The choice of topology can affect the range of possible media and the access
method used to share it. Both of these can in turn affect the complexity and speed of
operation of the individual nodes.
It has been used for many years in the telephone network in applications with
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
requirements similar to those of a LAN. Both base band and broadband coaxial cable are
available. Although their structure is same, their installation and applications differ.
Page 85
Computer Networks
In base band coaxial cable, a central carrier wire is surrounded by a fine woven
mesh of copper which forms an outer shell. The space between the wire and the outer
shell is insulated to separate the two conductors and to maintain the electrical properties.
The entire cable is covered by protective insulation to minimize electrical emissions. The
cable is usually approximately 3/8 inch in diameter.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Page 86
Computer Networks
1. Single Mode Fibers: These have an extremely thin core diameter. While the
thinness provides high performance, it makes connection to light transmitters and
other cable segments extremely difficult.
2. Steeped Index Fibers: These contain a core of high resolution within a shell of lower
resolution. The boundary between core and cladding is abrupt. Here the connections
are comparatively easier.
3. Graded Index Fibers: These vary in density from the core outward. The gradation
moderates the dispersion of signals. Graded index fiber is most commonly available,
because it is preferred for telecommunications. It has the highest transmission rate of
the three types of cable.
Cable segments must be aligned precisely for the signal to continue from one
segment to the next, because light tends to travel in a wave-like motion rather than a
straight line. The greater the fluctuations in the light wave, the more rapidly the
performance degrades and the greater the dispersion of the signal. The thinner the
optic and narrower the light source, the straighter the wave is forced to travel and
therefore, the more efficient is the network as a whole.
3.2.7 Routing
The real function of the network layer is routing packets from the source machine
to the destination machine.
Routing Algorithm: This is Network layer software, which takes care of deciding
the path the packets must take during data transmission.
Session Routing: In virtual circuits, the routing details are made during setup and all
subsequent packets follow the pre-established paths.
Routing Algorithm
Adaptive Non-adaptive
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Centralized Isolated Distributed
Few requirements for Routing Algorithm:
Routing algorithm must be able to cope up with the changes in topology and
traffic without any halt in host application.
Stability is yet another requirement.
Fairness and Optimality: All IMPs must be treated equally and efficiently. They
are contradictory goals. The goals are satisfied by minimizing packet delay and
maximizing throughout.
Page 87
Computer Networks
Page 88
Computer Networks
Example 1:
Find the shortest path for:
[Find the shortest path from the source to the sink of a given graph]
Page 89
Computer Networks
Page 90
Computer Networks
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITYFigure 3.23: Routing table for Node J
How are different disjoint paths determined?
First a shortest path from source to destination is determined. The set of edges and
nodes occurring here are removed and with the remaining nodes and edges, a new path is
again computed.
Centralized Routing
When centralized routing is used, somewhere within the network there is an RCC
(Routing Control Center). Periodically, each IMP sends status information to the RCC,
Page 91
Computer Networks
like a list of its neighbours that are up, current queue lengths, amount of traffic processed
per line since the last report. The RCC collects all this information, and then, based upon
its global knowledge of the entire network, computes the optimal routes from every IMP
to every other IMP using the shortest path algorithm. From this information it can build
new routing tables and distribute them to all the IMPs.
Although centralized routing is attractive, it has few drawbacks. If the subnet is
to adapt to changing traffic, the routing calculation will have to be performed fairly often.
For a large network, the calculation will take many seconds, even on a substantial CPU.
One serious problem is the vulnerability of the RCC. If it goes down or becomes
isolated by line failures, the subnet is suddenly in trouble. One solution is to have a
second machine available as a backup, but this amounts to wasting a large computer.
Yet another problem with centralized routing concerns distributing the routing
tables to the IMPs. The IMPs that are close to the RCC will get their new tables first and
will switch over to the new routes before the distant IMPs have received their tables.
Inconsistencies may arise here and the packets may be delayed. Among the packets
delayed will be the new routing tables for the distant IMPs, so the problem feeds upon
itself.
If the RCC computes the optimal route for each pair of IMPs and no alternates,
the loss of even a single line or IMP will probably cut some IMPs off from the RCC, with
disastrous consequences. If the RCC does use alternate routing, the argument in favor of
having an RCC in the first place, namely that it can find the optimal routes, is weakened.
A final problem with centralized routing is the heavy concentration of routing
traffic on the lines leading into the RCC.
As an example of how centralized routing works, consider TYMNET, a
commercial packet-switching network with over 1000 nodes. TYMNET is primarily used
to allow terminals to log into remote computers, so the subnet offers connection-oriented
service and uses virtual circuit to implement this service. The TYMNET IMPs
periodically send the RCC information about their status like lines that are up or down,
queue lengths, and other statistics. The RCC maintains tables keeping track of all this
incoming information.
When a new user logs in and specifies which host one wants to connect to, a
packet is sent to the RCC informing it of the login. The RCC then computes the best
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
route, using all the information at its disposal. It then sends a needle packet back to the
IMP to which the user is connected. The needle packet contains the route chosen by the
RCC. This packet then threads its way through the subnet, making entries in the IMPs
tables as it goes and thus setting up the virtual circuit. When the user logs out, a similar
process is used to release the virtual circuit.
Advantages: -
(i) With the information on the RCC, a perfect routing decision can be made.
(ii) IMPs are relieved of the route computation work.
Page 92
Computer Networks
Disadvantages: -
(i) In a network of rapidly changing traffic RCC must calculate the paths very
often.
(ii) Time for calculation is quite high (many seconds).
(iii) If the RCC goes down, the consequences are severe and a substitute RCC
must be maintained.
(iv) A heavy traffic exists on the lines leading to the RCC (from all IMPs).
Needle Packets: -
Packet, which is sent from RCC to the IMPs, which contains the route chosen.
This packet then threads through the subnet making entries in the IMP table.
Isolated Routing
IMPs make routing based on the information they themselves have collected.
They do not share the information with other IMPs. This is Isolated routing. Two
examples of this Isolated Routing are discussed below.
Page 93
Computer Networks
under light load the line with the highest static weight is usually chosen, but as the queue
for this line builds up, some of the traffic is diverted to less busy lines.
(b) Backward Learning:
This is an indirect route cost estimation process. Each packet contains a counter,
which is incremented at every hop (IMP). When a packet arrives at an IMP ‘B’ from
some IMP ‘A’ with counter set to 4, then B will understand that A is 4 hops from B. And
within a short time, with this sort of repeated process, all IMPs will come to know about
all other IMPs.
Disadvantage: -
Since IMPs only record changes for the better, if a line goes down or becomes
overloaded, there is no mechanism for recording the fact. So if an IMP goes down the
whole process must be repeated again in all IMPs.
Delta Routing:
This is a hybrid technique of centralized and isolated routing. Each IMP measures
the cost of the line and sends a packet to RCC giving it, the values.
Flooding
Flooding is a technique in which a packet is sent out to all IMPs, except the one
from which it arrived on. A large number of duplicate packets are generated. Each packet
contains a counter, representing the number of hops in shortest path to the destination. On
encountering a hop it reduces the counter. Once when the counter reaches 0, the
destination is supposed to have been reached. All other packets, whose address does not
match with the destination are discarded.
Though not practical, flooding has some uses. In military applications, where
large number of IMPs may be blown to bits at any instant, the tremendous robustness of
flooding is highly desirable. In distributed data base applications, it is necessary
sometimes to update all the databases concurrently, in which case flooding can be useful.
A third possible use of flooding is as a metric against which other routing algorithms can
be compared. Flooding always chooses the shortest path, because it chooses every
possible path in parallel. Consequently, no other algorithm can produce a shorter delay if
the overhead generated by the flooding process is ignored.
Selective Flooding: A variation of flooding, where the packet is given to the lines going
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
approximately in the right direction.
Random Walk: A line is chosen at random in approximately the right direction and the
packet is forwarded.
Distributed Routing
In this type of routing, each IMP exchanges routing information with
neighbouring IMPs. IMPs maintain a routing table containing details about all IMPs.
They contain two parts.
(a) Preferred outgoing line for a destination
Page 94
Computer Networks
(b) Total cost or weight and time or distance to reach that destination
If the metrics is in delay, it is measured using ‘echo’ packets to that destination.
As an example, assume that delay is used as a metric and that the IMP knows the
delay to each of its neighbours. Once every T millisecond each IMP sends to each
neighbour a list of its estimated delays to each destination. It also receives a similar list
from each neighbour. Imagine that one of these tables has just come in from the
neighbour X, with Xi beings X’s estimate of how long it takes to get to IMP i. If the IMP
knows that the delay to X is m millisecond, it also knows that it can reach IMP I via X in
Xi + m millisecond via X. By performing this calculation for each neighbour, an IMP can
find out which estimate seems the best, and use that estimate and the corresponding line
in its new routing table. The old routing table is not used in the calculation.
Optimal Routing
If an IMP J lies on the optimal path from IMP I to IMP K, then the optimal path
from J to K is a subset of the same route. Call the part of the route from I to J r1 and the
rest of the route r2. If a route better than r2 existed from J to K, it could be concatenated
with r1 to improve the route from I to K.
D E D E
Page 95
Computer Networks
F G H F G H
(a) (b)
Figure 3.26: (a) A Subnet (b) Sink tree for H
Flow Based Routing
In some networks, the data flow between each pair of nodes is relatively stable
and predictable. For example, in a corporate network for a retail store chain, each store
might send orders, sales reports, inventory updates, and other well defined types of
messages to known sites in a pre-defined pattern, so that the total volume of traffic varied
little from day to day. Under conditions in which the average traffic from I to j is known
in advance and to a reasonable approximation constant in time, it is possible to analyze
the flows mathematically to optimize the routing.
The basic idea behind the analysis is that for a given line, if the capacity and
average flow are known, it is possible to compute the mean packet delay on that line from
queuing theory. From the mean delay on all the lines, it is straightforward to calculate a
flow-weighted average to get the mean packet delay for the whole network. The routing
problem then reduces, finding the routing algorithm that produces the minimum average
delay for the network.
To use this technique, certain information must be known in advance. First the
network topology must be known. Second, the traffic matrix, Fij, must be given. Third
the line capacity matrix Cij, specifying the capacity of each line in bps must be available.
Finally a routing algorithm must be chosen. The time delay for a line is computed using
the capacity and average flow. The total time delay for the whole network is calculated.
Then a routing algorithm is chosen to minimize the time delay for the network. Time
delay is computed using the queuing theory formula:
1
T
C-
T – Time delay - Mean packet size in bits.
C – Capacity in bps. - Mean flow in packets/sec.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Hierarchical Routing
Hierarchical routing is based on a simple “divide and rule” policy. If the number
of IMPs is high, maintaining a static table is tougher. So, the IMPs are grouped in
regions. Each region has an IMP, which has details about the IMPs within its region, but
no knowledge about IMPs in other regions. By this method a large number of IMPs can
be managed.
Page 96
Computer Networks
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
lines belong to the spanning tree, it can copy an incoming broadcast packet onto all the
spanning tree lines except the one it arrived on. The method makes excellent use of
bandwidth, generating the absolute minimum number of packets necessary to do the job.
The only problem is that each IMP must have knowledge of some spanning tree for it to
be applicable.
Our last broadcast routing technique is a enhancement of previous one. When a
broadcast packet arrives at an IMP, the IMP checks to see if the packet arrived on the line
that is normally used for sending the packets to the source of the broadcast. If so, there is
an excellent chance that the broadcast packet itself followed the best route from the IMP
and is therefore the first copy to arrive at the IMP. This being the case, the IMP forwards
copies of it onto all lines except the one it arrived. If the broadcast packet arrived on a
Page 97
Computer Networks
line other than the preferred one for reaching the source, the packet is discarded as a
likely duplicate.
As an example consider the reverse path forwarding shown in figure 3.28.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Page 98
Computer Networks
Figure 3.29: When too much traffic is offered, congestion sets in, and performance
degrades
Reasons for Congestions: IMPs too slow or IMPs too fast with slow responding IMPs.
Congestion tends to feed upon itself and become worse. Consider that a sender sends a
packet to a receiver, which has no buffers free, as a consequence, the sender repeatedly
sends the packet until an acknowledgement is released. Thus the sender cannot free its
own buffer (queue), which at some time becomes saturated and thus congestion arises.
3.2.10 Congestion Control Algorithms
Preallocation of Buffers
By permanently allocating buffers to each virtual circuit in each IMP, there will
always be a place to store any incoming packet until it can be forwarded. First consider
the case of a stop-and-wait IMP-IMP protocol. One buffer per virtual circuit per IMP is
sufficient for simplex circuits, and one for each direction is sufficient for full-duplex
circuits. When a packet arrives, the acknowledgement is not sent back to the sending
IMP until the packet has been forwarded. In effect an acknowledgement means that the
receiver not only received the packet correctly, but also has a free buffer and is willing to
accept another one. If the IMP-IMP protocol allows multiple outstanding packets, each
IMP will have to dedicate a full window’s worth of buffers to each virtual circuit to
completely eliminate the possibility of congestion. Because dedicating a complete set of
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
buffers to an idle virtual circuit is expensive, some subnets may use it only where low
delay and high bandwidth are essential, for example on virtual circuits carrying digitized
speech.
Packet Discarding
The packets are discarded at will by IMPs to control congestion. The source IMPs
will have to keep sending the packets until it is accepted or make a time out and start
every thing again. One buffer is always reserved in the IMPs to check to
acknowledgement packets. If there is some number of input lines, S number of output
Page 99
Computer Networks
lines and K number of buffers, then for a good performance, the max queue length of
buffers for each line must be
m = k s
i.e. If there are say 7 free buffers and three output lines, then it is not desirable to use all
buffers for a single output line, because if they are all used up (waiting in the queue) then
the packets for other output lines must be discarded.
Figure 3.30
So, a maximum limit for the number of buffers for an output line is set using the formula
(see above) and the other buffers are set free.
Figure 3.31
It has a drawback that it needs extra bandwidth for duplicates.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Isarithmic Congestion Control
The algorithm is called Isarithmic because the total no. of packets in the network
is kept constant by issuing “permits”, which circulate in the subnet. To transfer data, an
IMP must capture a ‘permit’, destroy it and transfer the data to the destination IMP and
destination IMP on reception of the data regenerates the ‘permit’. By this method the
congestion can never arise, in the subnet as a whole.
However it has a few drawbacks,
(a) It does not guarantee that a given IMP will never be flooded with packets.
Page 100
Computer Networks
(b) Some IMPs must uniformly distribute permits to prevent long delays. It is preferred to
have them centralized.
(c) If a permit is destroyed for some reason, they are lost forever and the network
capacity is reduced.
Flow Control
Transport layer to prevent one IMP from flooding another IMP with packets uses this.
Flow control can be applied between pairs of
(a) User processes (e.g. one outstanding message per virtual circuit).
(b) Hosts, irrespective of the number of virtual circuits open.
(c) Source and destination IMPs, without regard to hosts.
Choke Packets
Each IMP monitors the percentage utilization of lines. Associated with this is a real
variable u, whose value lies between 0,0 and 1.0. u is periodically updated using.
unew =auold + (1 – a) f
f Instance of line utilization. (0 or 1)
a constant which determines how fast the IMP ‘forgets’ recent history.
As u crosses a threshold, the output line enters a ‘warning’ state. Then a ‘Choke
Packet’ is sent to the source host. When the source host receives the choke packet it is
required to reduce the traffic to the destination by X percent. Since some packets have
already been sent, the successive choke packets are ignored for some time. Even after
that, if choke packets arrive, then the traffic is still reduced.
Two threshold levels can be used. Above the first level the packets are sent and
above the second level the packets are discarded. Queue length can also be monitored
instead of line utilization.
Deadlocks
An ultimate congestion is called Deadlock (Also called Lock up). First IMP
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
cannot proceed until second IMP does something and second IMP cannot proceed
because it waits for first IMP to do something. Both IMPs have ground to a complete halt
and will stay that way forever.
The simplest lockup can happen with two IMPs. Suppose that IMP ‘A’ has five
buffers, all of which are queued for output to IMP ‘B’. Similarly, IMP ‘B’ has five
buffers, all of which are occupied by packets needing to go to IMP A. Neither IMP can
accept any incoming packets from the other. They are both stuck. This situation is called
direct store-and-forward lockup. The same thing can happen on a larger scale. Each IMP
is trying to send to a neighbour, but nobody has any buffers available to receive incoming
packets. This situation is called indirect store-and-forward lockup. When an IMP is
locked up, all its lines are effectively blocked, including those not involved in the lockup.
Page 101
Computer Networks
A directed graph is constructed with being the nodes of the graph. Arcs connect
pairs of buffers (in the same IMP or on adjacent IMPs). The graph is designed in such a
way that if packets move from buffer to buffer along the arc, then there is no deadlock.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Figure 3.33: (a) Environment of data link layer (b) Environment of transport layer
The network services are grouped into three categories for studying transport protocols.
Page 102
Computer Networks
Network
Type Description
A Flawless, error-free service with no N-RESETS
B Perfect packet delivery, but with N-RESETS
C Unreliable service with lost and duplicated packets and
possibly N-RESETS
Type (C): Unreliable Service with lost and duplicated packets with N-RESETS.
WANs offering Packet Radio Networks, connectionless service belongs to this
class. Transport protocols are more complex .The worse the network service, the more
complex the transport protocol. OSI has devised a transport protocol with five variant,
Transport Protocol Classes
Protocol Class N/W Type Name
0 A Simple class
1 B Basic error recovery
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
2 A
class
Multiplexing class
3 B Error Recovery and
Multiplexing class
4 C Error detection and
recovery class
Page 103
Computer Networks
Class 1 is like class 0 except, it is able to recover from N-RESETS. The sequence
number is kept for resynchronization of transport entities whenever it is subjects to an N-
RESET. Class 1 does not provide any error control or flow control.
Class 2 is like class 0 except that 2 or more transport connections may be sent
over the network configuration. To reduce networking costs, the transport connection
goes over one or a few network connections.
Class 3 combines class 1 and class 2. It allows multiplexing and recovery from N-
RESETS. It also uses explicit flow control.
Class 4 is designed for type-C service and is more complex. It must handle lost,
duplicate or garbled frames, N-RESETS.
The choice of which will be used on any given connection is determined by the
transport entities at the time the connection is established.
TPDU numbering X O X X
Expedited data transfer O O X X
Transport layer flow control O X X
Resynchronization after a RESET X X X
Retention of TPDUs until ack X X X
Reassignment after network disconnect X X X
Frozen references X X X
Multiplexing X X X
Page 104
Computer Networks
The term TPDU (Transport Protocol Data Unit) refers to the “transport packet”.
The information passed by the transport user to transport provider is a message or TSDU
(Transport Service Unit). The various elements of transport protocols are, All the
connection-oriented protocols must protocols must provide a mechanism for establishing
connections as well as the called party must be able to accept or refuse a requested
connection. The transport entitles establish a network connection to move bits across the
network. A connectionless network protocol can also be used, provided it is class 4. The
message may be of any length and so, the transport layer must split them into TPDUs for
transport. Each TPDU can be split as well if the size is still large.
The transport entities will have to assign a number of each connection and in each
TDPU when multiple connections are open on a machine. Normal release of a connection
is found in all protocols, it works differently in class 0 with transport connection is
released implicitly by releasing the underlying network connection. All the others does
by exchange of TPDUS. All protocols must deal with protocol errors with rules
specifying whether to ignore or to release some or all connections. The concatenation of
TPDUS allows the transport entity to collect TPDUS and send them together as a single
packet, except in class 0. Error release refers to the fact that for protocol classes 0 and 2,
and N-RESET or N-DISCONNECT terminates the transport connections.
Page 105
Computer Networks
Gateway
A gateway is a computer system or other device that acts as a translator between two
systems that do not use the same communication protocols, data formatting structures,
languages, and architecture. A gateway repackages information or changes its syntax to
match the destination system.
Ethernet
Ethernet is a type of cabling and signaling specification and it uses cable sharing process
called CSMA/CD. Ethernet is called a contention based topology because workstations
are in competition for channel bandwidth.
Token Ring
Token ring is the Institute of Electrical and Electronic Engineers (IEEE 802.5) standard
for a token-passing ring network that can be configured in a star topology. While the
network physically appears as a star configuration, internally, signals travel around the
network from one station to the next in a ring. A token passing ring LAN is a group of
computers connected in a loop. The group uses a token passing access mechanism. A
computer wishing to send data should first receive permission. When it gets control of
the network it may transmit a frame. Each frame transmitted on the ring is transmitted
from one computer to the next, until it ultimately returns to the initiator of the
transmission.
Twisted Pair
One of the oldest and still most common transmission media is twisted pair. A twisted
pair consists of two insulated copper wires, typically about 1 mm thick. The most
common application of the twisted pair is the telephone system.
ANNAMALAI
ANNAMALAI UNIVERSITY
Coaxial Cable UNIVERSITY
Coaxial cable consists of a solid copper core surrounded by an insulator, a combination
shield and ground wire, and an outer protective jacket. In the early days of LANs, coaxial
cable was used for its high bit rates, but those same rates or higher rates can be achieved
with twisted-pair cable.
Page 106
Computer Networks
basically reflects the inner light of the core back into the core surrounds this core. A thick
plastic outer jacket surrounds this assembly, along with special fibers to add strength.
Congestion
Network congestion is due to excess traffic on a network. When congestion occurs,
packets may be lost or dropped. Recovering from these losses and retransmitting data
causes even more congestion.
Transport Protocol
In the OSI protocol stack, transport protocols occupy layer 4, which is just above the
network layer. The transport layer is the most important because it provides network
applications with reliable data delivery services.
3.5 Summary
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
performed at the individual PC workstation.
Few characteristics of LAN are resource sharing, productivity, and
communication.
LAN is composed of components like workstation, file server, gateway, network
interface unit, active hub, and passive hub and LAN cables.
The collective standards for LANs include CSMA/CD, token bus and token ring
known as IEEE 802. The various standards differ at the physical and the MAC
layer but are compatible with the data link layer.
Page 107
Computer Networks
The standards are divided in parts. The 802.1 standard gives and introduction to
the set of standards and defines the interface primitives. The 802.2 standard
describes the upper part of the data link layer, which uses the LLC protocol. Parts
802.3 through 802.5 describe the three LAN standards, the CSMA/CA, token bus
and token ring standards respectively. Each layer covers the physical layer and
MAC sublayer protocol.
Network Topology or Network Structure is the layout of the connections formed
between computers. The reliability and efficiency of a network is determined by
its structure.
The four main network structures are Bus network, Star network, Ring network,
and Hybrid network.
The real function of the network layer is routing packets from the source machine
to the destination machine. Routing algorithm is network layer software which
takes care of deciding the path the packets must take during data transmission.
When there are too many packets in network beyond the network capacity, the
performance of the network degrades. This is called congestion.
The transport service is implemented by a transport protocol used between two
entities. Transport protocols resemble data link protocols in an error control,
sequencing and flow control.
Page 108
Computer Networks
3.8 Assignments
1. Assume six devices are arranged in a mesh topology. How many cables are
needed? How many ports are needed for each device?
2. What is the smallest size of an Ethernet frame? What is the largest size of an
Ethernet frame?
3. What are the five transport classes defined by the OSI model?
1. http://www.iphase.com/Public/Products/Technology/WP/LAN.html
2. http://www.comsoc.org.
3. http://www.ieee.org
4. http://www.cisco.com
5. http://www.data.com/Tutorials
3.11 Keywords
Page 109
Computer Networks
Routing
Link state Routing
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Page 110
Computer Networks
UNIT - IV
4.0 Introduction
4.1 Objective
The objective of this lesson provides a detailed description about the Network
Security concepts. Security is all about protecting data and data systems and it provides
authentication, authorization, and access controls. At the end of the lesson you learn
about types of threats, Cryptography and Data Encryption Standard (DES) and so on.
4.2 Content
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
government agencies.
5. Intentional fraud through illegal access to computer data banks with emphasis, in
decreasing order of importance, on acquisition of funding data, economic data,
law enforcement data and data about individuals.
Page 110
Computer Networks
The following lists the types of threats that might be faced in the context of
network security.
Passive Threats
The monitoring and / or recording of data while the data are being transmitted
over a communication facility.
Release of Message Contents
Attack can read the user data in messages.
Traffic Analysis
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
The attacker can read packet headers, to determine the location and identify the
communicating hosts. The attacker can also observe the length and frequency of
messages.
Active Threats
The un-authorized use of a device attached to a communication facility, to alter
transmitting data or control signals or to generate spurious data or control signals.
Page 111
Computer Networks
Message-Stream Modification
The attacker can selectively modify, delete, delay, reorder and duplicate real
messages. The attacker can also insert counterfeit messages.
Denial of Message Service
The attacker can destroy or delay most or all messages.
Masquerade
The attacker can pose as a real host or switch and communicate with another host
or switch to acquire data or services.
Passive Threats
These are in the nature of eavesdropping or monitoring of the transmissions of an
organization. The goal of the attacker is to obtain information that is being transmitted.
Two types of threats are involved here: release of message contents and traffic analysis.
The threat of release of message contents is clearly understood by most managers.
A telephone conversion, an electronic mail message or a transferred file may contain
sensitive or confidential information. The attacker must be prevented from learning the
contents of these transmissions.
In the second passive threat, traffic analysis is less applicable. The contents of
messages or other information traffic can be masked, so that even if the attacker captures
the message the information cannot be extracted from the message. The common
technique for doing this is encryption. Passive threats are very difficult to detect since
they do not involve any alteration of the data. However, it feasible to prevent these
attacks from being successful. Thus the emphasis in dealing with passive threats is on
prevention and not detection.
Active Threats
The second major category of threat is active threats. These involve some
modification of the data stream or the creation of a false stream. This can be subdivided
into three categories: message-stream modification, denial of message service and
masquerade.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Message-stream modification simply means that some portion of a legitimate
message is altered or that message are delayed, replayed or reordered in order to produce
unauthorized effect.
The denial of service prevents or inhibits the normal use or management of
communication facilities. This attack may have a specific target; for example, an entity
may suppress all messages directed to a particular destination. Another form of service
denial is the disruption of an entire network, either by disabling the network or by
overloading it with messages so as to degrade performance.
Page 112
Computer Networks
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Security aspects come into play when it is necessary or desirable to protect the
information transmission from an opponent who may present a threat to confidentiality,
authenticity, and so on. All the techniques for providing security have two components:
A security-related transformation on the information to be sent. Examples include
the encryption of the message, which scrambles the message so that it is
unreadable by the opponent, and the addition of a code based on the contents of
the message, which can be used to verify the identity of the sender.
Some secret information shared by the two principals is unknown to the opponent.
An example is an encryption key used in conjunction with the transformation to
scramble the message before transmission and unscramble it on reception.
Page 113
Computer Networks
A trusted third party may be needed to achieve secure transmission. For example,
a third party may be responsible for distributing the secret information to the two
principals while keeping it from any opponent, or a third party may be needed to arbitrate
disputes between the two principals concerning the authenticity of a message
transmission.
This general model shows that there are four basic tasks in designing a particular
security service:
1. Design an algorithm for performing the security-related transformation. The
algorithm should be such that an opponent cannot defeat its purpose.
2. Generate the secret information to be used with the algorithm.
3. Develop methods for the distribution and sharing of the secret information.
4. Specify a protocol to be used by the two principals that makes use of the security
algorithm and the secret information to achieve a particular security service.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
be secured. Removal of the keyboard from each PC-based server is a good first step.
One may also put warning signs, secure them behind locked doors.
Page 114
Computer Networks
Levels of Security
For a local area network the following strategies should be considered:
1. Physical security
2. Access control
3. Personal identification
4. Encryption
5. The diskless PC
6. Protection against cable radiation
7. Call-back security
4.2.5 Cryptography
Cryptography is the branch of cryptology dealing with the design of algorithms
for encryption and decryption, which intends to ensure the secrecy and/or authenticity of
messages.
Traditional Cryptography
The messages to be encrypted known as plaintext are transformed by a function
that is parameterized by a key. The output of the encryption process, known as the cipher
text or messenger or radio then transmits cryptogram, often. The intruder, sometimes
can, not only listen to the communication channel, but also record messages and play
them back later, inject his own messages before they get to the receiver. The art of
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
breaking ciphers is called cryptanalysis. The art of devising ciphers and breaking them is
collectively known as cryptology.
Encryption methods have historically been divided into two categories:
Substitution Ciphers and Transposition Ciphers.
Substitution Cipher
In a substitution cipher another letter or group of letters to disguise it replaces
each letter or group of letters. In the oldest cipher known as the Caesar cipher, a becomes
D, b becomes E, c becomes F …. Z becomes C. A slight generalization of the Caesar
cipher allows the cipher text alphabet to be shifted k letters, instead of always 3. The
Page 115
Computer Networks
next improvement is to have each of the symbols in the plaintext, say the 26 letters map
onto some other letters. This general system is called monoalphabetic substitution.
To make the cryptanalyst’s job more difficult, it is necessary to smooth out the
frequencies of the cipher text, so the frequently appearing letters do not stand out so
clearly. One way of achieving this goal is to introduce multiple cipher alphabets, to be
used in notation, giving what is known as polyalphabetic cipher.
As the units encrypted becomes longer and longer, the cipher begins to resemble a
code. The main difference between a cipher and a code is that the former encrypted a
fixed-size unit of a plaintext with each operation, whereas the latter encrypts a single
variable-length linguistic unit, typically a single word or phrase. Prior to computers, code
came in two distinct flavors: one-part codes and two-part codes. In a one-part code both
the plaintext word and the code symbol are arranged in the same order.
Transposition Cipher
Substitution cipher and codes preserve the order of the plaintext symbols but
disguise them. But transposition cipher, in contrast, reorders the letters but do not
disguise them. The cipher is keyed by a word or phrase not containing any repeated
letters. The purpose of the key is to number the columns, column 1 being under the key
letter closest to the start of the alphabet and so on. The plaintext is written horizontally in
rows. Columns read out the cipher text, starting with the column whose key letter is
lowest.
To break a transposition cipher, the cryptanalyst must first be aware that he is
dealing with a transposition cipher. By looking at the frequency of the letters, it is easy
to see if they fit the normal pattern for plaintext. If so, the cipher is clearly a
transposition cipher, because in such a cipher every letter represents itself.
The next step is to make a guess at the number of columns. In many cases a
probable word or phrase may be guessed at from the context or message.
The remaining step is to order the columns. When the number of columns, k, is
small each of the k (k – 1) column pairs can be examined to see if its diagram frequencies
match that for English plaintext. The pair with the best batch is assumed to be correctly
positioned. Now each remaining column is tentatively tried as the successor to this pair.
The column whose digram and trigram frequencies give the best match is tentatively
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
assumed to be correct. The predecessor column is found in the same way. The entire
process is continued until a potential ordering is found. Chances are that the plain text
will be recognizable at this point.
Page 116
Computer Networks
4.2.7 Encryption
The conversion of plain text or data into unintelligible form by means of
reversible translation, based on a translation table or algorithm. It is also called
enciphering.
Two Types of Encryption are:
1. Conventional or Symmetric Encryption: Conventional or symmetric encryption is
a form of cryptosystem in which encryption is performed using the same key. The
key used is called the secret key. Both participants must share the same key and it
must remain as the secret to protect the communication.
2. Public Key Encryption or Asymmetric Encryption: Public key or Asymmetric
encryption is a form of cryptosystem in which encryption is performed using two
different keys, called the private key and the public key.
Private Key
One of the two keys used in asymmetric encryption system. For secure
communication, only its creator should know the private key.
Public Key
One of the two keys used in an asymmetric encryption system. The public key is
made public, to be used in conjunction with a corresponding private key.
Encryption with Private and Public Keys
The development of Public Key cryptography is the greatest and perhaps the only
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
true revolution in the entire history of cryptography. Public Key algorithms are based on
mathematical functions rather than on substitution and permutation. This Public Key
cryptography is asymmetric involving the use of two separate keys. This has profound
consequences in the area of confidentiality, authentication and key distribution.
Principles of Public Key Cryptosystem
Public Key algorithms rely on one key for encryption and a different but related
key for decryption. These algorithms have the following important characteristic:
It is computationally infeasible to determine the decryption key given only the
knowledge of the cryptographic algorithm and the encryption key.
Page 117
Computer Networks
In addition, some algorithms, such as RSA, also exhibit the following characteristic:
Either of the two related keys can be used for encryption, with the other used
for decryption.
Figure 4.3 (a) illustrates the Public Key encryption process. The essential steps
are the following:
1. Each end system in a network generates a pair of keys to be used for encryption
and decryption of messages that it will receive.
2. Each system publishes its encryption key by placing it in a public register or file.
This is the public key. The companion key is kept private.
3. If A wishes to send a message to B, it encrypts the message using B’s public key.
4. When B receives the message. B decrypts it using B’s private key. No other
recipient can decrypt the message because only B knows B’s private key.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Figure 4.3: Public Key Encryption
With this approach, all participants have access to public keys, and private keys
are generated locally by each participant and therefore never be distributed. As long as a
system controls its private key, its incoming communication is secure. At any time, a
system can change its private key and publish the companion public key to replace its old
public key.
Page 118
Computer Networks
key used in conventional encryption as a secret key. The two keys used for Public Key
encryption are referred to as the public key and the private key.
1. The same algorithm with the same key is used for 1. One algorithm is used for
encryption and decryption. encryption and decryption
with a pair of keys, one for
encryption and one for
decryption.
2. The sender and receiver must share the algorithm 2. The sender and receiver
and the key. must each have one of the
matched pair of keys (not the
same one).
1. The key must be kept secret. 1. One of the two keys must
be kept secret.
Let us take a closer look at the essential elements of a Public Key encryption scheme,
using Figure 4.4. There is some source A for a message, which produces a message in
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
plaintext, X = [X1, X2, …, XM]. The M elements of X are letters in some finite alphabet.
The message is intended for destination B
Page 119
Computer Networks
B generates a related pair of keys: a public key, KUb, and a private key, KRb. KRb is
know only to B, whereas KUb is publicly available and therefore accessible by A.
With the message X and the encryption key KUb as input, A forms the cipher text Y =
[Y1, Y2, …., YN]:
Y = EKUb (X)
The intended receiver, in possession of the matching private key, is able to invert the
transformation:
X = DKRb (Y)
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
An opponent, observing Y and having access to KUb but not having access to KRb
or X, must attempt to recover X and/or KRb. It is assumed that the opponent does have
knowledge of the encryption (E) and decryption (D) algorithms. If the opponent is
interested only in this particular message, then the focus of effort is to recover X, by
generating a plaintext estimate X. Often, however, the opponent is interested in being
able to read future messages as well, in which case an attempt is made to recover KR b by
generating an estimate KRb.
Either of the two related keys can be used for encryption, with the other being
used for decryption. This enables a rather different cryptographic scheme to be
Page 120
Computer Networks
X = DKUa (Y)
In this case, A prepares message to B and encrypts it using A’s private key before
transmitting it. B can decrypt the message using A’s public key. Because the message
was encrypted using A’s private key, only A could have prepared the message. Therefore,
the entire encrypted message serves as a digital signature. In addition, it is impossible to
alter the message services as a digital signature. In addition, it is impossible to alter the
message without access to A’s private key, so the message is authenticated both in terms
of source and in terms of data integrity.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Page 121
Computer Networks
1. It is computationally easy for a part B to generate a pair (public key KUb, private
key KRb ).
2. It is computationally easy for a sender A, knowing the public key and the message
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
to be encrypted, M, to generate the corresponding cipher text:
C = EKUb (M)
3. It is computationally easy for the receiver B to decrypt the resulting cipher text
using the private key to recover the original message:
M = DKRb = DKRb [EKUb (M)]
4. It is computationally infeasible for an opponent, knowing the public key, KUb, to
determine the private key, KRb.
5. It is computationally infeasible for an opponent, knowing the public key, KUb,
and a cipher text, C, to recover the original message, M.
6. The encryption and decryption functions can be applied in either order.
M = EKUb = [DKRb (M)]
Page 122
Computer Networks
Due to the potential advantages of public key cryptography, many researches are
at work, and some algorithms have already been published. A method discovered by a
group at MIT is based on some principles from number theory. The steps are as follows:
The most wisely used encryption scheme is based on the Data Encryption
Standard (DES) adopted in 1977 by the National Bureau of Standards. For DES, data are
encrypted in 64-bit input in a series of steps into a 64-bit output. The algorithm
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
transforms 64-bit input in a series of steps into a 64-bit output. The same steps, with the
same key, are used to reverse the encryption.
Using the key, the 64-bit input is transformed in a series of steps involving
transposition and exclusive-or operations. The result is a 64-bit output in which each bit
of output is a function of each bit of the input and each bit of the key. At the receiver,
using the same key and reversing the steps recover the plaintext.
The DES has enjoyed widespread use. Unfortunately, it has also been the subject
of much controversy as to how secure the DES is. The main concern is in the length of
Page 123
Computer Networks
the key, which some observers consider to be too short. To appreciate the nature of the
controversy, let us quickly review the history of the DES.
The DES is the result of a request for proposals for a national cipher standard
released by the NBS in 1973. At that time, IBM was in the final stages of a project called
Lucifer to develop its own encryption capability. IBM proposed the Lucifer scheme,
which was by far the best system submitted. It was, in fact, so good that it considerably
upset some people at the National security Agency (NSA), which until now is an art of
cryptography. DES, as eventually adopted, was essentially the same as Lucifer, with one
crucial difference; Lucifer’s key size was originally 128 bits, whereas the final standard
uses a key of 56 bits.
There are basically two ways to break a cipher. One way is to exploit properties
of whatever mathematical functions form the basis of the encryption algorithm to make a
“cryptoanalytic” attack on it. It is generally assumed that DES is immune to such attacks,
although the role of NSA in shaping the final DES standard leaves lingering doubts. The
other way is a brute force attack in which one tries all possible keys in an “exhaustive
search”. That is, one attempts to decrypt cipher text with every possible 56-bit key until
something intelligible pops out. With only 56 bits in the DES key, there are 2x56
different keys-a number that is uncomfortably small and becoming smaller as computers
get faster.
Whatever the merits of the case, DES has flourished in recent years and is widely
used, especially in financial applications. Except in areas of extreme sensitivity, the use
of DES in commercial applications should not be a cause for concern by responsible
managers.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Figure 4.7: P-Box
It shows a device known as the P-Box (P stands for permutation), used to effect a
transposition on an 8-bit input. If the 8 bits are designated from top to bottom as
01234567, the output of this particular P-box is 36071245. By appropriate internal
wiring, a P-box can be made to perform any transposition.
Page 124
Computer Networks
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
In January 1977, the U.S. Government adopted a product cipher developed by
IBM as its official for unclassified information. The adoption has stimulated a number of
manufactures to implement the encryption algorithm, known as Data Encryption
Standard (DES).
DES Encryption
The overall scheme for DES encryption is illustrated in Figure 4.10. As with any
encryption scheme, there are two inputs to the encryption function: the plaintext to be
encrypted and the key. In this case, the plaintext must be 64 bits in length and the key is
56 bits in length.
Page 125
Computer Networks
Looking at the following figure 4.10, one can see that the processing of the
plaintext proceeds in three phases.
First, the 64-bit plaintext passes through an initial permutation (IP) that rearranges
the bits to produce the permuted input. This is followed by a phase consisting of 16
rounds of the same function, which involves both permutation and substitution functions.
The output of the last (sixteenth) round consists of 64 bits that are a function of the input
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
plaintext and the key. The left and right halves of the output are swapped to produce the
preoutput. Finally, the preoutput is passed through a permutation (IP-1) that is the
inverse of the initial permutation function, to produce the 64-bit cipher text.
The right-hand portion of Figure 4.10 shows the way in which the 56-bit key is
used. Initially, the key is passed through a permutation function. Then, for each of the 16
rounds, a subkey (Ki) is produced by the combination of a left circular shift and a
permutation. The permutation function is the same for each round, but a different subkey
is produced because of the repeated iteration of the key bits.
Page 126
Computer Networks
However, encryption services should be higher than the transport layer in order to
minimize the amount of software that must be secure or trusted with plaintext.
That is, the less software that deals with vulnerable plaintext, the better. This
rationale would move encryption processes up to a higher level than the transport
layer.
While encryption can be performed at every level, the resulting overhead does not
appear to be worth the additional protection given to the user data.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Page 127
Computer Networks
Cryptography
Cryptography is concerned with keeping information, usually sensitive information,
private. Information is encrypted to make it private and decrypted to restore it to human-
readable form.
Cipher
A cipher is a character-for-character or bit-for-bit transformation, without regard to the
linguistic structure of the message. In contrast, a code replaces one word with another
word or symbol.
1. What are the potential security threats? Explain passive and active security
threats.
2. What is cryptography?
3. Encrypt the following message by using substitution and transposition method
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
“COMPUTER NETWORKS”.
4. Discuss in detail about DES algorithm.
5. Write down the various security recommendations given by ISO.
Page 128
Computer Networks
4.5 Summary
Network security can be defined as the protection of network resources against
unauthorized disclosure, modification, utilization, restriction or distraction.
Cryptography is the branch of cryptology dealing with the design of algorithms
for encryption and decryption intended to ensure the secrecy and/or authenticity
of messages.
Encryption is the conversion of plaintext or data into unintelligible form by means
of a reversible translation, based on a translation table or algorithm.
Conventional encryption is the form of cryptosystem in which encryption and
decryption are performed using the same key.
Private key is one of the two keys used in Public Key encryption system. For
secure communication, the private key should only be known to its creator.
Public key is one of the two keys used in Public Key encryption system. The
public key is made public, to be used in conjunction with a corresponding private
key.
Public Key encryption is a form of cryptosystem in which encryption and
decryption are performed using two different keys, one of which is referred to as
the public key and the other referred to as the private key.
The most widely used encryption scheme is based on the Data Encryption
Standard (DES). For DES, data are encrypted in 64-bit blocks using a 56-bit key.
The algorithm transforms 64-bit input in a series of steps into a 64-bit output.
ISO has given various recommendations for encryption to be provided in the
presentation layer of an OSI model.
Network security for LAN can be provided by securing workstations, servers,
passwords, files and programs.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
_____________
2. In the conventional method of encryption and decryption, which key is publicly
known?
3. In the public key method of encryption and decryption, only the receiver has
possession of the _____________
4. DES stands for _______________
5. ISO stands for ________________
Page 129
Computer Networks
4.8 Assignments
1. http://www.cs.wm.edu/~hallyn/des
2. http://www.rsa.com/rsalabs/newfaq
3. http://www.w3.org
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Cryptography
Plaintext
Ciphertext
Encryption
Decryption Data Encryption Standard (DES)
Page 130
Computer Networks
UNIT - V
5.0 Introduction
The objective of this Chapter is to understand the various services provided by the
Application Layer of the Open System Interconnection (OSI) model. The application
layer is used to define a range of applications that handle file transfers, terminal sessions,
and message exchange. At the end of the Chapter you learn about Electronic Mail, File
Transfer Access and Management (FTAM), Simple Network Management Protocol
(SNMP) and some of the network management functions.
5.2 Content
The electronic mail or e-mail is the transmission of textual material from one
place to another using electronic means for captures, transmission and delivery of
information. In all virtually distributed environments, e-mail is the most heavily
distributed application that is widely used across all architectures and vendor platforms.
The first e-mail systems simply consisted of file transfer protocols with the
convention that the first line of each message contained the recipient’s address. As time
went on, the limitations of this approach became more obvious. In 1984, CCITT has
drafted their X.400 recommendation, which was later taken over as the basis for OSI’s
MOTIS.
1. ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Composition refers to the process of creating messages and answers.
2. Transfer refers to moving messages from the originator to the recipient.
3. Reporting has to do with telling the originator about the message.
4. Conversion may be necessary to make the message suitable for display on the
recipient’s terminal or printer.
5. Formatting pertains to the form of the displayed message on the recipient’s
terminal.
6. Disposition is the final step and concerns with what the recipient does with the
message after receiving it.
Page 131
Computer Networks
In addition to these basic services, most mail systems provide a large variety of
advanced features. When people move, or when they are away for some period of time,
they may want their mail forwarded, so the system should be able to do this
automatically. Most mail system allow used to create mailboxes to store incoming mail.
Corporate managers often need to send a message to each of their subordinates,
customers or suppliers. This gives the idea of a distribution list, which is a list of
electronic mail address. When message is sent to the distribution list, identical copies are
delivered to everyone on the list.
Registered mail is another idea, to allow the originator to know that his message
has arrived. Alternatively, automatic notification of undeliverable mail may be desired.
In any case, the originator should have some control over the reporting of what happened.
Page 132
Computer Networks
Each line refers to one message. In this example, the mail contains eight
messages. Each display line contains several fields extracted from the envelope or header
of the corresponding message. In a simple mail system, the choice of fields displayed is
built into the program. In a more sophisticated system, the user can specify which fields
are to be displayed by providing a user profile, a file describing the display format. In
this example, the first field is the message number. The second field, Flags, can contain
a K, meaning that the message is not new, but was read previously and kept in the mail
box; an A, meaning that the message has already been answered; and /or an F, meaning
that the message has been forwarded to some one else. Other flags are also possible.
The third field tells how long the message is and the fourth one tells who sent the
message. Since this field is simply extracted from the message, this field may contain
first names, full names, initials, login names, or whatever else the sender chooses to put
in that field. Finally, the Subject field gives a brief summary of what the message is
about. If the Subject field is not included, then the mail tends not to get the highest
priority.
After the headers have been displayed, the user can perform any of the commands
listed below:
Command Parameter Description
ANNAMALAI
ANNAMALAI UNIVERSITY
s
f
A
UNIVERSITY
Address
#
#
Send a message
Forward message(s)
Answer message(s)
d # Delete message(s)
u # Undeleted previously deleted message(s)
m # Move message(s) to another mailbox
k # Keep message(s) after exiting
R mailbox Read a new mailbox
n Go to next message and display it
b Back up to previous message and display
it
Page 133
Computer Networks
Page 134
Computer Networks
The message transfer system is concerned with relaying the message from the
originator to the recipient. The message transfer agent accepts mails from user agents
and sees to it that the mail is started on its way. The message transfer agent is the
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
electronic post office. Just as with the postal system, a message visits several post
offices before being delivered. If the message is from a user agent, the syntax is checked
for validity, and if found invalid, it is sent back with an explanation. If it is valid, a
message identifier and time stamp are affixed, and then it is treated the same way as a
message arriving from another transfer agent.
The next step is to see if the recipient’s user agent or mailbox is local. If so, the
message can be delivered, queued for delivery or stored in the mailbox. If necessary, a
reply message confirming delivery is generated and sent back. If the recipient is not
local, the message is forwarded to another message transfer agent.
Page 135
Computer Networks
In most, systems, a log of message agents that have handled the message is
appended to the envelope. Not only does this make it easier to track down problems, but
it also makes it possible to check for loops. If a message transfer agent receives a
message containing itself in the log, it knows the message is looping and has to take
special measures to break the loop.
Delivery to a local user agent is not always trivial, because the originator and the
recipient may have different types of equipment. Possible message types include:
1. ASCII Text
2. Analog Facsimile
3. Digital Facsimile
4. Digitized Voice
5. Videotext
6. Telex
7. External (Some Other System)
If the recipient cannot directly accept the message type, the message transfer
agent can attempt to convert it before delivery. Not all conversions are feasible. If the
conversion cannot be done, the message cannot be delivered.
Although ISO has not standardized all the details of the store-and-forward
operation between message transfer agents, it has adopted CCITT’s general framework
for what is called the remote operation service. Four operations have been standardized:
Some fields of the envelope of the message transfer agent is listed below:
Field Description
Originator’s address Mail address of the sender
Recipient’s address Mail address of the recipient
Alternate recipient allowed Is redirection to someone else allowed
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Alternate recipient
Message id
Second choice recipient
Message identification
Priority Slow (cheap), normal, fast (expensive)
Originator report request What reporting does originator want
MTA report request What reporting does MTA want
Deferred delivery Do not deliver before this time
Latest delivery Do not deliver after this time
Content return Should content be returned on nondelivery
Page 136
Computer Networks
The need for Originator’s address and the Recipient’s address are obvious. The
next two fields deal with the possibility that the message can be delivered to the
destination machine but not to the recipients. If the message is confidential, the
originator can set the Alternate recipient allowed field to FALSE, it will not be forwarded
to the postmaster. It is also possible to specify a second choice recipient.
The second group concerns delivery. The Originator’s report request allows the
originator to specify that a reply message should be sent back if the message is delivered,
if it is not delivered, always, or never. If the reply specifies to whom it was actually
delivered and when that happened. The MTA report request allows the message transfer
agent to ask for its own reporting, distinct from the user reporting. The Deferred delivery
time field gives the earliest allowed delivery time. If the message actually arrives earlier,
it must be held. The reverse situation is when a delivery after a certain time is not worth
the trouble. This time is indicated by Latest delivery time. Finally, Content return
request can be set to insure if the message cannot be delivered, it is returned. This
feature is especially useful for people who send a lot of mail and do not keep copies of it,
so if something comes back as undeliverable they will know what it was.
The third group deals with the conversion between the ASCII text, teletex,
facsimile, digitized voice and other information types. The final group deals with
security. It provides for message encryption, checksums on the contents, the originator’s
digital signature, security codes and the recipient’s digital signature.
Page 137
Computer Networks
view of the database, that is, the user subset of the schema. Network designers: Must
provide for a physical design that satisfies all user subschemas at all nodes in the
network. The emerging ISO standards also provide methods to join different subschemas
between systems. Such a system must provide for consistent states for all data operating
in virtual filestore. A consistent state means that all databases are accurate and correct,
and any replicated copies contain the same values in the data fields. The time delay in
gathering data for analysis may be significant. In some cases, the data may be outdated
upon receipt by the component tasked with the analysis and resolution. The problem may
not be suspended.
File Servers
A file server can be characterized by three properties: File Structure, File
Attributes and File operations. Every file server has three models.
Different file servers have different models. In the first model, a file is an
unstructured lump of data without any substructure known to the file server. The next
model is the flat file, which consists of an ordered sequence of records. All the records of
a file need not be of the same size and type. Furthermore, some or all of the records may
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
have labels (keys) associated with them. These labels are not part of the data of the file,
just as the file is not either. The most general model of a file is the hierarchical file, which
takes the shape of a tree. Each mode of the tree may be a label, a data record, both or
neither.
Page 138
Computer Networks
Figure 5.1: Files (a) Unstructured (b) Sequence of Records (c) Hierarchical
All files have attributes that describe them. Each file must have a name or other
identifier and a size telling how much storage it currently occupies. In practice, most file
servers maintain various attributes as well. Some attributes are created when the file is
created, and are frozen thereafter. Others can be explicitly changed by user operations.
The Allowed operation attribute allows the creator of a file to specify, for
example, that some operations are not valid on this file. Access control determines who
may access the file and how. The File available attribute can be used to indicate that
there may be a slight delay when opening the file. The Content type attribute could tell
something about the record structure. The Legal qualifications attribute is a string that
might contain information relating to various national privacy laws.
Some of the possible operations with respect to the files are create, delete, select,
deselect, open, close, read and change. Operations with respect to contents of files are
locate, read, insert, replace, extend and erase.
All files must deal with access control and protection in some way. One of the
methods is to verify the sender of each request, either by having the sender include a
password in each request or by using one of the digital signature methods. A more
elaborate method is to have one or more passwords per file. In this system, anyone
presenting a valid password is allowed to perform the corresponding operations, without
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
regard to the sender’s true identity. Spare capability-based protection, with a bit map to
indicated permitted operation is a variant of this data.
Concurrency Control
Network file servers have multiple clients to take care of. If two or more clients
accidentally happen to access the same file at more or less the same time, problem can
occur.
One widely implemented solution is to permit clients to lock files before using
them. Two kinds of locks are used, Shared locks and Exclusive locks. Shared locks are
Page 139
Computer Networks
typically used for reading; exclusive locks are normally used for writing. When reading
a file, client generally does not mind the existence of other readers, but wants the shared
lock simply to prevent the file from being changed while it is busy.
Locking introduces several annoying problems. If client 1 has a lock on file A
and client 2 has lock on file B and each one is trying to get the other file, neither will
ever succeed. Another problem with locking is, what happens if a client holding some
locks crashes? Unless something is done, the locked files will remain locked forever. If
the server is not informed about client crashes the only thing it can do is adopt a policy
of automatically breaking locks on files that are not accessed for some specified time
interval. However, if a client is too slow, it may discover that some of its locks have
timed out part way through a complex multifile update leading to chaos.
As an alternative to having clients set individual locks, some file servers support
atomic actions, often called transactions in the context of file servers. When this facility
is available, a client can tell the server to begin a transaction, followed by any number of
opens and file operations and finished by a command to end the transaction. It is up to
the server to carry out the entire request in an atomic way, without interference from
other client request.
Replicated Files
Networks have several file servers for several reasons. For example to split the
workload over multiple servers, to allow file access to occur even if one file server is
down and to increase reliability by having independent backups of each file. One
strategy for file replication is to let each user open accounts with as many file servers as
one wants and manage all the replications by themselves. This puts a considerable
administrative burden on the user.
One would prefer the replication to be done automatically by the file servers
themselves. As long as files are never modified, maintaining multiple copies is easy.
The trouble comes when one copy is updated; the other must be updated too. The
simplest solution and one, which is widely used in practice, is primary copy replication.
In this scheme, one copy is designated as the master and all the others are slaves.
Updates are always made to the master, which then propagates them to the slaves.
A more robust method, especially with multiple clients active, is voting. To read a
file, it is required to obtain a read quorum, Nr. To modify a file, one needs a write
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
quorum, Nw, subject to the constraint Nr + Nw > N. Only after the appropriate number of
servers have been asked if they are willing to participate and agree, the operation can be
performed.
An interesting variation on voting is voting with ghosts. In most applications,
reads are much more common than writes, so Nr is typically a small number and Nw is
nearly N. This choice means that if a few servers are down, it may be impossible to
obtain a write quorum to all. Voting with ghosts solve this problem by creating a dummy
server, with no storage, for each real server that is down. A ghost is not permitted in a
read quorum, in which case it just throws away the file written to it. A write only
succeeds if at least one server is real. When a failed server is rebooted, it must obtain a
Page 140
Computer Networks
read quorum to locate the most recent version, which it then copies to itself before
starting normal operation.
FTAM is organized around the concept of the attribute, which describes the
properties of a file. Presently, four groups of attributes are defined.
Kernel group: Properties common to all files
Storage group: Properties of files that is stored
Security group: Properties for access control
Private group: Properties beyond FTAM scope
The kernel group consists of the file name, a description of the file structure
(Sequential, hierarchical), access restrictions (deletion, reads, etc.), location of the file
user, and the identification of the application entities involved in the FTAM
communications process.
The storage group describes several properties of a file. The properties are either
information about the ongoing characteristics of the file or information about the latest
operations on the file.
The private group is not defined by the FTAM standard. It is used for files
beyond the virtual filestore attributes.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
The FTAM model is a hierarchical structure resembling a tree. The tree can have
a single root and a number of nodes below the root. Each node is identified and can have
a data type associated with it. In virtual filestore, the conventional notion of a “data
record” is called a data unit (DU), and a node may or may not have a data unit associated
with it. The DUs are related to each other through a hierarchical structure called file
access data units (FADUs). Operations on a file are performed on a FADU through
FADU identifiers (or names). The FADU is identified as a typed data unit at the
presentation layer. The DU is considered to be the smallest amount that can be accessed.
Page 141
Computer Networks
The FTAM can take several forms for purposes of accessing a file or a portion of
a file. For example, a file can be accessed starting from the root and traversing down
through the nodes in a set order. As another example, FADUs can be accessed by “next”,
“last”, “previous”, and “beginning” signals.
The preorder tree traversal is a method to describe the structure of the tree by
defining the ordering of the nodes in the following manner:
Enter the tree through the top node.
Go through the nodes from the top, going down and to the left.
Go to the right in the tree when no paths remain to go down.
Go up in the tree if the search cannot go down.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Figure 5.2: FTAM Architecture
Page 142
Computer Networks
Yet another way to view FTAM is through the concept of file service regimes. A
file service is performed through a series of steps, which build up a set of file contexts.
The steps may include the following:
The initiator and responder handshaking with each other to establish their
identities.
Identification of the file to be accessed.
Establishing the file attributes.
Providing for any file management actions.
Location of the units in the file to be accessed.
Operating on the units in the file.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
The file service regime defines how FTAM primitives are used for the file
activity. A regime is a period in which a common state is valid for the service users.
Page 143
Computer Networks
Regimes provide the protocol for file selection, file opens/closes, data transfer,
and recovery operations. Four types of file service regimes are defined:
Application association regime: exists during the lifetime of application association
of two file service users.
File selection regime: exists during the time in which a particular file is associated
with the application association.
File access regime: exists during a particular set of presentation contexts,
concurrency controls, and commitment controls in operation for data transfer.
Data transfer regime: exists when a particular access context and direction of
transfer are in force.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
The dialogue proceeds through a series of protocol exchanges, such as the reading
of a file access data unit. Specific times in which these exchanges occur are called
phases. During a phase, FTAM imposes strict rules on state transitions and the use of
primitives and state diagrams. The phases are sequential; they cannot be nested.
Page 144
Computer Networks
Configuration
Management
Backup/restore Distribution
Management Management
Accounting Operations
Management Management
Performance
Management
PM facilities evaluate the behavior of network layer, entity resources and the
effectiveness of communication activities. It can also adjust operating characteristics
and generate network utilization reports by monitoring a station’s performance.
Page 145
Computer Networks
AM facilities calculate the amount of network time used by each segment of the
network and facilitate a billing system for the usage of resources. Examples include
keeping track of how many licenses have been granted to users, enforcing network
licenses, and accounting for disk or CPU usage on a server machine.
A BM facility deals with the recovery from disk failure as well as the rollback to
previous versions of files to recover data or programs that were lost because of user error.
Page 146
Computer Networks
Page 147
Computer Networks
Each agent must also implement SNMP, UDP, and IP. In addition, there is an
agent process that interprets the SNMP messages and controls the agent’s MIB. For an
agent device that supports other applications such as FTP, TCP as well as UDP is
required.
Page 148
Computer Networks
The chief advantages of using a fetch-store paradigm are stability, simplicity, and
flexibility. SNMP is especially stable because its definition remains fixed, even though
new data items are added to the MIB and new operations are defined as side effects of
storing into those items. SNMP is simple to implement, understand, and debug because it
avoids the complexity of having special cases for each command. Finally, SNMP is
especially flexible because it can accommodate arbitrary commands in an elegant
framework. SNMP offers more than the two operations described.
The set of possible SNMP Operations
Command Meaning
get-request Fetch a value from a specific variable
get-next-request Fetch a value without knowing its exact name
get-response Reply to a fetch operation
set-request Store a value in a specific variable
trap Reply triggered by an event
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
It is possible to denote individual elements of a table by appending a suffix to the
object identifier for the table. A client program may wish to examine entries in a table
for which it does not know all valid suffixes. The get-next-request operation allows a
client to iterate through a table without knowing how many items the table contains. The
rules are quite simple. When sending a get-next-request, the client supplies a prefix of a
valid object identifier, p. The server examines the set of object identifiers for all
variables it controls, and responds by sending a get-response command for the one that
has object identifier lexicographically greater than P. Because the MIP uses suffixes to
index tables a client can send the prefix of an object identifier corresponding to a table
and receive the first element in the table. The client can send the name of the first
element in a table and receive the second, and so on.
Page 149
Computer Networks
Proxies
In SNMP all agents as well as management stations must support user Datagram
protocol (UDP) and IP. This limits direct management to such devices and excludes
other devices, such as some bridges and modems, that do not support any part of the
TCP/IP protocol suite further, there may be numerous small systems (PC’s, work
stations) that do implement TCP/IP to support their applications.
The strength of SNMP is its simplicity. SNMP provides a basic set of network
management tools in a package that is easy to implement and easy to configure.
As users have come to rely more and more on SNMP to manage ever expanding
networks with ever-growing workloads. Its deficiencies have become all too apparent.
These deficiencies fall into three categories.
1. Tack of support for distributed network management
2. Functional deficiencies
3. Security deficiencies
The first two categories of deficiencies are addressed in SNMPr2 and the third has
been addressed in SNMPr3.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
Page 150
Computer Networks
User Agent
A front-end application called a User Agent (UA) that provides facilities for creating,
addressing, sending, receiving, and forwarding messages. Other features include the
ability to attach files and other information to messages and the ability to manage a
personal address book.
FTAM
File Transfer Access & Management (FTAM) is an OSI standard that provides file
transfer services between client (initiator) and server (responder) systems in an open
environment. It also provides access to files and management of files on diverse systems.
In these respects, it strives to be a universal file system. An interesting feature of FTAM
is that it is implemented in all seven layers of the OSI protocol stack.
Network Management
Network management involves active and passive monitoring of network resources for
the purpose of troubleshooting, detecting potential problems, improving performance,
documentation, and reporting.
SNMP
Simple Network Management Protocol (SNMP) is a popular management protocol
defined by the Internet community for TCP/IP networks. It is a communication protocol
for collecting information from devices on the network.
1. What is E-mail?
2. Give the basic operations of any e-mail system.
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
3. Write notes on user agent.
4. What is the role of message transfer agent in e-mail?
5. What are the four attributes defined in FTAM?
6. Define storage group. List down the properties included in it.
7. Write notes on file service regimes.
8. List down the different network management functions available.
9. Write notes on the basic concepts of SNMP.
Page 151
Computer Networks
5.5 Summary
The electronic mail or e-mail is the most heavily used distributed application
across the world. It is the transmission of textual material from one place to
another using electronic means for captures, transmission and delivery of
information. E-mail system has two basic parts: the user agents and the message
transfer agent.
The user agent is a program that provides the interface to the mail system. It
allows the user to compose, send and receive mail and manipulate mailboxes.
The message transfer agent accepts mail from user agents and sends the mail on
its way. It is the electronic post office.
Data usage often varies among different applications. Virtual filestore is a
common model for all data files and databases that provides a common
foundation for file transfer, access and management.
SNMP is a standard that deals with network management covering services,
protocols and management information bases.
5.7
ANNAMALAI
ANNAMALAI
Supplementary Materials
UNIVERSITY
UNIVERSITY
1. Andrew S.Tannenbaum, “Computer Networks”, 4th Edition, Pearson
Education.
2. Behrouz A.Forouzan, “Data Communication and Networking”, Tata McGraw
Hill Edition.
Page 152
Computer Networks
5.8 Assignments
1. Electronic mail systems need directories so people's e-mail addresses can be
looked up. To build such directories, names should be broken up into
standard components (e.g., first name, last name) to make searching
possible. Discuss some problems that must be solved for a worldwide
standard to be acceptable.
2. What three functions can SNMP perform to manage network devices?
1. http://www.software.com
2. http://www.banyan.com
3. http://www.imap.org
4. http://www.internic.net/rfc/rfc821.txt
5. http://www.yahoo.com/Computers_and_Internet/Software/Internet/Electroni
c_Mail
ANNAMALAI
ANNAMALAI UNIVERSITY
UNIVERSITY
5.11 Keywords
Electronic mail
User Agent (UA)
Message Transfer Agent (MTA)
Simple Mail Transfer Protocol (SMTP)
File Transfer Access and management (FTAM)
Simple Network Management Protocol (SNMP)
Page 153