0% found this document useful (0 votes)
62 views279 pages

Network Topology and Data Security Insights

Uploaded by

sharmalalit0777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views279 pages

Network Topology and Data Security Insights

Uploaded by

sharmalalit0777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT

Notes on Computer Network

Chapter 1: Introduction

Topics Covered

[Link] of Network
[Link] Terminology
[Link] and uses of Network
[Link] (Development) of Networking
[Link] Topology
[Link] Hardware
[Link] Software
[Link] Reference Model
[Link]/IP Reference Model
[Link] of TCP/IP and OSI Reference Model
[Link] of OSI Reference model and TCP/IP Reference model

What is Network?
A network is a collection of computers, servers, mainframes, network devices,
peripherals, or other devices connected to one another to allow the sharing of data. An
excellent example of a network is the Internet, which connects millions of people all over
the world.

Advantages of computer networking


Main benefits of networks include:
 File sharing – you can easily share data between different users, or access it
remotely if you keep it on other connected devices.
 Resource sharing – using network-connected peripheral devices like printers,
scanners and copiers, or sharing software between multiple users, saves money.
 Sharing a single internet connection – it is cost-efficient and can help protect
your systems if you properly secure the network.
 Increasing storage capacity – you can access files and multimedia, such as
images and music, which you store remotely on other machines or network-attached
storage devices.

ELEMENTARY TERMINOLOGY OF NETWORKS


Nodes refers to the computers that are attached to a network and are seeking to share the
resources of the network.

And in case, if there were no nodes, then there would be no network at all.

Nodes are also called as workstations

Server is basically a computer that facilitates the sharing of data, software, and hardware
resources such as printers, modems, etc. on the network.

1
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Sometimes on small networks, all the shareable things such as files, data, softwares, etc.
are stored on a computer called server.

A network can also have more than one server and each server has a unique name on the
network and all the users of that network identify the server by its unique name.

Types of Server

There are two types server, which are listed here:

 dedicated server

 non-dedicated server
Non-dedicated Server

Non-dedicated server is basically a workstation that can double up as a server on small


networks. It is called as non-dedicated server because it is not completely dedicated to the
cause of serving.

Such servers can facilitate the resource-sharing among the work-stations on a


proportionately smaller scale.

Since one computer works as a workstations (nodes) as well as a server, means it is


slower and requires more memory.

The networks (small networks) using such a server are known as PEER-TO-PEER
networks.

Dedicated Server

Dedicated server is basically a computer that is reserved for the server's job and its only
job is to help workstations access data, software and hardware resources on bigger
network installation and it does not double-up as a workstation.

The network using dedicated server are known as MASTER-SLAVE networks.

There can also be several servers on a network, allows workstations to share particular
resources. For example, there may be a server exclusively for serving files-related
requests such as storing files, deciding about their access privileges and regulating the
amount of space allowed for each user. Such server is known as file server. Similarly,
there may also be a printer server and modem server.

The printer server responsible or takes care of the printing requirements of a number of
workstations.

2
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The modem server helps a group of network users use a modem to transmit long distance
messages.

NIU stands for Network Interface Unit, is basically an interpreter that is used to establish
the communication between the server and the workstations or nodes.

A standalone computer or a computer that is not attached to any network, lives in its own
world and carries out its tasks with its own inbuilt resources. But as soon as it becomes a
workstation, then it needs an interface to help establish a connection with the network
because without this, the workstation or node will not be able to share the network
resources.

You can also say that, a Network Interface Unit (NIU) is a basically a device that is
attached to each of the workstations and the server, and helps workstation establish the all
important connection with the network.

Each Network Interface Unit (NIU) attached to a workstation has a unique number to
identify it which is known as the node address.

The Network Interface Unit (NIU) is also called as Terminal Access Point (TAP) or
Network Interface Card (NIC).

Different manufacturers have different names for the interface.

The Network Interface Card (NIC) assigns a unique physical address to each of the NIC
card and this physical address also known as MAC address.

Uses of Computer Networks


Business Applications

 Resource sharing:- Computer Network is used in Resource sharing. The Same


Device in a network can be accessed by the different computer which is connected
to the same network like the printer, fax, scanner, etc.

 Information sharing:- Information sharing is the exchange of data between


various organizations, people, and technologies. Different information and data
can be shared like the file, videos, etc.

 Communication medium:- Computer Network is widely used in communication


like chatting, video chatting, emails ,etc.

 E-commerce:- Computer Network is also used in E-commerce where users can


pay bills, transfer cash, buy good, etc using the computer.

3
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Home Applications

 Access to remote information:- Computer Network facilitates users to access


information that is distant away by staying at home remotely.

 Person-to-person communication:- Users can use Computer Network in their


home to communicate with other peoples by telephone, video chat, etc.

 Interactive entertainment:- Computer Network is used in multiplayer gaming. It


is also used in social networking sites like facebook, twitter, etc to connect
people.
Mobile Users

Computer Network is used in the mobile device like telephone, Smartphone, tablets, etc
for communication, the internet, file sharing, etc.

History (Development) of Computer Networks

Here, we look back on some of the most important events in computer networking over
the years and find out from the experts what the future of this sector is set to look like
over the coming years...

1940
George Stibitz, who is internationally recognised as one of the fathers of the first modern
digital computer, uses a teletype (an electromechanical typewriter that can be used to
send and receive typed messages) to send commands to the Complex Number Computer
in New York over telegraph lines. It was the first computing machine ever used remotely.

1964
American Airlines calls on IBM to implement the SABRE reservation system and online
transaction processing is born. Using telephone lines, SABRE links 2,000 terminals in 65
cities to a pair of IBM 7090 computers and is able to deliver data on any flight in less
than three seconds. Before the introduction of SABRE, the American Airlines’ system for
booking flights was entirely manual. It consisted of a team of eight operators who sorted
through a rotating file with cards for every flight.

1980s
Access to the ARPANET is expanded in 1981. In 1982, the internet protocol suite
(TCP/IP) is introduced as the standard networking protocol on the ARPANET. In the
early 1980s the NSF funds the establishment for national supercomputing centers at

4
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

several universities, and provides interconnectivity in 1986 with the NSFNET project,
which also created network access to the supercomputer sites in the United States from
research and education organisations. Commercial Internet service providers (ISPs) begin
to emerge in the late 1980s.

2000s
In the UK, on March 31st 2000, Telewest launches home ADSL – asymmetric digital
subscriber line. Goldsmith Road in Gillingham, Kent, is the first street to receive the
technology. In 2002, there were fewer than 200,000 broadband users, but just four years
later, there were around 13 million.

2005
Box launches an online file sharing and personal cloud content management service for
businesses. By 2006 Amazon Web Services introduces its cloud storage service and gains
widespread recognition as the storage supplier to emerging services such as Dropbox and
Pinterest.

2011
Fiber-optic broadband and new DOCSIS standards make broadband speeds easily reach
100Mbps. This in turn means end users need better routers to match the broadband speed.

2014
The new Wi-Fi standard 802.11ac launches, offering faster speed (over 2Gbps) compared
to 450Mbps of the previous 802.11n standard. Along with this comes better signal
coverage. 802.11ac was ratified in 2014.

2016 and beyond


Now we know how the market has evolved, what’s in store for the networking sector in
the future?

TP-Link UK country manager Nelson Qiao believes the demand for wireless is only
going to continue to grow as smart home tech becomes more mainstream.

“More people have more connected devices and refuse to wait for downloads. The need
for speed is opening up new wireless frequencies and encouraging manufacturers to
develop more feature-rich products that are designed to be easy to set up and manage,” he
tells PCR.

Paul Routledge, country manager for D-Link UK&I, agrees: “Smart home is certainly
one of the most exciting new categories to emerge in recent years, and I’m delighted that
D-Link is at the forefront of forging this market.”

5
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Steven Tseng, territory product manager for ASUS’ networking & wireless devices
business, believes that the trusty router will become the central hub of all smart home and
Internet of Things (IoT) devices.

“The capabilities of routers will expand to allow more devices to connect to them, and
IoT standards such as BLE and Zigbee will be implemented in router hardware too,” he
says.

Network Topologies

Network Topology is the schematic description of a network arrangement, connecting


various nodes(sender and receiver) through lines of connection.

BUS Topology

Bus topology is a network type in which every computer and network device is connected
to single cable. When it has exactly two endpoints, then it is called Linear Bus topology.

Features of Bus Topology

1. It transmits data only in one direction.

2. Every device is connected to a single cable

Advantages of Bus Topology

1. It is cost effective.

2. Cable required is least compared to other network topology.

3. Used in small networks.

6
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

4. It is easy to understand.

5. Easy to expand joining two cables together.

Disadvantages of Bus Topology

1. Cables fails then whole network fails.

2. If network traffic is heavy or nodes are more the performance of the network
decreases.

3. Cable has a limited length.

4. It is slower than the ring topology.

RING Topology

It is called ring topology because it forms a ring as each computer is connected to another
computer, with the last one connected to the first. Exactly two neighbours for each
device.

Features of Ring Topology

1. A number of repeaters are used for Ring topology with large number of nodes,
because if someone wants to send some data to the last node in the ring topology with
100 nodes, then the data will have to pass through 99 nodes to reach the 100th node.
Hence to prevent data loss repeaters are used in the network.

2. The transmission is unidirectional, but it can be made bidirectional by having 2


connections between each Network Node, it is called Dual Ring Topology.

7
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

3. In Dual Ring Topology, two ring networks are formed, and data flow is in
opposite direction in them. Also, if one ring fails, the second ring can act as a backup,
to keep the network up.

4. Data is transferred in a sequential manner that is bit by bit. Data transmitted, has
to pass through each node of the network, till the destination node.

Advantages of Ring Topology

1. Transmitting network is not affected by high traffic or by adding more nodes, as


only the nodes having tokens can transmit data.

2. Cheap to install and expand

Disadvantages of Ring Topology

1. Troubleshooting is difficult in ring topology.

2. Adding or deleting the computers disturbs the network activity.

3. Failure of one computer disturbs the whole network.

STAR Topology

In this type of topology all the computers are connected to a single hub through a cable.
This hub is the central node and all others nodes are connected to the central node.

Features of Star Topology

1. Every node has its own dedicated connection to the hub.

8
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

2. Hub acts as a repeater for data flow.

3. Can be used with twisted pair, Optical Fibre or coaxial cable.

Advantages of Star Topology

1. Fast performance with few nodes and low network traffic.

2. Hub can be upgraded easily.

3. Easy to troubleshoot.

4. Easy to setup and modify.

5. Only that node is affected which has failed, rest of the nodes can work smoothly.

Disadvantages of Star Topology

1. Cost of installation is high.

2. Expensive to use.

3. If the hub fails then the whole network is stopped because all the nodes depend on
the hub.

4. Performance is based on the hub that is it depends on its capacity

MESH Topology

It is a point-to-point connection to other nodes or devices. All the network nodes are
connected to each other. Mesh has n(n-1)/2 physical channels to link n devices.

There are two techniques to transmit data over the Mesh topology, they are :

1. Routing

2. Flooding

Routing

In routing, the nodes have a routing logic, as per the network requirements. Like routing
logic to direct the data to reach the destination using the shortest distance. Or, routing
logic which has information about the broken links, and it avoids those node etc. We can
even have routing logic, to re-configure the failed nodes.

9
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Flooding

In flooding, the same data is transmitted to all the network nodes, hence no routing logic
is required. The network is robust, and the its very unlikely to lose the data. But it leads
to unwanted load over the network.

Types of Mesh Topology

1. Partial Mesh Topology : In this topology some of the systems are connected in
the same fashion as mesh topology but some devices are only connected to two or
three devices.

2. Full Mesh Topology : Each and every nodes or devices are connected to each
other.

Features of Mesh Topology

1. Fully connected.

2. Robust.

3. Not flexible.

Advantages of Mesh Topology

1. Each connection can carry its own data load.

2. It is robust.

10
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

3. Fault is diagnosed easily.

4. Provides security and privacy.

Disadvantages of Mesh Topology

1. Installation and configuration is difficult.

2. Cabling cost is more.

3. Bulk wiring is required.

TREE Topology

It has a root node and all other nodes are connected to it forming a hierarchy. It is also
called hierarchical topology. It should at least have three levels to the hierarchy.

Features of Tree Topology

1. Ideal if workstations are located in groups.

2. Used in Wide Area Network.

Advantages of Tree Topology

1. Extension of bus and star topologies.

2. Expansion of nodes is possible and easy.

3. Easily managed and maintained.

4. Error detection is easily done.

11
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Disadvantages of Tree Topology

1. Heavily cabled.

2. Costly.

3. If more nodes are added maintenance is difficult.

4. Central hub fails, network fails.

HYBRID Topology

It is two different types of topologies which is a mixture of two or more topologies. For
example if in an office in one department ring topology is used and in another star
topology is used, connecting these topologies will result in Hybrid Topology (ring
topology and star topology).

12
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Features of Hybrid Topology

1. It is a combination of two or topologies

2. Inherits the advantages and disadvantages of the topologies included

Advantages of Hybrid Topology

1. Reliable as Error detecting and trouble shooting is easy.

2. Effective.

3. Scalable as size can be increased easily.

4. Flexible.

Disadvantages of Hybrid Topology

1. Complex in design.

2. Costly.

Network hardware

There are two types of transmission technology that are in widespread use. They are as
follows:
1. Broadcast links- Broadcast networks have a single communication channel that is
shared by all the machines on the network. Short messages, called packets in
certain contexts, sent by any machine are received by all the others. An address
field within the packet specifies the intended recipient. Upon receiving a packet, a
machine checks the address field. If the packet is intended for the receiving
machine, that machine processes the packet; if the packet is intended for some
other machine, it is just ignored.
2. Point-to-point links- point-to-point networks consist of many connections
between individual pairs of machines. To go from the source to the destination, a
packet on this type of network may have to first visit one or more intermediate
machines.

13
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Types of Communication Networks

Local Area Network (LAN)

It is also called LAN and designed for small physical areas such as an office, group of
buildings or a factory. LANs are used widely as it is easy to design and to troubleshoot.
Personal computers and workstations are connected to each other through LANs. We can
use different types of topologies through LAN, these are Star, Ring, Bus, Tree etc.

LAN can be a simple network like connecting two computers, to share files and network
among each other while it can also be as complex as interconnecting an entire building.

LAN networks are also widely used to share resources like printers, shared hard-drive
etc.

Characteristics of LAN

 LAN's are private networks, not subject to tariffs or other regulatory controls.

 LAN's operate at relatively high speed when compared to the typical WAN.

14
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 There are different types of Media Access Control methods in a LAN, the
prominent ones are Ethernet, Token ring.

 It connects computers in a single building, block or campus, i.e. they work in a


restricted geographical area.

Applications of LAN

 One of the computer in a network can become a server serving all the remaining
computers called clients. Software can be stored on the server and it can be used by
the remaining clients.

 Connecting Locally all the workstations in a building to let them communicate


with each other locally without any internet access.

 Sharing common resources like printers etc are some common applications of
LAN.

Advantages of LAN

 Resource Sharing: Computer resources like printers, modems, DVD-ROM


drives and hard disks can be shared with the help of local area networks. This reduces
cost and hardware purchases.

 Software Applications Sharing: It is cheaper to use same software over network


instead of purchasing separate licensed software for each client a network.

 Easy and Cheap Communication: Data and messages can easily be transferred
over networked computers.

 Centralized Data: The data of all network users can be saved on hard disk of the
server computer. This will help users to use any workstation in a network to access
their data. Because data is not stored on workstations locally.

 Data Security: Since, data is stored on server computer centrally, it will be easy
to manage data at only one place and the data will be more secure too.

 Internet Sharing: Local Area Network provides the facility to share a single
internet connection among all the LAN users. In Net Cafes, single internet connection
sharing system keeps the internet expenses cheaper.

Disadvantages of LAN

 High Setup Cost: Although the LAN will save cost over time due to shared
computer resources, but the initial setup costs of installing Local Area Networks is
high.

15
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Privacy Violations: The LAN administrator has the rights to check personal data
files of each and every LAN user. Moreover he can check the internet history and
computer use history of the LAN user.

 Data Security Threat: Unauthorised users can access important data of an


organization if centralized data repository is not secured properly by the LAN
administrator.

 LAN Maintenance Job: Local Area Network requires a LAN Administrator


because, there are problems of software installations or hardware failures or cable
disturbances in Local Area Network. A LAN Administrator is needed at this full time
job.

 Covers Limited Area: Local Area Network covers a small area like one office,
one building or a group of nearby buildings.

Metropolitan Area Network (MAN)

It was developed in [Link] is basically a bigger version of LAN. It is also called MAN
and uses the similar technology as LAN. It is designed to extend over the entire city. It
can be means to connecting a number of LANs into a larger network or it can be a single
cable. It is mainly hold and operated by single private company or a public company.

Characteristics of MAN

 It generally covers towns and cities (50 km)

 Communication medium used for MAN are optical fibers, cables etc.

 Data rates adequate for distributed computing applications.

16
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Advantages of MAN

 Extremely efficient and provide fast communication via high-speed carriers, such
as fibre optic cables.

 It provides a good back bone for large network and provides greater access to
WANs.

 The dual bus used in MAN helps the transmission of data in both directions
simultaneously.

 A MAN usually encompasses several blocks of a city or an entire city.

Disadvantages of MAN

 More cable required for a MAN connection from one place to another.

 It is difficult to make the system secure from hackers and industrial


espionage(spying) graphical regions.

Wide Area Network (WAN)

It is also called WAN. WAN can be private or it can be public leased network. It is used
for the network that covers large distance such as cover states of a country. It is not easy
to design and maintain. Communication medium used by WAN are PSTN or Satellite
links. WAN operates on low data rates.

17
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Characteristics of WAN

 It generally covers large distances(states, countries, continents).

 Communication medium used are satellite, public telephone networks which are
connected by routers.

Advantages of WAN

 Covers a large geographical area so long distance business can connect on the one
network.

 Shares software and resources with connecting workstations.

 Messages can be sent very quickly to anyone else on the network. These messages
can have picture, sounds or data included with them(called attachments).

 Expensive things(such as printers or phone lines to the internet) can be shared by


all the computers on the network without having to buy a different peripheral for each
computer.

 Everyone on the network can use the same data. This avoids problems where
some users may have older information than others.

Disadvantages of WAN

 Need a good firewall to restrict outsiders from entering and disrupting the
network.

 Setting up a network can be an expensive, slow and complicated. The bigger the
network the more expensive it is.

 Once set up, maintaining a network is a full-time job which requires network
supervisors and technicians to be employed.

 Security is a real issue when many different people have the ability to use
information from other computers. Protection against hackers and viruses adds more
complexity and expense.

Wireless Network

Digital wireless communication is not a new idea. Earlier, Morse code was used to
implement wireless networks. Modern digital wireless systems have better performance,
but the basic idea is the same.

18
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Wireless Networks can be divided into three main categories:

1. System interconnection

2. Wireless LANs

3. Wireless WANs

System Interconnection

System interconnection is all about interconnecting the components of a computer


using short-range radio. Some companies got together to design a short-range wireless
network called Bluetooth to connect various components such as monitor, keyboard,
mouse and printer, to the main unit, without wires. Bluetooth also allows digital cameras,
headsets, scanners and other devices to connect to a computer by merely being brought
within range.

In simplest form, system interconnection networks use the master-slave concept. The
system unit is normally the master, talking to the mouse, keyboard, etc. as slaves.

Wireless LANs

These are the systems in which every computer has a radio modem and antenna with
which it can communicate with other systems. Wireless LANs are becoming increasingly
common in small offices and homes, where installing Ethernet is considered too much
trouble. There is a standard for wireless LANs called IEEE 802.11, which most systems
implement and which is becoming very widespread.

Wireless WANs

The radio network used for cellular telephones is an example of a low-bandwidth


wireless WAN. This system has already gone through three generations.

 The first generation was analog and for voice only.

 The second generation was digital and for voice only.

 The third generation is digital and is for both voice and data.

19
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Inter Network

Inter Network or Internet is a combination of two or more networks. Inter network can be
formed by joining two or more individual networks by means of various devices such as
routers, gateways and bridges.

Network Software

 Protocol Hierarchies

20
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Layers, Protocols and Interfaces

In order to understand how the actual communication is achieved between two remote
hosts connected to the same network, a general network diagram is shown above divided
into a series of layers. The actual number as well as their function of each layer differs
from network to network. Each layer passes data and control information to the layer
below it. As soon as the data are collected form the next layer, some functions are
performed there and the data are upgraded and passed to the next layer. This continues
until the lowest layer is reached. Actual communication occurs when the information
passes layer 1 and reaches the Physical medium. This is shown with the solid lines on
the diagram.

Theoretically layer n on one machine maintains a conversation with the same layer in the
other machine. The way this conversation is achieved is by the protocol of each layer.
Protocol is collection of rules and conventions as agreement between the communication
parties on how communication is to proceed. The later is known as virtual
communication and is indicated with the dotted lines on the diagram above.

As far as the above diagram is concerned another important issue to be discussed is


the interface between each layer. It defines the services and operation the lower layer
offers to the one above It. When a network is built decisions are made to decide how
many layers to be included and what each layer should do. So each layer performs a
different function and as a result the amount of information past from layer to layer is
minimized.

21
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Connection Oriented and Connectionless Services

These are the two services given by the layers to layers above them. These services are :

1. Connection Oriented Service

2. Connectionless Services

Connection Oriented Services

There is a sequence of operation to be followed by the users of connection oriented


service. These are :

1. Connection is established

2. Information is sent

3. Connection is released

In connection oriented service we have to establish a connection before starting the


communication. When connection is established we send the message or the information
and then we release the connection.

Connection oriented service is more reliable than connectionless service. We can send the
message in connection oriented service if there is an error at the receivers end. Example
of connection oriented is TCP (Transmission Control Protocol) protocol.

Connection Less Services

It is similar to the postal services, as it carries the full address where the message (letter)
is to be carried. Each message is routed independently from source to destination. The
order of message sent can be different from the order received.

In connectionless the data is transferred in one direction from source to destination


without checking that destination is still there or not or if it prepared to accept the
message. Authentication is not needed in this. Example of Connectionless service is UDP
(User Datagram Protocol) protocol.

22
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Difference between Connection oriented service and Connectionless service

1. In connection oriented service authentication is needed while connectionless


service does not need any authentication.

2. Connection oriented protocol makes a connection and checks whether message is


received or not and sends again if an error occurs connectionless service protocol
does not guarantees a delivery.

3. Connection oriented service is more reliable than connectionless service.

4. Connection oriented service interface is stream based and connectionless is


message based.

Service Primitives

A service is formally specified by a set of primitives (operations) available to a user


process to access the service. These primitives tell the service to perform some action or
report on an action taken by a peer entity. If the protocol stack is located in the operating
system, as it often is, the primitives are normally system calls. These calls cause a trap to
kernel mode, which then turns control of the machine over to the operating system to
send the necessary packets. The set of primitives available depends on the nature of the
service being provided. The primitives for connection-oriented service are different from
those of connection-less service. There are five types of service primitives :

1. LISTEN : When a server is ready to accept an incoming connection it executes


the LISTEN primitive. It blocks waiting for an incoming connection.

2. CONNECT : It connects the server by establishing a connection. Response is


awaited.

3. RECIEVE: Then the RECIEVE call blocks the server.

4. SEND : Then the client executes SEND primitive to transmit its request followed
by the execution of RECIEVE to get the reply. Send the message.

5. DISCONNECT : This primitive is used for terminating the connection. After this
primitive one can't send any message. When the client sends DISCONNECT packet
then the server also sends the DISCONNECT packet to acknowledge the client.
When the server package is received by client then the process is terminated.

23
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Connection Oriented Service Primitives

There are 5 types of primitives for Connection Oriented Service :

LISTEN Block waiting for an incoming connection

CONNECTION Establish a connection with a waiting peer

RECEIVE Block waiting for an incoming message

SEND Sending a message to the peer

DISCONNECT Terminate a connection

Connectionless Oriented Service Primitives

There are 4 types of primitives for Connectionless Oriented Service:

UNIDATA This primitive sends a packet of data

FACILITY, Primitive for enquiring about the performance of the network, like
REPORT delivery statistics.

Relationship of Services to Protocol


Services

These are the operations that a layer can provide to the layer above it. It defines the
operation and states a layer is ready to perform but it does not specify anything about the
implementation of these operations.

24
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Protocols

These are set of rules that govern the format and meaning of frames, messages or packets
that are exchanged between the server and client.

Reference Models in Communication Networks

The most important reference models are :

1. OSI reference model.

2. TCP/IP reference model.

Introduction to ISO-OSI Model:

There are many users who use computer network and are located all over the world. To
ensure national and worldwide data communication ISO (ISO stands for International
Organization of Standardization.) developed this model. This is called a model for open
system interconnection (OSI) and is normally called as OSI [Link] model
architecture consists of seven layers. It defines seven layers or levels in a complete
communication system. OSI Reference model is explained in other chapter.

25
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Introduction to TCP/IP REFERENCE Model

TCP/IP is transmission control protocol and internet protocol. Protocols are set of rules
which govern every possible communication over the internet. These protocols describe
the movement of data between the host computers or internet and offers simple naming
and addressing schemes.

TCP/IP Reference model is explained in details other chapter.

26
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

ISO/OSI Model in Communication Networks

There are n numbers of users who use computer network and are located over the world.
So to ensure, national and worldwide data communication, systems must be developed
which are compatible to communicate with each other ISO has developed a standard. ISO
stands for International organization of Standardization. This is called a model
for Open System Interconnection (OSI) and is commonly known as OSI model.

The ISO-OSI model is a seven layer architecture. It defines seven layers or levels in a
complete communication system.

27
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

28
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Feature of OSI Model :

1. Big picture of communication over network is understandable through this OSI


model.

2. We see how hardware and software work together.

3. We can understand new technologies as they are developed.

4. Troubleshooting is easier by separate networks.

5. Can be used to compare basic functional relationships on different networks.

Principles of OSI Reference Model

The OSI reference model has 7 layers. The principles that were applied to arrive at the
seven layers can be briefly summarized as follows:

1. A layer should be created where a different abstraction is needed.

2. Each layer should perform a well-defined function.

3. The function of each layer should be chosen with an eye toward defining
internationally standardized protocols.

4. The layer boundaries should be chosen to minimize the information flow across
the interfaces.

5. The number of layers should be large enough that distinct functions need not be
thrown together in the same layer out of necessity.

Functions of Different Layers :


Layer 1: The Physical Layer :

1. It is the lowest layer of the OSI Model.

2. It activates, maintains and deactivates the physical connection.

3. It is responsible for transmission and reception of the unstructured raw data over
network.

4. Voltages and data rates needed for transmission is defined in the physical layer.

5. It converts the digital/analog bits into electrical signal or optical signals.

29
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

6. Data encoding is also done in this layer.

Layer 2: Data Link Layer :

1. Data link layer synchronizes the information which is to be transmitted over the
physical layer.

2. The main function of this layer is to make sure data transfer is error free from one
node to another, over the physical layer.

3. Transmitting and receiving data frames sequentially is managed by this layer.

4. This layer sends and expects acknowledgements for frames received and sent
respectively. Resending of non-acknowledgement received frames is also handled by
this layer.

5. This layer establishes a logical layer between two nodes and also manages the
Frame traffic control over the network. It signals the transmitting node to stop, when
the frame buffers are full.

Layer 3: The Network Layer :

1. It routes the signal through different channels from one node to other.

2. It acts as a network controller. It manages the Subnet traffic.

3. It decides by which route data should take.

4. It divides the outgoing messages into packets and assembles the incoming packets
into messages for higher levels.

Layer 4: Transport Layer :

1. It decides if data transmission should be on parallel path or single path.

2. Functions such as Multiplexing, Segmenting or Splitting on the data are done by


this layer

3. It receives messages from the Session layer above it, convert the message into
smaller units and passes it on to the Network layer.

4. Transport layer can be very complex, depending upon the network requirements.

Transport layer breaks the message (data) into small units so that they are handled more
efficiently by the network layer.

30
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Layer 5: The Session Layer :

1. Session layer manages and synchronize the conversation between two different
applications.

2. Transfer of data from source to destination session layer streams of data are
marked and are resynchronized properly, so that the ends of the messages are not cut
prematurely and data loss is avoided.

Layer 6: The Presentation Layer :

1. Presentation layer takes care that the data is sent in such a way that the receiver
will understand the information (data) and will be able to use the data.

2. While receiving the data, presentation layer transforms the data to be ready for the
application layer.

3. Languages(syntax) can be different of the two communicating systems. Under


this condition presentation layer plays a role of translator.

4. It performs Data compression, Data encryption, Data conversion etc.

Layer 7: Application Layer :

1. It is the topmost layer.

2. Transferring of files disturbing the results to the user is also done in this layer.
Mail services, directory services, network resource etc are services provided by
application layer.

3. This layer mainly holds application programs to act upon the received and to be
sent data.

Merits of OSI reference model:

1. OSI model distinguishes well between the services, interfaces and protocols.

2. Protocols of OSI model are very well hidden.

3. Protocols can be replaced by new protocols as technology changes.

4. Supports connection oriented services as well as connectionless service.

31
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Demerits of OSI reference model:

1. Model was devised before the invention of protocols.

2. Fitting of protocols is tedious task.

3. It is just used as a reference model.

The TCP/IP Reference Model

TCP/IP means Transmission Control Protocol and Internet Protocol. It is the network
model used in the current Internet architecture as well. Protocols are set of rules which
govern every possible communication over a network. These protocols describe the
movement of data between the source and destination or the internet. These protocols
offer simple naming and addressing schemes.

Protocols and networks in the TCP/IP model initially:

32
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Overview of TCP/IP reference model

TCP/IP that is Transmission Control Protocol and Internet Protocol was developed by
Department of Defence's Project Research Agency (ARPA, later DARPA) as a part of a
research project of network interconnection to connect remote machines.

The features that stood out during the research, which led to making the TCP/IP reference
model were:

 Support for a flexible architecture. Adding more machines to a network was easy.

 The network was robust, and connections remained intact untill the source and
destination machines were functioning.

The overall idea was to allow one application on one computer to talk to(send data
packets) another application running on different computer.

Description of different TCP/IP protocols


Layer 1: Host-to-network Layer

1. Lowest layer of the all.

2. Protocol is used to connect to the host, so that the packets can be sent over it.

3. Varies from host to host and network to network.

33
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Layer 2: Internet layer

1. Selection of a packet switching network which is based on a connectionless


internetwork layer is called a internet layer.

2. It is the layer which holds the whole architecture together.

3. It helps the packet to travel independently to the destination.

4. Order in which packets are received is different from the way they are sent.

5. IP (Internet Protocol) is used in this layer.

6. The various functions performed by the Internet Layer are:

o Delivering IP packets

o Performing routing

o Avoiding congestion

Layer 3: Transport Layer

1. It decides if data transmission should be on parallel path or single path.

2. Functions such as multiplexing, segmenting or splitting on the data is done by


transport layer.

3. The applications can read and write to the transport layer.

4. Transport layer adds header information to the data.

5. Transport layer breaks the message (data) into small units so that they are handled
more efficiently by the network layer.

6. Transport layer also arrange the packets to be sent, in sequence.

Layer 4: Application Layer

The TCP/IP specifications described a lot of applications that were at the top of the
protocol stack. Some of them were TELNET, FTP, SMTP, DNS etc.

34
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

1. TELNET is a two-way communication protocol which allows connecting to a


remote machine and run applications on it.

2. FTP(File Transfer Protocol) is a protocol, that allows File transfer amongst


computer users connected over a network. It is reliable, simple and efficient.

3. SMTP(Simple Mail Transport Protocol) is a protocol, which is used to transport


electronic mail between a source and destination, directed via a route.

4. DNS(Domain Name Server) resolves an IP address into a textual address for


Hosts connected over a network.

5. It allows peer entities to carry conversation.

6. It defines two end-to-end protocols: TCP and UDP

o TCP(Transmission Control Protocol): It is a reliable connection-


oriented protocol which handles byte-stream from source to destination without
error and flow control.

o UDP(User-Datagram Protocol): It is an unreliable connection-less


protocol that do not want TCPs, sequencing and flow control. Eg: One-shot
request-reply kind of service.

Merits of TCP/IP model

1. It operated independently.

2. It is scalable.

3. Client/server architecture.

4. Supports a number of routing protocols.

5. Can be used to establish a connection between two computers.

Demerits of TCP/IP

1. In this, the transport layer does not guarantee delivery of packets.

2. The model cannot be used in any other application.

3. Replacing protocol is not easy.

35
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

4. It has not clearly separated its services, interfaces and protocols.

Similarities between OSI Reference and TCP/IP Reference Model

Following are some similarities between OSI Reference Model and TCP/IP Reference
Model.

 Both are layered architecture.

 Layers provide similar functionalities.

 Both are protocol stack.

 Both are reference models.

Comparison of OSI Reference Model and TCP/IP Reference Model

Following are some major differences between OSI Reference Model and TCP/IP
Reference Model, with diagrammatic comparison below.

OSI(Open System Interconnection) TCP/IP(Transmission Control Protocol /


Internet Protocol)

1. OSI is a generic, protocol 1. TCP/IP model is based on standard protocols


independent standard, acting as a around which the Internet has developed. It is a
communication gateway between the communication protocol, which allows connection
network and end user. of hosts over a network.

2. In OSI model the transport layer 2. In TCP/IP model the transport layer does not
guarantees the delivery of packets. guarantees delivery of packets. Still the TCP/IP
model is more reliable.

3. Follows vertical approach. 3. Follows horizontal approach.

4. OSI model has a separate 4. TCP/IP does not have a separate Presentation
Presentation layer and Session layer. layer or Session layer.

36
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

5. Transport Layer is Connection 5. Transport Layer is both Connection Oriented


Oriented. and Connection less.

6. Network Layer is both Connection 6. Network Layer is Connection less.


Oriented and Connection less.

7. OSI is a reference model around 7. TCP/IP model is, in a way implementation of


which the networks are built. Generally the OSI model.
it is used as a guidance tool.

8. Network layer of OSI model 8. The Network layer in TCP/IP model provides
provides both connection oriented and connectionless service.
connectionless service.

9. OSI model has a problem of fitting 9. TCP/IP model does not fit any protocol
the protocols into the model.

10. Protocols are hidden in OSI model 10. In TCP/IP replacing protocol is not easy.
and are easily replaced as the
technology changes.

11. OSI model defines services, 11. In TCP/IP, services, interfaces and protocols
interfaces and protocols very clearly are not clearly separated. It is also protocol
and makes clear distinction between dependent.
them. It is protocol independent.

12. It has 7 layers 12. It has 4 layers

37
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Diagrammatic Comparison between OSI Reference Model and TCP/IP Reference


Model

A Critique of the TCP/IP Reference Model

The TCP/IP model and protocols have their problems too. First, the model does not
clearly distinguish the
concepts of service, interface, and protocol. Good software engineering practice requires
differentiating between

the specification and the implementation, something that OSI does very carefully,
and TCP/IP does not.
Consequently, the TCP/IP model is not much of a guide for designing new networks
using new technologies.

Second, the TCP/IP model is not at all general and is poorly suited to describing any

38
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

protocol stack other than TCP/IP. Trying to use the TCP/IP model to describe Bluetooth,
for example, is completely impossible.

Third, the host-to-network layer is not really a layer at all in the normal sense of the term
as used in the context of layered protocols. It is an interface (between the network and
data link layers). The distinction between an interface and a layer is crucial, and one
should not be sloppy about it.

Fourth, the TCP/IP model does not distinguish (or even mention) the physical and data
link layers. These are completely different. The physical layer has to do with the
transmission characteristics of copper wire, fiber optics, and wireless communication.
The data link layer's job is to delimit the start and end of frames and get them from one
side to the other with the desired degree of reliability. A proper model should include both
as separate layers. The TCP/IP model does not do this.

Finally, although the IP and TCP protocols were carefully thought out and well
implemented, many of the other
protocols were ad hoc, generally produced by a couple of graduate students hacking away
until they got tired.
The protocol implementations were then distributed free, which resulted in their
becoming widely used, deeply
entrenched, and thus hard to replace. Some of them are a bit of an embarrassment now.
The virtual terminal
protocol, TELNET, for example, was designed for a ten-character per second mechanical
Teletype terminal. It
knows nothing of graphical user interfaces and mice. Nevertheless, 25 years later, it is
still in widespread use.

In summary, despite its problems, the OSI model (minus the session and presentation
layers) has proven to be exceptionally useful for discussing computer networks. In
contrast, the OSI protocols have not become popular. The reverse is true of TCP/IP: the
model is practically nonexistent, but the protocols are widely used. Since computer
scientists like to have their cake and eat it, too, in this book we will use a modified OSI
model but concentrate primarily on the TCP/IP and related protocols, as well as newer
ones such as 802, SONET, and Bluetooth.

Critique of the OSI model


 Too heavy - too many layers with overlapping functionality

 Too connection oriented

 Overly heavy and slow standardization process

 The standards produced tend to be rather theoretical and rarely


provide solution to real-life problems

39
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 The standardization of OSI protocols (such as X.400 and FTAM)


and OSI profiles (such as GOSIP) has been a complete flop

 The main function of the OSI model today is to server as a


generic framework and terminology, not as a protocol family

 The TCP/IP protocol suite has fulfilled all the promises made by
OSI when it was conceived

Related Questions:-
Q1. Compare TCP/IP and OSI Reference models.

[Link] the different network topologies?


[Link] the different advantages of computer networks
[Link] is OSI Model? Discuss its various layers briefly. What are its
disadvantages? Also explain the correspondence between TCP/IP and
ISOOSI network architecture.
[Link] explain the following: i) LAN ii) WAN iii) MAN iv) Protocol
hierarchies.

Chapter 2: Physical Layer

Topics Covered:
1. Theoretical Coverage of Basis of Data Communication
2. Transmission Media
3. Types of Transmission

Theoretical Coverage of Basis of Data Communication

Introduction to Analogue and Digital Signal

40
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Data can be analog or digital. The term analog data refers to information that is
continuous, Digital data refers to information that has discrete states. For example, an
analog clock that has hour, minute, and second hands gives information in a continuous
form, the movements of the hands are continuous. On the other hand, a digital clock that
reports the hours and the minutes will change suddenly from 8:05 to 8:06.

Analog and Digital Signals:

An analog signal has infinitely many levels of intensity over a period of time. As the
wave moves from value A to value B, it passes through and includes an infinite number
of values along its path. A digital signal, on the other hand, can have only a limited
number of defined values. Although each value can be any number, it is often as simple
as 1 and 0.

The following program illustrates an analog signal and a digital signal. The curve
representing the analog signal passes through an infinite number of points. The vertical
lines of the digital signal, however, demonstrate the sudden jump that the signal makes
from value to value.

Periodic and Non-periodic Signals:

Analog and digital signals can take one of two forms: periodic or non-periodic

Periodic Signal: A periodic signal completes a pattern within a measurable time frame,
called a period, and repeats that pattern over subsequent identical periods. The
completion of one full pattern is called a cycle.

41
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Non-periodic signal: A non-periodic signal changes without exhibiting a pattern or cycle


that repeats over time.

Periodic Analog Signal:

Periodic analog signals can be classified as simple or composite. A simple periodic


analog signal, a sine wave, cannot be decomposed into simpler signals. A composite
periodic analog signal is composed of multiple sine waves.

The sine wave is the most fundamental form of a periodic analog signal. When we
visualize it as a simple oscillating curve, its change over the course of a cycle is smooth
and consistent, a continuous, rolling flow. The following figure shows a sine wave. Each
cycle consists of a single arc above the time axis followed by a single arc below it.

A sine wave can be represented by three parameters: the peak amplitude, the frequency,
and the phase.

Amplitude, Period, Frequency and phase

42
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Peak Amplitude:

The peak amplitude of a signal is the absolute value of its highest intensity, proportional
to the energy it carries. For electric signals, peak amplitude is normally measured in
volts. The following Figure shows two signals and their peak amplitudes.

Period and Frequency:

Period refers to the amount of time, in seconds, a signal needs to complete 1 cycle.
Frequency refers to the number of periods in I s. Note that period and frequency are just
one characteristic defined in two ways. Period is the inverse of frequency, and frequency
is the inverse of period, as the following formulas show.

f= 1/T and t= 1/F

Phase:

43
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The term phase describes the position of the waveform relative to time O. If we think of
the wave as something that can be shifted backward or forward along the time axis, phase
describes the amount of that shift. It indicates the status of the first cycle.

Wavelength:

Wavelength is another characteristic of a signal traveling through a transmission medium.


Wavelength binds the period or the frequency of a simple sine wave to the propagation
speed of the medium. While the frequency of a signal is independent of the medium, the
wavelength depends on both the frequency and the medium. Wavelength is a property of
any type of signal. In data communications, we often use wavelength to describe the
transmission of light in an optical fiber. The wavelength is the distance a simple signal
can travel in one period.

Time and Frequency Domain:

Time Domain:

A sine wave is comprehensively defined by its amplitude, frequency, and phase. We have
been showing a sine wave by using what is called a time-domain plot. The time-domain
plot shows changes in signal amplitude with respect to time.

44
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Frequency Domain:

To show the relationship between amplitude and frequency, we use a frequency-domain


plot. A frequency-domain plot is concerned with only the peak value and the frequency.

It is obvious that the frequency domain is easy to plot and conveys the information that
one can find in a time domain plot. The advantage of the frequency domain is that we can
immediately see the values of the frequency and peak amplitude. A complete sine wave is
represented by one spike. The position of the spike shows the frequency; its height shows
the peak amplitude.

Fourier Analysis & Concept of Bandwidth of a Signal

In general, electromagnetic signals can be represented either as a function of time (t) or


as a function of frequency (f), as shown in the diagram below.

45
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

But the frequency perspective of a signal plays a much more significant role in
communication than the time perspective. This is because the whole electromagnetic
spectrum is split into different frequency ranges and each of these frequency ranges are
used for different applications like broadcast (radio, TV), data communication etc.

Within data communication itself, different media use different frequency spectrum. For
e.g. in wired media, while copper and coaxial cables use the spectrum upto 100 MHz
(10ˆ8Hz), fiber optical communication uses electromagnetic signals of a much higher
frequency range (10ˆ15Hz). Similarly in wireless communication, while 802.11b and
802.11g use 2.4Ghz, 802.11a uses 5Ghz.

The beauty lies in the fact that all these signals spanning different frequency
spectrum, can coexist simultaneously in the time domain, thereby enabling us to
simultaneously use different forms of communication and entertainment. That
means that at any instant of time, you would find electromagnetic signals of a wide
range of frequencies around us.

Thus it is extremelly important to understand the frequency spectrum of an


electromagnetic signal. It is here that Fourier series comes in handy, as it helps us to
decompose a signal into its frequency components, thereby enabling us to estimate the
bandwidth occupied by any electromagnetic signal.

Decomposition of Electromagnetic signals in the frequency domain

Any electromagnetic signal, whether it is analog or digital, is generally composed of a


range of different frequencies, with each frequency component having a specific
weightage in the overall value of the signal, at any instant of time. Given the time domain
representation of a signal, Fourier Analysis helps us in finding the different frequency
components of the signal, along with their respective weightages. Fouries analysis also
helps in the reverse process, namely, if the frequency components of an electromagnetic
signal are known, along with their weights, then it enables us to get the time domain
representation of the signal.

Fourier Analysis for an A-periodic signal

Fourier analysis states that any electromagnetic signal can be represented as a


weighted sum of sinusoids and cosines of various frequencies. In simple terms, this
means that any signal (whether periodic or not periodic) can be constructed by adding a
series of sines and cosines of different frequencies.

46
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Assuming x(t) to be the time domain representation function of a signal and X(f) to be the
frequency domain representation function of the same signal, Fourier gave the following
formulae of deriving one from the other.

Fourier transformations between time and frequency domains for an A-periodic signal
The above formulaes help us to find out the frequency components of a signal as a
function of frequency (X(f)), given its time domain function x(t) and vice versa.
For computer communication, wherever analog signalling is used (e.g. ASK, PSK etc.),
the above formulae can be used to find out the frequency components (and hence the
bandwidth) of the analog signal that is to be transmitted.
Fourier Analysis for a Periodic signal
Fourier analysis states that if a signal is periodic, then it can be represented as a
weighted sum of sinusoids & cosines consisting of a fundamental frequency
(f) and its harmonics (2f, 3f, 4f etc.) alone. The main difference between the
A-periodic and periodic case is that the A-periodic signal typically has
frequency components of varying values (not necessarily harmonics of a
fundamental frequency), whereas a periodic signal only has frequency
components that are multiples of a single fundamental frequency .
The Fourier transformation for periodic signals states that any periodic function, g(t),
with period T can be constructed by summing a (possibly infinite) number of
sines and cosines, of a fundamental frequency (f = 1/T) and its harmonics. The
actual formulae is given below:

Fourier transformation for finding out the frequency components of a periodic signal
The above formulae can be used in digital transmission to find out the frequency
components of digital signals.
For example, consider the periodic square wave, with period “T” and amplitude “A”,
given in the figure below:

47
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

A periodic square wave with period “T” and amplitude “A”, representing the digital
pattern 10101010….
Assume that it represents the digital pattern 10101010…… . If we apply the
Fourier series for this signal, then we get the following infinite series

The digital square wave is actually a summation of sinusoids of this fundamental


frequency and its odd harmonics (f, 3f, 5f, 7f etc.)
Since the summation runs infinitely, the square wave consists of infinite number of
frequency components and hence its bandwidth is infinity.
But if you consider the amplitude of the kth frequency component (kf), then the peak
value of its amplitude (or weightage in the overall sum) is proportional to the reciprocal
of k (1/k). Thus as k increases, the peak amplitude decreases exponentially. This means
that the weightage of higher harmonics is quite negligible, when compared to the
first few components.
Infact, if you sum up the first few sinusoidal components (say upto 5 to 10) and plot the
resultant wave, it would fairly resemble the periodic square wave.
So for practical purposes, the bandwidth of the signal can be approximated by those
initial frequency components, that have major weightage.
In practise too, for digital transmission, considering the frequency constraints imposed by
the standards for different types of transmission, the transmitter only transmits a
bandwidth limited signal (not infinite bandwidth), that consists of only those initial
harmonics which contribute the major weightage to the overall composition of the signal.
The number of harmonics included in the transmission should be such that the receiver is
able to reconstruct back the original signal in the presence of channel noise.
For example, if the digital signal to be transmitted is approximated by the fundamental
frequency f and the first 2 harmonics, namely, 3f and 5f, then the bandwidth
occupied by the signal is (5f -f) = 4f.
Similarly, if the digital signal is approximated by the fundamental frequency f and
only one additional harmonic, namely 3f, then the bandwidth occupied by the signal
is (3f – f) = 2f.
From the above examples, it must be clear that digital signals require higher bandwidth in
general, than analog signals, because we need not only the fundamental frequency but
also a few higher harmonics to reconstruct the signal properly at the receiver. Also, in
general, higher frequency components suffer attenuation and lose signal strength over
longer distances. For these reasons, digital transmission is generally preferred for shorter
distances.

48
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Thus we see that Fourier series helps us in estimating the bandwidth occupied by both
analog and digital signals.

Maximum Data rate of a channel

 Signal Bandwidth – the bandwidth of the transmitted signal or the range


of frequencies present in the signal, as constrained by the transmitter.

 Channel Bandwidth – the range of signal bandwidths allowed by a


communication channel without significant loss of energy (attenuation).

 Channel Capacity or Maximum Data rate – the maximum rate (in bps)
at which data can be transmitted over a given communication link, or
channel.

In general, information is conveyed by change in values of the signal in time.


Since frequency of a signal is a direct measure of the rate of change in values
of the signal, the more the frequency of a signal, more is the achievable data
rate or information transfer rate. This can be illustrated by taking the
example of both an analog and a digital signal.
If we take analog transmission line coding techniques like Binary ASK, Binary FSK or
Binary PSK, information is transferred by altering the property of a high frequency
carrier wave. If we increase the frequency of this carrier wave to a higher value, then this
reduces the bit interval T (= 1/f) duration, thereby enabling us to transfer more bits per
second.

Similarly, if we take digital transmission techniques like NRZ, Manchester encoding etc.,
these signals can be modelled as periodic signals and hence is composed of an infinite
number of sinusoids, consisting of a fundamental frequency (f) and its harmonics. Here
too, the bit interval (T) is equal to the reciprocal of the fundamental frequency (T = 1/f).
Hence, if the fundamental frequency is increased, then this would represent a digital
signal with shorter bit interval and hence this would increase the data rate.

So, whether it is analog or digital transmission, an increase in the bandwidth of the signal,
implies a corresponding increase in the data rate. For e.g. if we double the signal
bandwidth, then the data rate would also double.

In practise however, we cannot keep increasing the signal bandwidth infinitely. The
telecommunication link or the communication channel acts as a police and has limitations
on the maximum bandwidth that it would allow. Apart from this, there are standard
transmission constraints in the form of different channel noise sources that strictly limit
the signal bandwidth to be used. So the achievable data rate is influenced more by the
channel’s bandwidth and noise characteristics than the signal bandwidth.

49
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Nyquist and Shannon have given methods for calculating the channel capacity (C) of
bandwidth limited communication channels.

Nyquist Criteria for maximum data rate for noiseless channels


Given a noiseless channel with bandwidth B Hz., Nyquist stated that it can be used
to carry atmost 2B signal changes (symbols) per second. The converse is also true,
namely for achieving a signal transmission rate of 2B symbols per second over a channel,
it is enough if the channel allows signals with frequencies upto B Hz.

Another implication of the above result is the sampling theorem, which states that for a
signal whose maximum bandwidth is f Hz., it is enough to sample the signals at 2f
samples per second for the purpose of quantization (A/D conversion) and also for
reconstruction of the signal at the receiver (D/A conversion). This is because, even if the
signals are sampled at a higher rate than 2f ( and thereby including the higher harmonic
components), the channel would anyway filter out those higher frequency components.

Also, symbols could have more than two different values, as is the case in line
coding schemes like QAM, QPSK etc. In such cases, each symbol value could
represent more than 1 digital bit.

Nyquist’s formulae for multi-level signaling for a noiseless channel is

C = 2 * B * log M,

where C is the channel capacity in bits per second, B is the maximum bandwidth allowed
by the channel, M is the number of different signaling values or symbols and log is to the
base 2.

For example, assume a noiseless 3-kHz channel.

1. If binary signals are used, then M= 2 and hence maximum channel


capacity or achievable data rate is C = 2 * 3000 * log 2 = 6000 bps.

2. Similarly, if QPSK is used instead of binary signaling, then M = 4. In


that case, the maximum channel capacity is C = 2 * 3000 * log 4 = 2 *
3000 * 2 = 12000bps.

Thus, theoretically, by increasing the number of signaling values or symbols,


we could keep on increasing the channel capacity C indefinitely. But however,
in practice, no channel is noiseless and so we cannot simply keep increasing the
number of symbols indefinitely, as the receiver would not be able to distinguish
between different symbols in the presence of channel noise.
It is here that Shannon’s theorem comes in handy, as he specifies a maximum theoretical
limit for the channel capacity C of a noisy channel.

50
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Shannon’s channel capacity criteria for noisy channels


Given a communication channel with bandwidth of B Hz. and a signal-to-noise
ratio of S/N, where S is the signal power and N is the noise power, Shannon’s
formulae for the maximum channel capacity C of such a channel is
C = B log (1 + S/N)

(log is to base 2)

For example, for a channel with bandwidth of 3 KHz and with a S/N value of
1000, like that of a typical telephone line, the maximum channel capacity is

C = 3000 * log (1 + 1000) = 30000 bps (approx.)


Using the previous examples of Nyquist criteria, we saw that for a channel with
bandwidth 3 KHz, we could double the data rate from 6000 bps to 12000 bps.,
by using QPSK instead of binary signaling as the line encoding technique.
Using Shannon’s criteria for the same channel, we can conclude that
irrespective of the line encoding technique used, we cannot increase the channel
capacity of this channel beyond 30000bps.

In practice however, due to receiver constraints and due to external noise


sources, Shannon’s theoretical limit is never achieved in practice.

Thus to summarize the relationship between bandwidth, data rate and channel
capacity,

 In general, greater the signal bandwidth, the higher the information-


carrying capacity

 But transmission system & receiver’s capability limit the bandwidth that
can be transmitted

Hence data rate depends on

 Available bandwidth for transmission

 Channel capacity and Signal-to-Noise Ratio

 Receiver Capability

More the frequency allotted, more the channel bandwidth, more the processing capability
of the receiver, greater the information transfer rate that can be achieved.

51
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Transmission Media

Transmission medium is the means through which we send our data from one place to
another.
Factors to be considered while selecting a Transmission Medium

1. Transmission Rate

2. Cost and Ease of Installation

3. Resistance to Environmental Conditions

4. Distances

Bounded/Guided Transmission Media

Guided media, which are those that provide a conduit from one device to another,
include Twisted-Pair Cable, Coaxial Cable, and Fiber-Optic Cable.

A signal travelling along any of these media is directed and contained by the physical
limits of the medium. Twisted-pair and coaxial cable use metallic (copper) conductors
that accept and transport signals in the form of electric current. Optical fiber is a cable
that accepts and transports signals in the form of light.

Twisted Pair Cable

This cable is the most commonly used and is cheaper than others. It is lightweight, cheap,
can be installed easily, and they support many different types of network.

A twisted pair consists of two conductors(normally copper), each with its own plastic
insulation, twisted together. One of these wires is used to carry signals to the receiver,
and the other is used only as ground reference. The receiver uses the difference between
the two. In addition to the signal sent by the sender on one of the wires,
interference(noise) and crosstalk may affect both wires and create unwanted signals. If
the two wires are parallel, the effect of these unwanted signals is not the same in both
wires because they are at different locations relative to the noise or crosstalk sources.
This results in a difference at the receiver.
Twisted Pair is of two types:

 Unshielded Twisted Pair (UTP)

 Shielded Twisted Pair (STP)

52
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Unshielded Twisted Pair Cable

It is the most common type of telecommunication when compared with Shielded Twisted
Pair Cable which consists of two conductors usually copper, each with its own colour
plastic insulator. Identification is the reason behind coloured plastic insulation.

UTP cables consist of 2 or 4 pairs of twisted cable.

Advantages

 Installation is easy

 Flexible

 Cheap

 It has high speed capacity,

 100 meter limit

 Higher grades of UTP are used in LAN technologies like Ethernet.

It consists of two insulating copper wires (1mm thick). The wires are twisted together in a
helical form to reduce electrical interference from similar pair.

Disadvantages

 Bandwidth is low when compared with Coaxial Cable

 Provides less protection from interference.

53
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Shielded Twisted Pair Cable

This cable has a metal foil or braided-mesh covering which encases each pair of insulated
conductors. Electromagnetic noise penetration is prevented by metal casing. Shielding
also eliminates crosstalk

It has same attenuation as unshielded twisted pair. It is faster the unshielded and coaxial
cable. It is more expensive than coaxial and unshielded twisted pair.

Advantages

 Easy to install

 Performance is adequate

 Can be used for Analog or Digital transmission

 Increases the signaling rate

 Higher capacity than unshielded twisted pair

 Eliminates crosstalk

Disadvantages

 Difficult to manufacture

 Heavy

Applications

 In telephone lines to provide voice and data channels.


 In Local Area Network

Coaxial Cable

Coaxial is called by this name because it contains two conductors that are parallel to each
other. Copper is used in this as centre conductor which can be a solid wire or a standard

54
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

one. It is surrounded by PVC insulation, a sheath which is encased in an outer conductor


of metal foil, braid or both.

Outer metallic wrapping is used as a shield against noise and as the second conductor
which completes the circuit. The outer conductor is also encased in an insulating sheath.
The outermost part is the plastic cover which protects the whole cable.

There are two types of Coaxial cables :

BaseBand

It used for digital transmission. It is mostly used for LAN's. Baseband transmits a single
signal at a time with very high speed. The major drawback is that it needs amplification
after every 1000 feet.

BroadBand

This uses analog transmission on standard cable television cabling. It transmits several
simultaneous signal using different frequencies. It covers large area when compared with
Baseband Coaxial Cable.

Advantages

 Bandwidth is high

 Used in long distance telephone lines.

 Transmits digital signals at a very high rate of 10Mbps.

 Much higher noise immunity

 Data transmission without distortion.

55
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 The can span to longer distance at higher speeds as they have better shielding
when compared to twisted pair cable

Disadvantages

 Single cable failure can fail the entire network.

 Difficult to install and expensive when compared with twisted pair.

 If the shield is imperfect, it can lead to grounded loop.

Applications

 Coaxial cable was widely used in analog telephone networks, where a single
coaxial network could carry 10,000 voice signals.

 Cable TV networks also use coaxial cables. In the traditional cable TV network,
the entire network used coaxial cable.

Fiber Optic Cable

A fiber-optic cable is made of glass or plastic and transmits signals in the form of light.

For better understanding we first need to explore several aspects of the nature of light.

If ray of light travelling through one substance suddenly enters another substance (of a
different density), the ray changes direction.

The below figure shows how a ray of light changes direction when going from a more
dense to a less dense substance.

Bending of a light ray


As the figure shows:

56
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 If the angle of incidence I(the angle the ray makes with the line perpendicular to
the interface between the two substances) is less than the critical angle, the
ray refracts and moves closer to the surface.

 If the angle of incidence is greater than the critical angle, the ray reflects(makes
a turn) and travels again in the denser substance.

 If the angle of incidence is equal to the critical angle, the ray refracts and moves
parallel to the surface as shown.

Note: The critical angle is a property of the substance, and its value differs from one
substance to another.

Optical fibers use reflection to guide light through a channel. A glass or plastic core is
surrounded by a cladding of less dense glass or plastic. The difference in density of the
two materials must be such that a beam of light moving through the core is reflected off
the cladding instead of being refracted into it.

Internal view of an Optical fiber

Propagation Modes

Current technology supports two modes(Multimode and Single mode) for propagating
light along optical channels, each requiring fiber with different physical characteristics.
Multimode can be implemented in two forms: Step-index and Graded-index.

Propagation Modes

57
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Multimode

Multimode is so named because multiple beams from a light source move through the
core in different paths. How these beams move within the cable depends on the structure
of the core as shown in the below figure.

 In multimode step-index fiber, the density of the core remains constant from the
centre to the edges. A beam of light moves through this constant density in a straight
line until it reaches the interface of the core and the cladding.
The term step-index refers to the suddenness of this change, which contributes to the
distortion of the signal as it passes through the fiber.

 In multimode graded-index fiber, this distortion gets decreases through the


cable. The word index here refers to the index of refraction. This index of refraction
is related to the density. A graded-index fiber, therefore, is one with varying densities.
Density is highest at the centre of the core and decreases gradually to its lowest at the
edge.

Single Mode

Single mode uses step-index fiber and a highly focused source of light that limits beams
to a small range of angles, all close to the horizontal. The single-mode fiber itself is
manufactured with a much smaller diameter than that of multimode fiber, and with
substantially lower density.
The decrease in density results in a critical angle that is close enough to 90 degree to
make the propagation of beams almost horizontal.

Advantages

Fiber optic has several advantages over metallic cable:

58
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Higher bandwidth

 Less signal attenuation

 Immunity to electromagnetic interference

 Resistance to corrosive materials

 Light weight

 Greater immunity to tapping

Disadvantages

There are some disadvantages in the use of optical fibre:

 Installation and maintenance

 Unidirectional light propagation

 High Cost

Applications
Military

Optical systems offer more security than traditional metal-based systems. The magnetic
interference allows the leak of information in the coaxial cables. Fiber optics is not
sensitive to electrical interference; therefore fiber optics is suitable for military
application and communications, where signal quality and security of data transmission
are important.

The increased interest of the military in this technology caused the development of
stronger fibers, tactical cables and high quality components. It was also applied in more
varied areas such as hydrophones for seismic and SONAR, aircrafts, submarines and
other underwater applications.

Medical

Fiber optic are used as light guides, imaging tools and as lasers for surgeries. Another
popular use of fiber-optic cable is in an endoscope, which is a diagnostic instrument that
enables users to see through small holes in the body. Medical endoscopes are used for
minimally invasive exploratory or surgical procedures.

59
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

All versions of endoscopes look like a long thin tube, with a lens or camera at one end
through which light is emitted from the bundle of optical fibers banded together inside
the enclosure.

Mechanical or Industrial

Industrial endoscopes also called a borescope or fiberscope, enables the user to observe
areas that are difficult to reach or see under normal circumstances, such as jet engine
interiors, inspecting mechanical welds in pipes and engines, inspecting space shuttles and
rockets. Inspection of sewer lines and pipes.

Networking

Fiber optic is used to connect servers and users in a variety of network settings. It
increases the speed, quality and accuracy of data transmission. Computer and Internet
technology has improved due to the enhanced transmission of digital signals through
optical fibers.

Broadcast/CATV/Cable Television

Broadcast or cable companies use fiber optic cables for wiring CATV, HDTV, internet,
video and other applications.

Lighting and Imaging

Fiber optic cables are used for lighting and imaging and as sensors to measure and
monitor a vast range of variables. It is also used in research, development and testing in
the medical, technological and industrial fields.

Fiber optics are used as light guides in medical and other applications where bright light
needs to shine on a target without a clear line-of-sight path. In some buildings, optical
fibers are used to route sunlight from the roof to other parts of the building. Optical fiber
illumination is also used for decorative applications, including signs, art and artificial
Christmas trees.

UnBounded/UnGuided Transmission Media

Unguided medium transport electromagnetic waves without using a physical conductor.


This type of communication is often referred to as wireless communication. Signals are
normally broadcast through free space and thus are available to anyone who has a device
capable of receiving them.

The below figure shows the part of the electromagnetic spectrum, ranging from 3 kHz to
900 THz, used for wireless communication.

60
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Unguided signals can travel from the source to the destination in several ways: Gound
propagation, Sky propagation and Line-of-sight propagation as shown in below
figure.

Propagation Modes

 Ground Propagation: In this, radio waves travel through the lowest portion of
the atmosphere, hugging the Earth. These low-frequency signals emanate in all
directions from the transmitting antenna and follow the curvature of the planet.

 Sky Propagation: In this, higher-frequency radio waves radiate upward into the
ionosphere where they are reflected back to Earth. This type of transmission allows
for greater distances with lower output power.

 Line-of-sight Propagation: in this type, very high-frequency signals are


transmitted in straight lines directly from antenna to antenna.

We can divide wireless transmission into three broad groups:

1. Radio waves

2. Micro waves

3. Infrared waves

Radio Waves

Electromagnetic waves ranging in frequencies between 3 KHz and 1 GHz are normally
called radio waves.

61
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Radio waves are omnidirectional. When an antenna transmits radio waves, they are
propagated in all directions. This means that the sending and receiving antennas do not
have to be aligned. A sending antenna send waves that can be received by any receiving
antenna. The omnidirectional property has disadvantage, too. The radio waves
transmitted by one antenna are susceptible to interference by another antenna that may
send signal suing the same frequency or band.

Radio waves, particularly with those of low and medium frequencies, can penetrate walls.
This characteristic can be both an advantage and a disadvantage. It is an advantage
because, an AM radio can receive signals inside a building. It is a disadvantage because
we cannot isolate a communication to just inside or outside a building.

Omnidirectional Antenna

Radio waves use omnidirectional antennas that send out signals in all directions.

Applications

 The omnidirectional characteristics of radio waves make them useful for


multicasting in which there is one sender but many receivers.

 AM and FM radio, television, maritime radio, cordless phones, and paging are
examples of multicasting.

 Micro Waves

Electromagnetic waves having frequencies between 1 and 300 GHz are called micro
waves. Micro waves are unidirectional. When an antenna transmits microwaves, they can
be narrowly focused. This means that the sending and receiving antennas need to be
aligned. The unidirectional property has an obvious advantage. A pair of antennas can be
aligned without interfering with another pair of aligned antennas.

The following describes some characteristics of microwaves propagation:

 Microwave propagation is line-of-sight. Since the towers with the mounted


antennas need to be in direct sight of each other, towers that are far apart need to be
very tall.

 Very high-frequency microwaves cannot penetrate walls. This characteristic can


be a disadvantage if receivers are inside the buildings.

62
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 The microwave band is relatively wide, almost 299 GHz. Therefore, wider sub-
bands can be assigned and a high date rate is possible.

 Use of certain portions of the band requires permission from authorities.

There are 2 types of Microwave Transmission :

1. Terrestrial Microwave

2. Satellite Microwave

Terrestrial Microwave

For increasing the distance served by terrestrial microwave, repeaters can be installed
with each antenna .The signal received by an antenna can be converted into transmittable
form and relayed to next antenna as shown in below figure. It is an example of telephone
systems all over the world

Satellite Microwave

This is a microwave relay station which is placed in outer space. The satellites are
launched either by rockets or space shuttles carry them.

These are positioned 36000KM above the equator with an orbit speed that exactly
matches the rotation speed of the earth. As the satellite is positioned in a geo-synchronous
orbit, it is stationery relative to earth and always stays over the same point on the ground.
This is usually done to allow ground stations to aim antenna at a fixed point in the sky.

63
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Features of Satellite Microwave :

 Bandwidth capacity depends on the frequency used.

 Satellite microwave deployment for orbiting satellite is difficult.

Advantages of Satellite Microwave :

 Transmitting station can receive back its own transmission and check whether the
satellite has transmitted information correctly.

 A single microwave relay station which is visible from any point.

Disadvantages of Satellite Microwave :

 Satellite manufacturing cost is very high

 Cost of launching satellite is very expensive

 Transmission highly depends on whether conditions, it can go down in bad


weather

Applications

Microwaves, due to their unidirectional properties, are very useful when unicast(one-to-
one) communication is needed between the sender and the receiver. They are used in
cellular phones, satellite networks and wireless LANs.

Advantages of Microwave Transmission

 Used for long distance telephone communication

 Carries 1000's of voice channels at the same time

Disadvantages of Microwave Transmission

 It is Very costly

Access Methods (Satellite Communication)

There are three methods for communication using satellites. These three
methods use principles that are similar in concept to normal wired communication.

64
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The three primary modulation techniques are: (a)Frequency Division Multiple Access
(FDMA), (b) Time Division Multiple Access (TDMA) and (c) Code Division Multiple
Access (CDMA).

Channelization is a multiple access method in which the available bandwidth of a link is


shared in time, frequency or using code by a number of stations. Basic idea of these
approaches can be explained in simple terms using the cocktail party theory. In a cocktail
party people talk to each other using one of the following modes:
FDMA: When all the people group in widely separated areas and talk within each group.
TDMA: When all the people are in the middle of the room, but they take turn in
speaking.
CDMA: When all the people are in the middle of the room, but different pairs speak in
different languages.
Basic principle of these approaches are briefly explained below:

FDMA: The bandwidth is divided into separate frequency bands. In case of bursty
traffic, the efficiency can be improved in FDMA by using a dynamic sharing technique to
access a particular frequency band; channels are assigned on demand as shown

TDMA: The bandwidth is timeshared as shown. Channel allocation is done dynamically.

CDMA: Data from all stations are transmitted simultaneously and are separated based on
coding theory as shown . In TDMA and FDMA the transmissions from different stations
are clearly separated in either time or frequency. In case of CDMA, the transmission from
different stations occupy the entire frequency band at the same time. Multiple
simultaneous transmissions are separated by using coding theory. Each bit is assigned a
unique m-bit code or chip sequence.

65
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Infrared Waves

Infrared waves, with frequencies from 300 GHz to 400 THz, can be used for short-range
communication. Infrared waves, having high frequencies, cannot penetrate walls. This
advantageous characteristic prevents interference between one system and another, a
short-range communication system in on room cannot be affected by another system in
the next room.

When we use infrared remote control, we do not interfere with the use of the remote by
our neighbours. However, this same characteristic makes infrared signals useless for
long-range communication. In addition, we cannot use infrared waves outside a building
because the sun's rays contain infrared waves that can interfere with the communication.

Applications

 Used for communication between devices such as keyboards, mouse, PCs and
printers.

 Infrared signals can be used for short-range communication in a closed area using
line-of-sight propagation.

Cellular (Mobile) Communication

Cellular network is an underlying technology for mobile phones, personal


communication systems, wireless networking etc. The technology is developed for
mobile radio telephone to replace high power transmitter/receiver systems. Cellular
networks use lower power, shorter range and more transmitters for data transmission.

Features of Cellular Systems

Wireless Cellular Systems solves the problem of spectral congestion and increases user
capacity. The features of cellular systems are as follows −

66
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Offer very high capacity in a limited spectrum.

 Reuse of radio channel in different cells.

 Enable a fixed number of channels to serve an arbitrarily large number of users


by reusing the channel throughout the coverage region.

 Communication is always between mobile and base station (not directly between
mobiles).

 Each cellular base station is allocated a group of radio channels within a small
geographic area called a cell.

 Neighboring cells are assigned different channel groups.

 By limiting the coverage area to within the boundary of the cell, the channel
groups may be reused to cover different cells.

 Keep interference levels within tolerable limits.

 Frequency reuse or frequency planning.

 Organization of Wireless Cellular Network.

Cellular network is organized into multiple low power transmitters each 100w or less.

Shape of Cells

The coverage area of cellular networks are divided into cells, each cell having its own
antenna for transmitting the signals. Each cell has its own frequencies. Data
communication in cellular networks is served by its base station transmitter, receiver and
its control unit.

The shape of cells can be either square or hexagon −

Square

A square cell has four neighbors at distance d and four at distance Root 2 d

 Better if all adjacent antennas equidistant

 Simplifies choosing and switching to new antenna

67
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Hexagon

A hexagon cell shape is highly recommended for its easy coverage and calculations. It
offers the following advantages −

 Provides equidistant antennas

 Distance from center to vertex equals length of side

Frequency Reuse

Frequency reusing is the concept of using the same radio frequencies within a given
area, that are separated by considerable distance, with minimal interference, to establish
communication.

Frequency reuse offers the following benefits −

 Allows communications within cell on a given frequency

 Limits escaping power to adjacent cells

 Allows re-use of frequencies in nearby cells

 Uses same frequency for multiple conversations

 10 to 50 frequencies per cell

For example, when N cells are using the same number of frequencies and Kb the total
number of frequencies used in systems. Then each cell frequency is calculated by using
the formulae K/N.

In Advanced Mobile Phone Services (AMPS) when K = 395 and N = 7, then frequencies
per cell on an average will be 395/7 = 56. Here, cell frequency is 56.

A cellular system comprises the following basic components:

68
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• Mobile Stations (MS): Mobile handsets, which is used by an user to communicate with
another user

• Cell: Each cellular service area is divided into small regions called cell (5 to 20 Km)

• Base Stations (BS): Each cell contains an antenna, which is controlled by a small
office.

Mobile Switching Center (MSC): Each base station is controlled by a switching office,
called mobile switching center

Frequency Reuse Principle Cellular telephone systems rely on an intelligent allocation


and reuse of channels. Each base station is given a group of radio channels to be used
within a cell. Base stations in neighbouring cells are assigned completely different set of
channel frequencies. By limiting the coverage areas, called footprints, within cell
boundaries, the same set of channels may be used to cover different cells separated from
one another by a distance large enough to keep interference level within tolerable limits
as shown in Fig. 5.9.2. Cells with the same letter use the same set of frequencies, called
reusing cells. N cells which collectively use the available frequencies (S = k.N) is
known as cluster. If a cluster is replicated M times within a system, then total number
duplex channels (capacity) is C = M.k.N= M.S.

69
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Reuse factor: Fraction of total available channels assigned to each cell within a cluster is
1/N. Example showing reuse factor of ¼ is shown in Fig. (a) and Fig. (b) shows reuse
factor of 1/7.

As the demand increases in a particular region, the number of stations can be increased
by replacing a cell with a cluster Here cell C has been replaced with a cluster. However,
this will be possible only by decreasing the transmitting power of the base stations to
avoid interference.

Transmitting and Receiving Basic operations of transmitting and receiving in a cellular


telephone network are discussed in this section. Transmitting involves the following
steps:
• A caller enters a 10-digit code (phone number) and presses the send button.
• The MS scans the band to select a free channel and sends a strong signal to send the
number entered. • The BS relays the number to the MSC.
The MSC in turn dispatches the request to all the base stations in the cellular system.

70
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• The Mobile Identification Number (MIN) is then broadcast over all the forward control
channels throughout the cellular system. It is known as paging.
• The MS responds by identifying itself over the reverse control channel.
• The BS relays the acknowledgement sent by the mobile and informs the MSC about the
handshake.
• The MSC assigns an unused voice channel to the call and call is established. Receiving
involves the following steps:
• All the idle mobile stations continuously listens to the paging signal to detect messages
directed at them.
• When a call is placed to a mobile station, a packet is sent to the callee’s home MSC to
find out where it is.
• A packet is sent to the base station in its current cell, which then sends a broadcast on
the paging channel.
• The callee MS responds on the control channel.
• In response, a voice channel is assigned and ringing starts at the MS.
Mobility Management
A MS is assigned a home network, commonly known as location area. When an MS
migrates out of its current BS into the footprint of another, a procedure is performed to
maintain service continuity, known as Handoff management. An agent in the home
network, called home agent, keeps track of the current location of the MS. The procedure
to keep track of the user’s current location is referred to as Location management.
Handoff management and location management together are referred to as Mobility
management.
Handoff:
At any instant, each mobile station is logically in a cell and under the control of the cell’s
base station. When a mobile station moves out of a cell, the base station notices the MS’s
signal fading away and requests all the neighbouring BSs to report the strength they are
receiving. The BS then transfers ownership to the cell getting the strongest signal and the
MSC changes the channel carrying the call. The process is called handoff.
There are two types of handoff; Hard Handoff and Soft Handoff.
In a hard handoff, which was used in the early systems, a MS communicates with one
BS. As a MS moves from cell A to cell B, the communication between the MS and base
station of cell A is first broken before communication is started between the MS and the
base station of B. As a consequence, the transition is not smooth. For smooth transition
from one cell (say A) to another (say B), an MS continues to talk to both A and B. As the
MS moves from cell A to cell B, at some point the communication is broken with the old
base station of cell A. This is known as soft handoff
Roaming:

71
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Two fundamental operations are associated with Location Management; location update
and paging. When a Mobile Station (MS) enters a new Location Area, it performs a
location updating procedure by making an association between the foreign agent and the
home agent. One of the BSs, in the newly visited Location Area is informed and the home
directory of the MS is updated with its current location. When the home agent receives a
message destined for the MS, it forwards the message to the MS via the foreign agent. An
authentication process is performed before forwarding the message

Types of Transmissions
Digital data can be transmitted in a number of ways from the source to
the destination. These modes of data transmission can be outlined as follows:
• Parallel and serial communication
• Asynchronous, synchronous and isochronous communication
• Simplex, half-duplex and full-duplex communication
Serial and Parallel Communication

Data can be transmitted between a sender and a receiver in two main ways: serial and
parallel.

Serial communication is the method of transferring one bit at a time through a medium.

0 1 0 0 0 0 1 0

Serial communication is the process of sending data one bit at a time, sequentially, over
a communication channel or computer bus. This is in contrast to parallel communication,
where several bits are sent as a whole, on a link with several parallel channels.

Serial communication is used for all long-haul communication and most computer
networks, where the cost of cable and synchronization difficulties make parallel
communication impractical. Serial computer buses are becoming more common even at
shorter distances, as improved signal integrity and transmission speeds

0
Parallel communication is the method of transferring blocks, eg: BYTEs, of
1 data at the same time.

1 72

0
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Parallel communication is a method of conveying multiple binary digits (bits)


simultaneously. It contrasts with serial communication, which conveys only a single bit at
a time; this distinction is one way of characterizing a communications link.

The basic difference between a parallel and a serial communication channel is the number
of electrical conductors used at the physical layer to convey bits. Parallel communication
implies more than one such conductor. For example, an 8-bit parallel channel will convey
eight bits (or a byte) simultaneously, whereas a serial channel would convey those same
bits sequentially, one at a time. If both channels operated at the same clock speed, the
parallel channel would be eight times faster. A parallel channel may have additional
conductors for other signals, such as a clock signal to pace the flow of data, a signal to
control the direction of data flow, and handshaking signals.

Parallel communication is and always has been widely used within integrated circuits,
in peripheral buses, and in memory devices such as RAM. Computer system buses, on
the other hand, have evolved over time: parallel communication was commonly used in
earlier system buses, whereas serial communications are prevalent in modern computers.

73
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Asynchronous, synchronous and isochronous communication

a). Asynchronous Transmission:

In Asynchronous transmission, the timing of a signal is unimportant. Instead, information


is received and translated by agreed upon patterns. As long as those patterns are followed,
the receiving device can retrieve the information without regard to the rhythm in which it
is sent. Patterns are based on grouping the bit stream into bytes. Each group, usually 8
bits, is sent along the link as a unit. The sending system handles each group
independently, relaying it to the link whenever ready, without regard to a timer.

Without synchronization, the receiver cannot use timing to predict when the next group
will arrive. To alert the receiver to the arrival of a new group, therefore, an extra bit is
added to the beginning of each byte. This bit, usually a 0, is called the start bit. To let the
receiver know that the byte is finished, 1 or more additional bits are appended to the end
of the byte. These bits, usually 1 s, are called stop bits.

By this method, each byte is increased in size to at least 10 bits, of which 8 bits is
information and 2 bits or more are signals to the receiver. In addition, the transmission of
each byte may then be followed by a gap of varying duration. This gap can be represented

74
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

either by an idle channel or by a stream of additional stop bits. The start and stop bits and
the gap alert the receiver to the beginning and end of each byte and allow it to
synchronize with the data stream.

This mechanism is called asynchronous because, at the byte level, the sender and receiver
do not have to be synchronized. But within each byte, the receiver must still be
synchronized with the incoming bit stream. That is, some synchronization is required, but
only for the duration of a single byte. The receiving device resynchronizes at the onset of
each new byte.

When the receiver detects a start bit, it sets a timer and begins counting bits as they come
in. After n bits, the receiver looks for a stop bit. As soon as it detects the stop bit, it waits
until it detects the next start bit.
The following figure is a schematic illustration of asynchronous transmission. In this
example, the start bits are as, the stop bits are 1s, and the gap is represented by an idle
line rather than by additional stop bits.

The addition of stop and start bits and the insertion of gaps into the bit stream make
asynchronous transmission slower than forms of transmission that can operate without
the addition of control information.

b). Synchronous Transmission:

In synchronous transmission, the bit stream is combined into longer "frames," which may
contain multiple bytes. Each byte, however, is introduced onto the transmission link

75
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

without a gap between it and the next one. It is left to the receiver to separate the bit
stream into bytes for decoding purposes.
The following figure show illustration of synchronous transmission.

The sender puts its data onto the line as one long string. If the sender wishes to send data
in separate bursts, the gaps between bursts must be filled with a special sequence of 0s
and 1s that means idle. The receiver counts the bits as they arrive and groups them in 8-
bit units.

Without gaps and start and stop bits, there is no built-in mechanism to help the receiving
device adjust its bit synchronization midstream. Timing becomes very important,
therefore, because the accuracy of the received information is completely dependent on
the ability of the receiving device to keep an accurate count of the bits as they come in.

The advantage of synchronous transmission is speed. With no extra bits or gaps to


introduce at the sending end and remove at the receiving end, and, by extension, with
fewer bits to move across the link, synchronous transmission is faster than asynchronous
transmission. For this reason, it is more useful for high-speed applications such as the
transmission of data from one computer to another.

c. Isochronous:

In real-time audio and video, in which uneven delays between frames are not acceptable,
synchronous transmission fails. For example, TV images are broadcast at the rate of 30
images per second; they must be viewed at the same rate. If each image is sent by using
one or more frames, there should be no delays between frames. For this type of
application, synchronization between characters is not enough; the entire stream of bits

76
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

must be synchronized. The isochronous transmission guarantees that the data arrive at a
fixed rate.

Simplex, half-duplex and full-duplex communication

1) Simplex

A simplex communication channel only sends information in one direction. For example,
a radio station usually sends signals to the audience but never receives signals from them,
thus a radio station is a simplex channel. It is also common to use simplex channel in fiber
optic communication. One strand is used for transmitting signals and the other is for
receiving signals. But this might not be obvious because the pair of fiber strands are often
combined to one cable. The good part of simplex mode is that its entire bandwidth can be
used during the transmission.

2) Half duplex

In half duplex mode, data can be transmitted in both directions on a signal carrier except
not at the same time. At a certain point, it is actually a simplex channel whose
transmission direction can be switched. Walkie-talkie is a typical half duplex device. It has
a “push-to-talk” button which can be used to turn on the transmitter but turn off the
receiver. Therefore, once you push the button, you cannot hear the person you are talking
to but your partner can hear you. An advantage of half-duplex is that the single track is
cheaper than the double tracks.

3) Full duplex

A full duplex communication channel is able to transmit data in both directions on a signal
carrier at the same time. It is constructed as a pair of simplex links that allows
bidirectional simultaneous transmission. Take telephone as an example, people at both
ends of a call can speak and be heard by each other at the same time because there are two
communication paths between them. Thus, using the full duplex mode can greatly increase
the efficiency of communication.

Related Questions:-
Q1. What are different types of transmission? Explain.

Q2. Discuss Nyquist and Shannon Theorem .

Q3. (a)Calculate the maximum data rate for noiseless 3KHz channel for a binary
signal.
Repeat (a) if the channel is noisy and the signal to noise ratio is 30dB.

77
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Chapter 3: Medium Access Sublayer

Topics Covered
[Link] Channel Allocation Problem
[Link] Methods
[Link] Access Protocols

The Channel Allocation Problem


-how to allocate a single broadcast channel among competing users.

Static Channel Allocation

Frequency Division Multiplexing (FDM) is an example of static channel allocation where


the bandwidth is divided among a number of N users.
When there is only a small and constant number of users, each of which has a heavy
(buffered) load of traffic (e.g., carriers' switching offices), FDM is a simple and efficient
allocation mechanism.
However, when the number of senders is large and continuously varying or the traffic is
bursty, FDM presents some problems.

1) when fewer than N users are currently interested in communicating, a large piece of
valuable spectrum will be wasted.
2) when more users wants to communicate, those who have not been assigned a
frequency will be denied permission.
3) even assuming that the number of users could somehow be held constant at N, each
user traffic usually changes dynamically over time.

Dynamic Channel Allocation

1. Station Model: N independent stations (terminals) exists.

2. Single Channel Assumption: A single channel is available for all communication


(send and receive)

3. Collision Assumption: If two frames are transmitted simultaneously, they overlap


in time and the resulting signal is garbled (collision). no errors other than those
generated by collisions assumed to exist.

4. (a) Continuous Time: Frame transmission can begin at any instant.


(b) Slotted Time: Frame transmissions always begin at the start of a slot where the
time is divided into discrete slots.

78
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

5. (a) Carrier Sense: Stations can tell if the channel is in use before trying to use it.
(b) No Carrier Sense: Stations cannot sense the channel before trying to use it.

Access Methods
Access method is the term given to the set of rules by which networks
arbitrate the use of a common medium. It is the way the LAN keeps different
streams of data from crashing into each other as they share the network.
The access method works at the data-link layer (layer 2) because it is
concerned with the use of the medium that connects users. The access
method doesn't care what is being sent over the network, just like the traffic
law doesn't stipulate what you can carry.
Three traditional access methods are used today, although others exist and
may become increasingly important. They are Ethernet, Token Ring, and
ARCnet.

Multiple Access Protocols


• ALOHA
• Carrier Sense Multiple Access Protocols
• Collision-Free Protocols
• Limited-Contention Protocols

ALOHA
ALOHA is a system for coordinating and arbitrating access to a shared communication
Networks channel. It was developed in the 1970s by Norman Abramson and his
colleagues at the University of Hawaii. The original system used for ground based radio
broadcasting, but the system has been implemented in satellite communication systems.

A shared communication system like ALOHA requires a method of handling collisions


that occur when two or more systems attempt to transmit on the channel at the same time.
In the ALOHA system, a node transmits whenever data is available to send. If another
node transmits at the same time, a collision occurs, and the frames that were transmitted
are lost. However, a node can listen to broadcasts on the medium, even its own, and
determine whether the frames were transmitted.

Aloha means "Hello". Aloha is a multiple access protocol at the datalink layer and
proposes how multiple terminals access the medium without interference or collision. In
1972 Roberts developed a protocol that would increase the capacity of aloha two fold.
The Slotted Aloha protocol involves dividing the time interval into discrete slots and each
slot interval corresponds to the time period of one frame. This method requires
synchronization between the sending nodes to prevent collisions.

There are two different versions of ALOHA

79
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Protocol Flow Chart for ALOHA

Fig. shows the protocol flow chart for ALOHA.

Explanation:

80
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• A station which has a frame ready will send it.

• Then it waits for some time.

• If it receives the acknowledgement then the transmission is successful.

• Otherwise the station uses a backoff strategy, and sends the packet again.

• After many times if there is no acknowledgement then the station aborts the idea of
transmission.

Pure ALOHA

• In pure ALOHA, the stations transmit frames whenever they have data to send.

• When two or more stations transmit simultaneously, there is collision and the frames are
destroyed.

• In pure ALOHA, whenever any station transmits a frame, it expects the


acknowledgement from the receiver.

• If acknowledgement is not received within specified time, the station assumes that the
frame (or acknowledgement) has been destroyed.

• If the frame is destroyed because of collision the station waits for a random amount of
time and sends it again. This waiting time must be random otherwise same frames will
collide again and again.

• Therefore pure ALOHA dictates that when time-out period passes, each station must
wait for a random amount of time before resending its frame. This randomness will help
avoid more collisions.

• Figure shows an example of frame collisions in pure ALOHA.

81
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• In fig there are four stations that .contended with one another for access to shared
channel. All these stations are transmitting frames. Some of these frames collide because
multiple frames are in contention for the shared channel. Only two frames, frame 1.1 and
frame 2.2 survive. All other frames are destroyed.

• Whenever two frames try to occupy the channel at the same time, there will be a
collision and both will be damaged. If first bit of a new frame overlaps with just the last
bit of a frame almost finished, both frames will be totally destroyed and both will have to
be retransmitted.

Slotted ALOHA

• Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of
collision in pure ALOHA are very high.

• In slotted ALOHA, the time of the shared channel is divided into discrete intervals
called slots.

• The stations can send a frame only at the beginning of the slot and only one frame is
sent in each slot.

82
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• In slotted ALOHA, if any station is not able to place the frame onto the channel at the
beginning of the slot i.e. it misses the time slot then the station has to wait until the
beginning of the next time slot.

• In slotted ALOHA, there is still a possibility of collision if two stations try to send at the
beginning of the same time slot as shown in fig.

• Slotted ALOHA still has an edge over pure ALOHA as chances of collision are reduced
to one-half.

Carrier Sense Multiple Access Protocols

To minimize the chance of collision and, therefore, increase the performance, the CSMA
method was developed. The chance of collision can be reduced if a station senses the
medium before trying to use it. Carrier sense multiple access (CSMA) requires that each
station first listen to the medium (or check the state of the medium) before sending.
CSMA can reduce the possibility of collision, but it cannot eliminate it. The following
figure shows a space and time model of a CSMA network. Stations are connected to a
shared channel (usually a dedicated medium).

83
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The possibility of collision still exists because of propagation delay, when a station sends
a frame, it still takes time (although very short) for the first bit to reach every station and
for every station to sense it. In other words, a station may sense the medium and find it
idle, only because the first bit sent by another station has not yet been received.

At time t1 station B senses the medium and finds it idle, so it sends a frame. At time t2
(t2> t1) station C senses the medium and finds it idle because, at this time, the first bits
from station B have not reached station C. Station C also sends a frame. The two signals
collide and both frames are destroyed.

Vulnerable Time:

The vulnerable time for CSMA is the propagation time Tp. This is the time needed for a
signal to propagate from one end of the medium to the other. When a station sends a
frame, and any other station tries to send a frame during this time, a collision will result.
But if the first bit of the frame reaches the end of the medium, every station will already
have heard the bit and will refrain from sending. The following figure shows the worst
case. The leftmost station A sends a frame at time t1 which reaches the rightmost station
D at time t1 + Tp. The gray area shows the vulnerable area in time and space.

84
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Persistence Methods:

What should a station do if the channel is busy? What should a station do if the channel is
idle? Three methods have been devised to answer these questions: the 1-persistent
method, the nonpersistent method, and the p-persistent method. The following figure
shows the behavior of three persistence methods when a station finds a channel busy.

85
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• 1-Persistent: The 1-persistent method is simple and straightforward. In this method,


after the station finds the line idle, it sends its frame immediately (with probability 1).
This method has the highest chance of collision because two or more stations may find
the line idle and send their frames immediately.

• Nonpersistent: In the nonpersistent method, a station that has a frame to send senses
the line. If the line is idle, it sends immediately. If the line is not idle, it waits a random
amount of time and then senses the line again. The nonpersistent approach reduces the
chance of collision because it is unlikely that two or more stations will wait the same
amount of time and retry to send simultaneously. However, this method reduces the
efficiency of the network because the medium remains idle when there may be stations
with frames to send.

86
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• P-Persistent: The p-persistent method is used if the channel has time slots with a slot
duration equal to or greater than the maximum propagation time. The p-persistent
approach combines the advantages of the other two strategies. It reduces the chance of
collision and improves efficiency. In this method, after the station finds the line idle it
follows these steps:

1. With probability p, the station sends its frame.

2. With probability q = 1 - p, the station waits for the beginning of the next time slot and
checks the line again.

1. If the line is idle, it goes to step 1.

2. If the line is busy, it acts as though a collision has occurred and uses the back off
procedure.

CSMA with Collision Detection

To reduce the impact of collisions on the network performance, Ethernet uses an


algorithm called CSMA with Collision Detection (CSMA / CD): CSMA/CD is
a protocol in which the station senses the carrier or channel before transmitting frame just
as in persistent and non-persistent CSMA. If the channel is busy, the station waits. it
listens at the same time on communication media to ensure that there is no collision with
a packet sent by another station. In a collision, the issuer immediately cancel the sending
of the package. This allows to limit the duration of collisions: we do not waste time to
send a packet complete if it detects a collision. After a collision, the transmitter waits
again silence and again, he continued his hold for a random number; but this time the
random number is nearly double the previous one: it is this called back-off (that is to say,
the "decline") exponential. In fact, the window collision is simply doubled (unless it has
already reached a maximum). From a packet is transmitted successfully, the window will
return to its original size.

Again, this is what we do naturally in a meeting room if many people speak exactly the
same time, they are realizing account immediately (as they listen at the same time they
speak), and they interrupt without completing their sentence. After a while, one of them
speaks again. If a new collision occurs, the two are interrupted again and tend to wait a
little longer before speaking again.

87
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The entire scheme of CSMA/CD is depicted in the fig.

Frame format of CSMA/CD

The frame format specified by IEEE 802.3 standard contains following fields.

88
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

1. Preamble: It is seven bytes (56 bits) that provides bit synchronization. It consists of
alternating Os and 1s. The purpose is to provide alert and timing pulse.

2. Start Frame Delimiter (SFD): It is one byte field with unique pattern: 10 10 1011. It
marks the beginning of frame.

3. Destination Address (DA): It is six byte field that contains physical address of
packet's destination.

4. Source Address (SA): It is also a six byte field and contains the physical address of
source or last device to forward the packet (most recent router to receiver).

5. Length: This two byte field specifies the length or number of bytes in data field.

6. Data: It can be of 46 to 1500 bytes, depending upon the type of frame and the length
of the information field.

7. Frame Check Sequence (FCS): This for byte field contains CRC for error detection.

CSMA/CD Procedure:

Fig. Shows a flow chart for the CSMA/CD protocol.

89
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Explanation:

• The station that has a ready frame sets the back off parameter to zero.

• Then it senses the line using one of the persistent strategies.

• If then sends the frame. If there is no collision for a period corresponding to one
complete frame, then the transmission is successful.

• Otherwise the station sends the jam signal to inform the other stations about the
collision.

• The station then increments the back off time and waits for a random back off time and
sends the frame again.

• If the back off has reached its limit then the station aborts the transmission.

• CSMA/CD is used for the traditional Ethernet.

90
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• CSMA/CD is an important protocol. IEEE 802.3 (Ethernet) is an example


of CSMNCD. It is an international standard.

• The MAC sublayer protocol does not guarantee reliable delivery. Even in absence of
collision the receiver may not have copied the frame correctly.

Collision-Free Protocols
Although collisions do not occur with CSMA/CD once a station has unambiguously
seized the channel, they can still occur during the contention period. These collisions
adversely affect the efficiency of transmission. Hence some protocols have been
developed which are contention free.
Bit-Map Method

In this method, there N slots. If node 0 has a frame to send, it transmit a 1 bit during the
first slot. No other node is allowed to transmit during this period. Next node 1 gets a
chance to transmit 1 bit if it has something to send, regardless of what node 0 had
transmitted. This is done for all the nodes. In general node j may declare the fact that it
has a frame to send by inserting a 1 into slot j. Hence after all nodes have passed, each
node has complete knowledge of who wants to send a frame. Now they begin
transmitting in numerical order. Since everyone knows who is transmitting and when,
there could never be any collision.
The basic problem with this protocol is its inefficiency during low load. If a node has to
transmit and no other node needs to do so, even then it has to wait for the bitmap to
finish. Hence the bitmap will be repeated over and over again if very few nodes want to
send wasting valuable bandwidth.

Binary Countdown
In this protocol, a node which wants to signal that it has a frame to send does so by
writing its address into the header as a binary number. The arbitration is such that as soon
as a node sees that a higher bit position that is 0 in its address has been overwritten with a
1, it gives up. The final result is the address of the node which is allowed to send. After

91
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

the node has transmitted the whole process is repeated all over again. Given below is an
example situation.

Nodes Addresses

A 0010

B 0101

C 1010

D 1001

----

1010

Node C having higher priority gets to transmit. The problem with this protocol is that the
nodes with higher address always wins. Hence this creates a priority which is highly
unfair and hence undesirable.

Related Questions:-

Q1. Explain Contention free protocol.

Q2. Write a short note on CSMA/CD.

Q3. What do you mean by Channel Allocation? Discuss various problems in it

Q4. Differentiate between p-persistent and non- persistent CSMA.

Q5. What is difference between pure ALOHA and Slotted ALOHA?

92
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Chapter 4: Local Area Network

Topics Covered

Uses of LAN
Attributes of LAN
IEEE LAN Standards
IEEE LAN Standard 802.3
IEEE LAN Standard 802.4
IEEE LAN Standard 802.5
IEEE LAN Standard 802.6 (MAN)
FDDI

Uses of LAN

 The sharing of resources, including hardware resource sharing, file sharing, and
software inventory data sharing. Users can share a network system software and
application software.

 Data transfer and e-mail: Data and network file transfer is an important feature
of modern LANs not only transmit files, data, information, but also can send voice,
images.

 Improve the reliability of the computer system. LAN computers can back each
other, avoiding the stand-alone system without backup failure may occur when
system failures, greatly improving the reliability of the system, particularly in the
industrial process control, real-time data processing and other applications, is
particularly important.

 Easy to distributed processing: Use of network technology you can have more
than one computer connected to a high-performance computer system (Server)
through a certain algorithm, the larger global issues points to a different computer to
complete.

Attributes of LAN

93
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Topology- network topology, a topology is the physical configuration of a network that


determines how the network's computers are connected. Common configurations include
the bus topology, linear bus, mesh topology, ring topology, star topology, tree
topology and hybrid topology.
Signaling methods
Baseband

Baseband transmissions typically use digital signaling over a single wire; the
transmissions themselves take the form of either electrical pulses or light. The digital
signal used in baseband transmission occupies the entire bandwidth of the network media
to transmit a single data signal. Baseband communication is bidirectional, allowing
computers to both send and receive data using a single cable. However, the sending and
receiving cannot occur on the same wire at the same time.

Using baseband transmissions, it is possible to transmit multiple signals on a single cable


by using a process known as multiplexing. Baseband uses Time-Division Multiplexing
(TDM), which divides a single channel into time slots. The key thing about TDM is that
it doesn't change how baseband transmission works, only the way data is placed on the
cable.

Broadband

Whereas baseband uses digital signaling, broadband uses analog signals in the form of
optical or electromagnetic waves over multiple transmission frequencies. For signals to
be both sent and received, the transmission media must be split into two channels.
Alternatively, two cables can be used: one to send and one to receive transmissions.

Multiple channels are created in a broadband system by using a multiplexing technique


known as Frequency-Division Multiplexing (FDM). FDM allows broadband media to
accommodate traffic going in different directions on a single media at the same time.

Transmission media is a pathway that carries the information from sender to


receiver. We use different types of cables or waves to transmit data. Data is transmitted
normally through electrical or electromagnetic signals.
An electrical signal is in the form of current. An electromagnetic signal is series of
electromagnetic energy pulses at various frequencies. These signals can be transmitted
through copper wires, optical fibers, atmosphere, water and vacuum Different Medias
have different properties like bandwidth, delay, cost and ease of installation and
maintenance. Transmission media is also called Communication channel.
Types of Transmission Media
Transmission media is broadly classified into two groups.
Wired or Guided Media or Bound Transmission Media : Bound transmission media
are the cables that are tangible or have physical existence and are limited by the physical

94
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

geography. Popular bound transmission media in use are twisted pair cable, co-axial cable
and fiber optical cable. Each of them has its own characteristics like transmission speed,
effect of noise, physical appearance, cost etc.
Wireless or Unguided Media or Unbound Transmission Media : Unbound
transmission media are the ways of transmitting data without using any cables. These
media are not bounded by physical geography. This type of transmission is called
Wireless communication. Nowadays wireless communication is becoming popular.
Wireless LANs are being installed in office and college campuses. This transmission
uses Microwave, Radio wave, Infra red are some of popular unbound transmission media.

Access methods

CSMA/CD (Carrier Sense Multiple Access/Collision Detection)


In CSMA/CD (Carrier Sense Multiple Access/Collision Detection) Access Method, every
host has equal access to the wire and can place data on the wire when the wire is free
from traffic. When a host want to place data on the wire, it will “sense” the wire to find
whether there is a signal already on the wire. If there is traffic already in the medium, the
host will wait and if there is no traffic, it will place the data in the medium. But, if two
systems place data on the medium at the same instance, they will collide with each other,
destroying the data. If the data is destroyed during transmission, the data will need to be
retransmitted. After collision, each host will wait for a small interval of time and again
the data will be retransmitted, to avoid collision again.

CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance)


In CSMA/CA, before a host sends real data on the wire it will “sense” the wire to check
if the wire is free. If the wire is free, it will send a piece of “dummy” data on the wire to
see whether it collides with any other data. If it does not collide, the host will assume that
the real data also will not collide.

Token Passing
In CSMA/CD and CSMA/CA the chances of collisions are there. As the number of hosts
in the network increases, the chances of collisions also will become more. In token
passing, when a host want to transmit data, it should hold the token, which is an empty
packet. The token is circling the network in a very high speed. If any workstation wants
to send data, it should wait for the token. When the token has reached the workstation,
the workstation can take the token from the network, fill it with data, mark the token as
being used and place the token back to the network.

IEEE LAN Standards

95
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

IEEE LAN Standard 802.3

IEEE 802.3 Frame Structure


Start of Source 802.2
Destination. Length Frame
Preamble Frame Address Header+Data
Address (2 Checksum
(7 bytes) Delimiter (2/6 (46-1500
(2/6 bytes) bytes) (4 bytes)
(1 byte) bytes) bytes)

A brief description of each of the fields

 Preamble :Each frame starts with a preamble of 7 bytes, each byte containing the
bit pattern 10101010. Manchester encoding is employed here and this enables the
receiver's clock to synchronize with the sender's and initialize itself.

 Start of Frame Delimiter :This field containing a byte sequence 10101011 denotes
the start of the frame itself.

 Dest. Address :The standard allows 2-byte and 6-byte addresses. Note that the 2-
byte addresses are always local addresses while the 6-byte ones can be local or
global.

2-Byte Address - Manually assigned address

Individual(0)/Group(1) Address of the machine


(1 bit) (15 bits)


6-Byte Address - Every Ethernet card with globally unique address

Individual(0)/Group(1) Universal(0)/Local(1) Address of the machine


(1 bit) (1 bit) (46 bits)


Multicast : Sending to group of stations. This is ensured by setting the first bit in
either 2-byte/6-byte addresses to 1.
Broadcast : Sending to all stations. This can be done by setting all bits in the
address field to [Link] Ethernet cards(Nodes) are a member of this group.

 Source Address :Refer to Destination. Address. Same holds true over here.

 Length : The Length field tells how many bytes are present in the data field, from
a minimum of 0 to a maximum of 1500. The Data and padding together can be
from 46bytes to 1500 bytes as the valid frames must be at least 64 bytes long, thus

96
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

if data is less than 46 bytes the amount of padding can be found out by length
field.

 Data :Actually this field can be split up into two parts - Data(0-1500 bytes) and
Padding(0-46 bytes).
Reasons for having a minimum length frame :

1. To prevent a station from completing the transmission of a short frame


before the first bit has even reached the far end of the cable, where it may
collide with another frame. Note that the transmission time ought to be
greater than twice the propagation time between two farthest nodes.

transmission time for frame > 2*propagation time between two farthest
nodes

2. When a transceiver detects a collision, it truncates the current frame,


which implies that stray bits and pieces of frames appear on the cable all
the time. Hence to distinguish between valid frames from garbage, 802.3
states that the minimum length of valid frames ought to be 64 bytes (from
Destination. Address to Frame Checksum).

 Frame Checksum : It is a 32-bit hash code of the data. If some bits are
erroneously received by the destination (due to noise on the cable), the checksum
computed by the destination wouldn't match with the checksum sent and therefore
the error will be detected. The checksum algorithm is a cyclic redundancy
checksum (CRC) kind. The checksum includes the packet from Destination.
Address to Data field.

Ethernet Frame Structure


Destination. Source Type Data Frame
Preamble
Address Address (2 (46-1500 Checksum
(8 bytes)
(2/6 bytes) (2/6 bytes) bytes) bytes) (4 bytes)

A brief description of the fields which differ from IEEE 802.3

 Preamble: The Preamble and Start of Frame Delimiter are merged into one in
Ethernet standard. However, the content of the first 8 bytes remains the same in
both.

 Type :The length field of IEEE 802.3 is replaced by Type field, which denotes the
type of packet being sent viz. IP, ARP, RARP, etc. If the field indicates a value
less than 1500 bytes then it is length field of 802.3 else it is the type field of
Ethernet packet

97
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

IEEE LAN Standard 802.4

Token Bus is described in the IEEE 802.4 specification, and is a Local Area Network
(LAN) in which the stations on the bus or tree form a logical ring. Each station is
assigned a place in an ordered sequence, with the last station in the sequence being
followed by the first, as shown below. Each station knows the address of the station to its
"left" and "right" in the sequence.

A Token Bus network

This type of network, like a Token Ring network, employs a small data frame only a few
bytes in size, known as a token, to grant individual stations exclusive access to the
network transmission medium. Token-passing networks are deterministic in the way that
they control access to the network, with each node playing an active role in the process.
When a station acquires control of the token, it is allowed to transmit one or more data
frames, depending on the time limit imposed by the network. When the station has
finished using the token to transmit data, or the time limit has expired, it relinquishes
control of the token, which is then available to the next station in the logical sequence.
When the ring is initialised, the station with the highest number in the sequence has
control of the token.

The physical topology of the network is either a bus or a tree, although the order in which
stations are connected to the network is not important. The network topology means that
the we are essentially dealing with a broadcast network, and every frame transmitted is
received by all attached stations. With the exception of broadcast frames, however,
frames will only be read by the station to which they are addressed, and ignored by all
other stations. As the token frame is transmitted, it carries the destination address of the
next station in the logical sequence. As each individual station is powered on, it is
allocated a place in the ring sequence (note that in the diagram above, station two is not
participating in the ring). The Token Bus medium access control protocol allows stations
to join the ring or leave the ring on an ad-hoc basis.

98
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Token Bus networks were conceived to meet the needs of automated industrial
manufacturing systems and owe much to a proposal by General Motors for a networking
system to be used in their own manufacturing plants - Manufacturing Automation
Protocol (MAP). Ethernet was not considered suitable for factory automation systems
because of the contention-based nature of its medium access control protocol, which
meant that the length of time a station might have to wait to send a frame was
unpredictable. Ethernet also lacked a priority system, so there was no way to ensure that
more important data would not be held up by less urgent traffic.

A token-passing system in which each station takes turns to transmit a frame was
considered a better option, because if there are n stations, and each station
takes T seconds to send a frame, no station has to wait longer than nT seconds to acquire
the token. The ring topology of existing token-passing systems, however, was not such an
attractive idea, since a break in the ring would cause a general network failure. A ring
topology was also considered to be incompatible with the linear topology of assembly-
line or process control systems. Token Bus was a hybrid system that provided the
robustness and linearity of a bus or tree topology, whilst retaining the known worst-case
performance of a token-passing medium access control method.

The transmission medium most often used for broadband Token Bus networks is 75 Ohm
coaxial cable (the same type of cable used for cable TV), although alternative cabling
configurations are available. Both single and dual cable systems may be used, with or
without head-ends. Transmission speeds vary, with data rates of 1, 5 and 10 Mbps being
common.

The Token Bus MAC layer protocol

When the ring is initialised, tokens are inserted into it in station address order, starting
with the highest. The token itself is passed from higher to lower addresses. Once a station
aquires the token, it has a fixed time period during which it may transmit frames, and the
number of frames which can be transmitted by each station during this time period will
depend on the length of each frame. If a station has no data to send, it simply passes the
token to the next station without delay.

The Token Bus standard defines four classes of priority for traffic - 0, 2, 4, and 6 - with 6
representing the highest priority and 0 the lowest. Each station maintains four internal
queues that correspond to the four priority levels. As a frame is passed down to the MAC
sublayer from a higher-layer protocol, its priority level is determined, and it is assigned to
the appropriate queue. When a station acquires the token, frames are transmitted from
each of the four queues in strict order of priority. Each queue is allocated a specific time
slot, during which frames from that queue may be transmitted. If there are no frames
waiting in a particular queue, the token immediately becomes available to the next queue.
If the token reaches level 0 and there are no frames waiting, it is immediately passed to
the next station in the logical ring. The whole process is controlled by timers that are used

99
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

to allocate time slots to each priority level. If any queue is empty, its time slot may be
allocated for use by the remaining queues.

The priority scheme guarantees level 6 data a known fraction of the network bandwith,
and can therefore be used to implement a real-time control system. As an example, if a
network running at 10 Mbps and having fifty stations has been configured so that level 6
traffic is allocated one-third of the bandwidth, each station has a guaranteed bandwidth of
67 kbps for level 6 traffic. The available high priority bandwidth could thus be used to
synchronise robots on an assembly line, or to carry one digital voice channel per station,
with some bandwidth left over for control information.

The Token Bus frame format

The Token Bus frame format is shown above. The Preamble field is used to synchronise
the receiver's clock. The Start Delimiter and End Delimiter fields are used to mark the
start and end of the frame, and contain an analogue encoding of symbols other than 0s
and 1s that cannot occur accidentally within the frame data. For this reason, a length field
is not required.

The Frame Control field identifies the frame as either a data frame or a control frame. For
data frames, it includes the priority level of the frame, and may also include an indicator
requiring the destination station to acknowledge correct or incorrect receipt of the frame.
For control frames, the field specifies the frame type.

The Destination and Source address fields contain either a 2-byte or a 6-byte hardware
address for the destination and source stations respectively (a given network must use
either 2-byte or 6-byte addresses consistently, not a mixture of the two). If 2-byte
addresses are used, the Data Field can be up t0 8,182 bytes. If 6-byte addresses are used,
it is limited to 8,174 bytes. The Checksum is used to detect transmission errors. The
various control frames used are shown in the table below.

Token Bus Control Frames

100
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Frame control field Name Meaning

00000000 Claim_token Claim token during ring initialisation

00000001 Solicit_successor_1 Allow stations to enter the ring

00000010 Solicit_successor_2 Allow stations to enter the ring

00000011 Who_follows Recover from lost token

00000100 Resolve_contention Used when multiple stations want to


enter the ring

00001000 Token Pass the token

00001100 Set_successor Allow stations to leave the ring

Periodically, a station will transmit a SOLIT_SUCCESSOR frame to solicit bids from


stations wishing to join the ring. The frame includes the sender's address, and that of its
current successor in the ring. Only stations with an address falling between these two
addresses may bid to enter the ring (in order to maintain the logical order of station
addresses on the ring). If no station bids to enter within a slot time, the response window
is closed, and the token holder returns to its normal business. If only one station bids to
enter, it is inserted into the ring and becomes the token holder's successor. If two or more
stations bid to enter, their frames will collide and be garbled. The token holder then runs
an arbitration process, that begins with the broadcast of
a RESOLVE_CONTENTION frame. The algorithm is a variation of binary countdown,
using two bits at a time.

All station interfaces maintain two random bits which are used to delay all bids by 0, 1, 2
or 3 slot times to further reduce contention. Two stations will only collide on a bid,
therefore, if the current two address bits being used are the same and they happen to have

101
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

the same two random bits. To prevent stations that must wait 3 slot times from being at a
permanent disadvantage, the random bits are regenerated either every time they are used,
or every 50 msec.

The solicitation of new stations is not allowed to interfere with the guaranteed worst case
for token rotation. Each station has a timer that is reset whenever it acquires the token.
When the token arrives, the existing value of this timer (i.e. the previous token rotation
time) is inspected before the timer is reset. If a pre-determined threshold value has been
exceeded, recent levels of traffic have been considered to be too high, and no bids may be
solicited this time round. In any case, only one station can enter the ring during each
solicitation, to limit the amount of time that can be used for ring maintenance. There is no
guaranteed time limit set on how long a station has to wait to enter the ring when traffic is
heavy, but in practice it is not normally longer than a few seconds.

To leave the ring, a station X with a predecessor P and a successor S simply sends
a SET_SUCCESSOR frame to P telling it that from now on its successor is S.
Station X then just stops transmitting.

Ring initialisation is a special case of adding new stations. When the first station comes
on line, it registers the fact that there is no traffic for a specified period. It then broadcasts
a CLAIM_TOKEN frame. Not receiving a reply, it creates a token and sets up a ring
consisting of just itself, and periodically solicits bids for new stations. As new stations are
powered on, they will respond and join the ring, if necessary using the contention
algorithm described above. If the first two stations are powered on simultaneously, they
are allowed to bid for the token using the standard modified binary countdown algorithm
and the two random bits.

Problems sometimes arise with the token or the logical ring due to transmission errors
(for example a station tries to pass a token to a station which has been taken offline).
After passing the token, therefore, a station monitors the network to determine whether
its successor has either transmitted a frame or passed the token. If neither of these events
occurs, it generates a second token. If that also fails to produce the required outcome, the
station transmits a WHO_FOLLOWS frame specifying the address of its successor.
When the failed station's successor sees a WHO_FOLLOWS frame naming its
predecessor, it responds with a SET_SUCCESSOR frame, naming itself as the new
successor. The failed station is then removed from the ring.

If two consecutive stations go offline, the WHO_FOLLOWS frame will fail to ellicit a
response. In this situation, the station that originally passed the token sends
a SOLICIT_SUCCESSOR_2 frame to see if any other stations are still active. The
standard connection protocol is run once again, with all active stations bidding for a place
until the ring is re-established. A problem can also occur if the token holder goes down
and takes the frame with it. In this case, the ring initialisation algorithm is used to re-
establish the ring.

102
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Multiple tokens on the ring are another problem, and if a station currently holding a token
notices a transmission from another station, it discards its token. If multiple tokens are
present on the network at the same time, this process is repeated until all but one of the
tokens are discarded. If all of the tokens are discarded by accident, the lack of activity
will cause one or more of the stations to try and claim the token.

IEEE LAN Standard 802.5

Token Ring was developed by IBM in the 1970s and is described in the IEEE 802.5
specification. It is no longer widely used in LANs. Token passing is the method of
medium access, with only one token allowed to exist on the network at any one time.
Network devices must acquire the token to transmit data, and may only transmit a single
frame before releasing the token to the next station on the ring. When a station has data to
transmit, it acquires the token at the earliest opportunity, marks it as busy, and attaches
the data and control information to the token to create a data frame, which is then
transmitted to the next station on the ring. The frame will be relayed around the ring until
it reaches the destination station, which reads the data, marks the frame as having been
read, and sends it on around the ring. When the sender receives the acknowledged data
frame, it generates a new token, marks it as being available for use, and sends it to the
next station. In this way, each of the other stations on the ring will get an opportunity to
transmit data (even if they don't have any data to transmit!).

Token Ring networks provide a priority system that allows administrators to designate
specific stations as having a higher priority than others, allowing those stations to use the
network more frequently by setting the priority level of the token so that only stations
with the same priority or higher can use the token (or reserve the token for future use).
Stations that raise a token's priority must reinstate the priority level previously in force
once they have used the token. In a Token Ring network, one station is arbitrarily selected
to be the active monitor. The active monitor acts as a source of timing information for
other stations, and performs various maintenance functions, such as generating a new
token as and- when required, or preventing rogue data frames from endlessly circulating
around the ring. All of the stations on the ring have a role to play in managing the
network, however. Any station that detects a serious problem will generate a beacon
frame that alerts other stations to the fault condition, prompting them to carry out
diagnostic activities and attempt to re-configure the network.

Frame format

Two basic frame types are used - tokens, and data/command frames. The token is three
bytes long and consists of a start delimiter, an access control byte, and an end delimiter.
The format of the token is shown below.

103
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The Token Ring token

A data/command frame has the same fields as the token, plus several additional fields.
The format of the data/command frame is shown below.

The Token Ring frame format

 Start delimiter - alerts each station of the arrival of a token or frame.

 Access control byte - contains the priority field, the reservation field,
the token bit and a monitor bit.

 Frame control byte - indicates whether the frame contains data or control
information. In a control frame, this byte specifies the type of control
information carried.

 Destination and source addresses - two six-byte fields that identify the
destination and source station MAC addresses.

 Data - the maximum length is limited by the ring token holding time, which
defines the maximum time a station can hold the token

 Frame check sequence (FCS) - filled by the source station with a


calculated value dependent on the frame contents. The destination station
recalculates the value to determine whether the frame was damaged in
transit. If so, the frame is discarded.

104
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 End delimiter - signals the end of the token or frame, and contains bits that
may be used to indicate a damaged frame, and to identify the last frame in a
logical sequence.

 Frame status - a one-byte field that terminates a frame, and includes the
one-bit address-recognized and frame-copied fields. These one-bit fields, if
set, provide confirmation that the frame has been delivered to the source
address and the data read. Both fields are duplicated within the frame status
byte.

If the network is quiet and none of the stations has any data to transmit, the token simply
circulates around the ring continuously. When a station has data to transmit, it waits until
it receives the token, marks it as "busy" by setting the token bit, adds the data and/or
control information to create a data or command frame, and transmits the frame to the
next station. Each station that receives the frame will re-transmit the frame to the next
station until it reaches the destination station. This station reads the data, sets the address
recognised and frame copied bits in the frame status field, and transmits the frame to the
next node. When the frame arrives back at its point of origin, the originating station
generates a new token, which it transmits to the next station, even if it has further data to
send. In this way, each station network has an equal number of opportunities to transmit
data. Because only one token is allowed to exist on the network, only one station can
transmit at any one time, and collisions cannot occur. Although the IEEE 802.5
specification reflects IBM's Token Ring technology, the specifications differ slightly.
IBM specifies a star topology, with all end stations star-wired to a multi-station access
unit (MSAU), whereas IEEE 802.5 does not specify a topology (although virtually all
IEEE 802.5 implementations were based on a star). In addition, IEEE 802.5 does not
specify a media type, while IBM originally specified shielded twisted pair cable. The
table below summarises the IBM and IEEE 802.5 specifications.

IBM Token Ring v. IEEE 802.5

IBM Token Ring IEEE 802.5

Data rate 4 or 16 Mbps 4 or 16 Mbps

105
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

STP - 260 250


Stations per segment
UTP - 72

Topology Star Not specified

Media Twisted pair Not specified

Signaling Baseband Baseband

Access method Token passing Token passing

Encoding Differential Manchester Differential Manchester

Priority System

Token Ring networks provide a user-configurable priority system that allows stations that
are designated as having a high-priority to use the network more frequently. Token Ring
frames have two fields that control priority - the priority field, and the reservation field.
Only stations with a priority equal to, or higher than, the value contained in a token's
priority field can acquire the token. Once the token is in use, only stations with a priority
value higher than that of the transmitting station can reserve the token for the next pass
around the network. When the next token is generated, it is set to the priority of the
reserving station. Any station that raises the token's priority level must restore it to the
previous level after use.

Fault Management

One station (it can be any station on the network) is selected to be the active monitor. The
active monitor acts as a central source of timing information for the other stations on the
network, and performs various maintenance functions, including making sure that there is
always a token available on the network. The active monitor also sets the monitor bit on
any data or command frame it encounters on the ring so that, in the event that a sending

106
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

device fails after transmitting a frame, the frame can be prevented from circling the ring
endlessly and thereby denying access to the network for other stations. If the active
monitor receives a frame with the monitor bit already set, it removes the frame from the
ring and generates a new token.

The use of a multi station access unit (or wiring center) in a star topology contributes to
network reliability, since these devices can be configured to check for problems and
remove faulty stations from the ring if necessary. A Token Ring algorithm
called beaconing can be used to detect certain types of network fault. When a station
detects a serious problem on the network (a cable break, for example), it transmits
a beacon frame which initiates an auto-reconfiguration process. Stations that receive a
beacon frame perform diagnostic procedures and attempt to reconfigure the network
around the failed areas. Much of this reconfiguration process can be handled internally by
the MSAU. The MSAU contains relays that switch a computer into the ring when it is
turned on, or out of the ring when the computer is powered off. A MSAU has a number of
ports to which network devices can be connected, a ring-out port allowing the unit to be
connected to another MSAU, and a ring-in port that can accept an incoming connection
from another MSAU. A number of MSAUs can thus be connected together in daisy-chain
fashion to create a larger network. The ring-out port of the last MSAU in the chain must
be connected back to the ring-in port of the first MSAU.

Connections in a multi-station access unit

IEEE LAN Standard 802.6 (MAN)

Distributed Queue Dual Bus (DQDB)


• DQDB is a MAN.
• Unlike FDDI, DQDB is an IEEE standard: 802.6
Topology: Dual Bus

107
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

DQDB Frame Format


53-byte frame called a “cell

DQDB MAC Sublayer

• Head-ends generate cells in both directions


• To transmit, a host must know whether the destination is to its right or its left – If right,
the host must send on one bus – If left, the host must send on the other bus
• A “Distributed Queue” is used to make sure that cells are transmitted on a first-come
first-serve basis
DQDB Architecture
 Each bus supports traffic in only one direction

108
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Beginning of bus is denoted by q square and end by a triangle


 Bus A traffic moves from right to left and Bus B traffic from left to right
 Each bus connects to stations directly through input and output ports

Upstream & Downstream

As Bus A is configured
stations 1 & 2 are considered to be upstream w.r.t station 3
Stations 4 & 5 are considered to be downstream w.r.t. station 3
Station 1 has no upstream stations, but it has 4 downstream stations
Station 5 has no downstream stations, but it has 4 upstream stations

As Bus B is configured
Station 1 & 2 are considered to be downstream w.r.t. station 3
Stations 4 & 5 are considered to be upstream w.r.t. station 3
Station 1 has no downstream stations, but it has 4 upstream stations
Station 5 has no upstream stations, but it has 4 downstream stations

DQDB Working
Head-ends generate fixed size cells in both directions
To transmit, a host must know whether the destination is to its right or its left
If right, the host must send on left bus
If left, the host must send on the right bus
A “Distributed Queue” is used to make sure that cells are transmitted on a first-come
first-serve basis

Each node is aware of relative position of all other nodes


Correct bus must be chosen to transmit data
DQ is independent of physical size of network
To Transmit Data:
A Node acquires slot
Sets header
Copies data into slot
Cells propagate to end of bus
Copied by intended destination on the way

DQDB Data Transmission

109
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Distributed Queues

53-Byte transmission slot is used


Slots are continuous streams of bits
The heads of Bus A & B generate empty slots for use on buses
Each station maintains two different queues: A & B

DQDB Cell Format


 Segment Type (ST): Identify the cell as one of the following:
• Single Segment
• First Segment
• Intermediate Segment
• Last Segment
 Message Identifier (MID): MID is the same for all DQDB cells from the same
MAC frame. This allows the identification of intermediate segments.
 Information: Actual Data
 Length (LEN): The length of the information field.
 CRC: For error correction

110
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

DQDB cell header

Access Control Field (ACF):


This contains the BUSY and REQUEST bits that are used in the operation of the
DQDB. The BUSY bit indicates the cell is in use. The REQUEST bit is set in a cell
by a node that is waiting to transmit.
Virtual Channel Identifier (VCI):
This is used to identify a virtual channel address.
Payload type (PT): 1st bit Data or Control ; 2nd bit congestion.
Cell loss priority (CLP): Retain / Discard on congestion.
Header Error Control (HEC): CRC for the header

Fiber Distributed Data Interface (FDDI)

Fiber Distributed Data Interface (FDDI) was developed by ANSI in the mid-1980s and
specifies a 100-Mbps token-passing dual-ring LAN using fiber-optic cable, which is
frequently used as high-speed backbone technology because of its high bandwidth and
the distances it can span (up to 100 kilometres). Due to the advent of fast Ethernet and
Gigabit Ethernet, the complexity of station management in FDDI networks, and its high
cost, FDDI has never gained a foothold in the LAN market. The dual-ring system consists
of a primary and a secondary ring, in which traffic on each ring flows in opposite
directions. In normal operation, the primary ring is used for data transmission and the
secondary ring remains idle. Up to 1000 devices can be connected to an FDDI network,
with up to two kilometres between stations is using multi-mode fiber, and even longer
distances using single-mode fiber. There are various ways in which FDDI devices can be
connected to the network. A single attachment station (SAS) is attached to the primary
ring, usually via a concentrator. Concentrators are devices which are similar in many
ways to hubs on an Ethernet network, and are usually dual attachment concentrators,
attached to both rings. A dual attachment station (DAS) is attached directly to both the
primary and secondary rings.

111
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

FDDI dual-ring architecture

The main reason for the second ring is to provide fault tolerance in the event of a primary
ring failure. Traffic can wrap around a problem node and continue to carry data on the
secondary ring (in the opposite direction). If two nodes fail, the wrap at two locations
effectively creates two separate (non-communicating) rings. Bypass devices called
concentrators can be used to overcome such problems. These devices resemble hubs or
MSAUs in that multiple nodes can be connected to them. They can also isolate failed
nodes, while maintaining network traffic. In certain circumstances, both rings are used to
carry data, effectively doubling the capacity of the network. The following diagram
illustrates the effect of a ring wrapping in FDDI.

Ring-wrapping in an FDDI network

112
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

An alternative to wrapping is to use an optical bypass switch. This device provides


continuous dual-ring operation if a device on the ring fails. It prevents ring segmentation
and eliminates the failed station from the ring. Each DAS has two ports, designated A and
B. These ports connect the DAS to both the primary and secondary rings. Devices using
DAS connections will affect the ring if they are disconnected or powered off. If the DAS
device fails, the switch passes the light through itself using internal mirrors, maintaining
the integrity of the ring.

An optical bypass switch in an FDDI network

Frame format

FDDI frames are similar to Token Ring frames, and can be up to 4,500 bytes in length.
The FDDI frame fields are summarised below.

The FDDI frame format

113
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Preamble - a unique sequence that prepares each station for an upcoming


frame

 Start delimiter - indicates the beginning of a frame by employing a


signaling pattern that differentiates it from the rest of the frame

 Frame control - indicates the size of the address fields and whether the
frame contains asynchronous or synchronous data, together with other
control information

 Destination address - contains a 6-byte destination address (single,


multicast or broadcast)

 Source Address - contains a 6-byte address that identifies the sending station

 Data - contains either data or control information

 Frame check sequence - a cyclic redundancy check value

 End delimiter - a bit pattern that indicates the end of the frame

 Frame status - allows the source station to determine whether an error


occurred and whether the frame was recognized and copied by a receiving
station

Related Questions:-
Q1. Draw and explain working principle and frame format of IEEE 802.3 and 802.5.

Q2. What is the purpose of monitor station in token ring? How are reservations
done in token Ring?
Q3. Explain IEEE 802.6 Standards?
Q4. Explain FDDI and its applications

114
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Chapter 5: Data Link Layer

Topics Covered

[Link] Link Layer Design Issues


[Link] Detection and Correction
[Link] Data Link Protocols
[Link] Window Protocols

Data Link Layer Design Issues

The data link layer is supported to carry out many specified functions. For effective data
communications between two directly connected transmitting and receiving stations the
data link layer has to carry out a number of specific function like:

1. Services Provided to the Network Layer : A well defined serve interface in the
network layer. The principle service is transferring data from the network layer on source
machine to the network layer on destination machine.

2. Frame Synchronization : The source machine send data in blocks called frames to be
the destination machine. The starting and ending of each frame should be recognized by
the destination machine.

3. Flow Control : The source machine must not be send data frames at a rate faster then
the destination machines must be can accepted them.

4. Error Control : The errors mode in bits during transmission from source to
destination machines must be detected and corrected.

5. Addressing : On a multipoint line, such as many machine connected together (LAN),


the identity of the individual machine must be specified while transmitting the data
frames.

Services Provided to the Network Layer

115
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Service provided to the data link layer to the network layer is the transmission of data
from the source network layer to the destination network layer. This can be done in 3
ways:

1. Unacknowledgement Connectionless Service

2. Acknowledgement Connectionless Service

3. Acknowledgement Connection Oriented Service

1) Unacknowledgement Connectionless Service:

It has no logical connection established before sending a message transfer. If a frame is


lost in the medium, the receiver does not acknowledge the sender about it. It does not
have error recovering mechanism. So, the service is suitable when the error rate is low.

2) Acknowledgement Connectionless Service:

In this type of service, the data link layer always sends a frame and wait for it to be
acknowledged. If the acknowledgment is not coming before the expired time the sender
sends the entire message again.

3) Acknowledgement Connection-Oriented Service:

It establishes the connections before sending the frames. It guarantees each frame is
received exactly and in the right order. There is a logical connection setup between sender
and receiver. The process of communication follows the three steps:

 A logical connection is a set up between the sender and receiver.

 Data is transmitted.

 After data transmission is complete, the logical condition is terminated.

Framing

While transmitting the message, from sender to receiver, the large size message is broken
down into small size data unit called frames. The process of formation of the frames is
called framing. If the message is transmitted without breaking into frames, It may
monopolize the transmission line and if there is an error in the message, we need to
retransmit the whole message.

A frame could be a digital information transmission unit in PC networking and


telecommunication. A frame generally includes frame synchronization options consisting
of a sequence of bits or symbols that illustrate the receiver start and finish of the payload

116
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

information at intervals stream of symbols or bits it receives. If a receiver is connected to


the system in the middle of a frame transmission, it ignores the information till it detects
brand new frame synchronization sequence.
In the OSI model of PC networking, a frame is the protocol information unit at the
information link layer. Frames square measure the results of the ultimate layer of
encapsulation before the information is transmitted over the physical layer. A frame is
"the unit of transmission in an exceedingly link layer protocol, and consists of a link layer
header followed by a packet." every frame is separated from following by associate in
nursing interframe gap. A frame could be a series of bits typically composed of framing
bits, the packet payload, and a frame check sequence.
Frame can be categorized into two types:

1. Variable Size Frame

2. Fix Size Frame

Framing Techniques

Breaking the bit stream into a frame is a most significant task in the network. One way to
achieve this task is to make the timing gaps between the frames or inserting starting and
ending point. Following are the approaches to break up the frames:

[Link] Count

[Link] Stuffing

[Link] Stuffing

Character count
Field in header gives no. of chars in frame.
Shown in (a) below. Char count includes the counting character itself:

117
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Errors
Problem shown in (b). Transmission error changed 5 to 7. All frames now out of synch.
Even if we detect error, we have no way of recovering - of finding where next frame
starts.

Checksum
Note on detecting error:
There will be an overall check of the frame when it gets through (see "checksum"
methods later), so normally we do know that the frame was bad. We do not accept any
random stream of bits. The issue is can we find the next frame.

Start and end bytes (with byte stuffing)


Each frame starts with special start and end bytes (flag bytes). Here will imagine it as
same byte, FLAG.
After error, can always find start of next frame.
See (a) below:

Q. What if flag byte itself is in the data?


Probably won't happen for text data, but could easily happen with binary data
A. Insert special escape byte (ESC) before each FLAG in data. Removed at far end. This
is called byte stuffing or character stuffing.

118
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Q. What if ESC itself is in data?


A. Insert another ESC before it.
See (b) above.

De-stuffing recovers original chars.

 Packets, Frames and Error Detection

o ASCII character 1 - soh (start of header)

o ASCII character 4 - eot (end of transmission)

o ASCII character 27 - esc (escape)

What if control bytes themselves get corrupted?


Q. Say ESC byte gets corrupted by noise. Detect pre-mature end-of-frame.
Or FLAG byte gets corrupted and frame runs on too long.
A. Frame checksum figures this is bad frame.
Can still find next frame by looking for next FLAG. At most lose 1 or 2 frames.

Error-detection in general
Q. What if all ESC and FLAG bytes get corrupted?
A. All error-detection and correction methods only work below a certain error rate

Start and end flags (with bit stuffing)


Byte stuffing specifies char format (e.g. 8 bits per char).
To allow arbitrary no. of bits per char, use stuffing at bit-level rather than at byte-level.
Each frame begins and ends with bit pattern 01111110 (6 1's)
If 5 1's in a row in data, stuff a 0 in so will never be 6 in a row.
Stuff it in always - whether the next char was going to be a 1 or not.
De-stuffer removes the 0's after any 5 1's.

119
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

(a) Original data.


(b) Stuffed data transmitted.
(c) De-stuffed data received.

Might use all these methods:


Character count, start and end flags, and checksum.

Error Control

When data-frame is transmitted, there is a probability that data-frame may be lost in the
transit or it is received corrupted. In both cases, the receiver does not receive the correct
data-frame and sender does not know anything about any [Link] such case, both sender
and receiver are equipped with some protocols which helps them to detect transit errors
such as loss of data-frame. Hence, either the sender retransmits the data-frame or the
receiver may request to resend the previous data-frame.

Requirements for error control mechanism:

 Error detection - The sender and receiver, either both or any, must ascertain that
there is some error in the transit.

 Positive ACK - When the receiver receives a correct frame, it should


acknowledge it.

 Negative ACK - When the receiver receives a damaged frame or a duplicate


frame, it sends a NACK back to the sender and the sender must retransmit the
correct frame.

 Retransmission: The sender maintains a clock and sets a timeout period. If an


acknowledgement of a data-frame previously transmitted does not arrive before

120
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

the timeout the sender retransmits the frame, thinking that the frame or it’s
acknowledgement is lost in transit.

There are three types of techniques available which Data-link layer may deploy to
control the errors by Automatic Repeat Requests (ARQ):

1. Stop-and-wait ARQ
2. Go-Back-N ARQ
3. Selective Repeat ARQ

Stop-and-wait ARQ

Characteristics

 Used in Connection-oriented communication.


 It offers error and flow control
 It is used in Data Link and Transport Layers
 Stop and Wait ARQ mainly implements Sliding Window Protocol concept with
Window Size 1

Useful Terms:

 Propagation Delay: Amount of time taken by a packet to make a physical


journey from one router to another router.

Propagation Delay = (Distance between routers) / (Velocity of propagation)

 RoundTripTime (RTT) = 2* Propagation Delay


 TimeOut (TO) = 2* RTT
 Time To Live (TTL) = 2* TimeOut. (Maximum TTL is 180 seconds)

Problems of Stop and Wait are resolved by Stop and Wait ARQ (Automatic Repeat
Request) that does both error control and flow control.

121
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

1. Time Out:

2. Sequence Number (Data)

3. Delayed Acknowledgement:
This is resolved by introducing sequence number for acknowledgement also.

122
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Working of Stop and Wait ARQ:

1) Sender A sends a data frame or packet with sequence number 0.


2) Receiver B, after receiving data frame, sends and acknowledgement with sequence
number 1 (sequence number of next expected data frame or packet)
There is only one bit sequence number that implies that both sender and receiver have
buffer for one frame or packet only.

Above image is taken


from here.

Characteristics of Stop and Wait ARQ:

 It uses link between sender and receiver as half duplex link


 Throughput = 1 Data packet/frame per RTT
 If Bandwidth*Delay product is very high, then stop and wait protocol is not so
useful. The sender has to keep waiting for acknowledgements before sending the
processed next packet.
 It is an example for “Closed Loop OR connection oriented “ protocols
 It is an special category of SWP where its window size is 1
 Irrespective of number of packets sender is having stop and wait protocol
requires only 2 sequence numbers 0 and 1

The Stop and Wait ARQ solves main three problems, but may cause big performance
issues as sender always waits for acknowledgement even if it has next packet ready to
send. Consider a situation where you have a high bandwidth connection and propagation

123
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

delay is also high (you are connected to some server in some other country though a high
speed connection). To solve this problem, we can send more than one packet at a time
with a larger sequence numbers

So Stop and Wait ARQ may work fine where propagation delay is very less for example
LAN connections, but performs badly for distant connections like satellite connection.

Go-Back-N ARQ

Stop and wait ARQ mechanism does not utilize the resources at their [Link] the
acknowledgement is received, the sender sits idle and does nothing. In Go-Back-N ARQ
method, both sender and receiver maintain a window.

The sending-window size enables the sender to send multiple frames without
receiving the acknowledgement of the previous ones. The receiving-window
enables the receiver to receive multiple frames and acknowledge them. The
receiver keeps track of incoming frame’s sequence number.

When the sender sends all the frames in window, it checks up to what sequence
number it has received positive acknowledgement. If all frames are positively
acknowledged, the sender sends next set of frames. If sender finds that it has
received NACK or has not receive any ACK for a particular frame, it retransmits
all the frames after which it does not receive any positive ACK.

124
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Selective Repeat ARQ

In Go-back-N ARQ, it is assumed that the receiver does not have any buffer
space for its window size and has to process each frame as it comes. This
enforces the sender to retransmit all the frames which are not acknowledged.

In Selective-Repeat ARQ, the receiver while keeping track of sequence numbers,


buffers the frames in memory and sends NACK for only frame which is missing
or damaged.

The sender in this case, sends only packet for which NACK is received.

Flow Control

125
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

When a data frame (Layer-2 data) is sent from one host to another over a single medium,
it is required that the sender and receiver should work at the same speed. That is, sender
sends at a speed on which the receiver can process and accept the data. What if the speed
(hardware/software) of the sender or receiver differs? If sender is sending too fast the
receiver may be overloaded, (swamped) and data may be lost.

Flow control coordinates that amount of data that can be sent before receiving
acknowledgement.

 It is one of the most important duties of the data link layer.

 Flow control tells the sender how much data to send.

 It makes the sender wait for some sort of an acknowledgment (ACK) before
continuing to send more data.

 Flow Control Techniques: Stop-and-wait, and Sliding Window

Flow Control Techniques:

 One important aspect of data link layer is flow control.

 Flow control refers to a set of procedures used to restrict the amount of data
the sender can send before waiting for acknowledgement.

Stop and Wait Flow control:

 The sender has to wait for an acknowledgment of every frame that it sends.

 Only when a acknowledgment has been received is the next frame sent.
This process continues until the sender transmits an End of Transmission
(EOT) frame.

 In Stop-and-Wait flow control, the receiver indicates its readiness to receive


data for each frame.

126
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 For every frame that is sent, there needs to be an acknowledgment, which


takes a similar amount of propagation time to get back to the sender.

 Only one frame can be in transmission at a time. This leads to inefficiency


if propagation delay is much longer than the transmission delay

 Advantages of Stop and Wait:

o It's simple and each frame is checked and acknowledged well.

 Disadvantages of Stop and Wait:

o Only one frame can be in transmission at a time.

o It is inefficient, if the distance between devices is long. Reason is


propagation delay is much longer than the transmission delay.

o The time spent for waiting acknowledgements between each frame


can add significant amount to the total transmission time.

Sliding Window Flow Control:

 It works by having the sender and receiver have a “window” of frames.

 Each frame has to be numbered in relation to the sliding window. For a


window of size n, frames get a number from 0 to n - 1. Subsequent frames
get a number mod n.

 The sender can send as many frames as would fit into a window.

127
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 The receiver, upon receiving enough frames, will respond with an


acknowledgment of all frames up to a certain point in the window. It is
called slide.

 This window can hold frames at either end and provides the upper limit on
the number of frames that can be transmitted before requiring an
acknowledgement.

 For example, if n = 8, the frames are numbered 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2,


3, 4, 5, 6, 7, 0, 1...so on. The size of the window is (n -1) = 7.

 When the receiver sends an ACK, it includes the number of the next frame
it expects to receive. When the receiver sends an ACK containing the
number 5, it means all frames upto number 4 have been received.

Error Detection and Correction


What is an Error

The data can be corrupted during transmission (from source to receiver). It may be
affected by external noise or some other physical imperfections. In this case, the input
data is not same as the received output data. This mismatched data is called “Error”.

The data errors will cause loss of important / secured data. Even one bit of change in data
may affect the whole system’s performance. Generally the data transfer in digital systems
will be in the form of ‘Bit – transfer’. In this case, the data error is likely to be changed in
positions of 0 and 1 .

128
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Types Of Errors

In a data sequence, if 1 is changed to zero or 0 is changed to 1, it is called “Bit error”.

There are generally 3 types of errors occur in data transmission from transmitter to
receiver. They are

• Single bit errors

• Multiple bit errors

• Burst errors

Single Bit Data Errors

The change in one bit in the whole data sequence , is called “Single bit error”.
Occurrence of single bit error is very rare in serial communication system. This type of
error occurs only in parallel communication system, as data is transferred bit wise in
single line, there is chance that single line to be noisy.

Multiple Bit Data Errors

If there is change in two or more bits of data sequence of transmitter to receiver, it is


called “Multiple bit error”. This type of error occurs in both serial type and parallel type
data communication networks.

129
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Burst Errors

The change of set of bits in data sequence is called “Burst error”. The burst error is
calculated in from the first bit change to last bit change.

Here we identify the error form fourth bit to 6th bit. The numbers between 4th and 6th
bits are also considered as error. These set of bits are called “Burst error”. These burst
bits changes from transmitter to receiver, which may cause a major error in data
sequence. This type of errors occurs in serial communication and they are difficult to
solve.

Error-Correcting Codes

The codes which are used for both error detecting and error correction are called as
“Error Correction Codes”. The error correction techniques are of two types. They are,

 Single bit error correction

 Burst error correction

130
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The process or method of correcting single bit errors is called “single bit error
correction”. The method of detecting and correcting burst errors in the data sequence is
called “Burst error correction”.

Hamming code or Hamming Distance Code is the best error correcting code we use in
most of the communication network and digital systems.

Fundamental Concepts

Given a code C of block length n over an alphabet A, those specific n-tuples over A
which are in C are referred to as codewords.

Note that while the channel encoder transmits codewords, the n-tuples received by the
channel decoder may or may not be codewords, due to the possible occurrence of errors
during transmission.

Example 1

Suppose the information we are to transmit comes from the set of symbols {A, B, C, D}.
For practical considerations we associate sequences of 0's and l's with each of these
symbols.

A -> 00
B -> 01
C -> 10
D -> 11

This is the source encoding.

Now we want to add some redundancy (channel encoding).

A -> 00 ->
00000
B -> 01 ->
10110
C -> 10 ->
01011
D -> 11 ->
11101

131
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

We have just constructed a [5,4]-code over a binary alphabet. That is, we constructed a
code with 4 codewords, each being a 5-tuple (block length 5), with each component of
the 5-tuple being O or 1. The code is the set of n-tuples produced by the channel encoder
(as opposed to the source encoder). The source encoder transforms messages into k-tuples
(k=2 in the example above) over the code alphabet A, and the channel encoder assigns to
each of these information k-tuples a codeword of length n (n=5 in the example). Since the
channel encoder is adding redundancy, we have n > k and hence we have message
expansion. While the added redundancy is desirable from the point of view of error
control, it decreases the efficiency of the communication channel by reducing its effective
capacity. The ratio k to n is a measure of the fraction of information in the channel which
is non-redundant.

The rate of an [n,M]-code which encodes information k-tuples is


Definition
R = K/n

The rate of the simple code given in example 1 is 2/5.

The quantity r = n-k is sometimes called the redundancy of the code.

A fundamental parameter associated with an [n,M]-code C is the Hamming distance for


C. Before we can define the Hamming distance for a code, we must define the Hamming
distance between two codewords.

The Hamming distance d(x,y) between two codewords x and y is the number
Definition
of coordinate positions in which they differ.

Example 2.

Over the alphabet A = (0,1}, the codewords x and y x=(10110) y=(11O11) have
Hamming distance d(x,y) =3.

Example 3.

The codewords u and v over the alphabet A = (0,1,2), given by u = (21002) v=(12001)
have Hamming distance d(u,v) =3.

132
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Hamming Code

This error detecting and correcting code technique is developed by [Link] . This
code not only identifies the error bit, in the whole data sequence and it also corrects it.
This code uses a number of parity bits located at certain positions in the codeword. The
number of parity bits depends upon the number of information bits. The hamming code
uses the relation between redundancy bits and the data bits and this code can be applied
to any number of data bits.

What is a Redundancy Bit?

Redundancy means “The difference between number of bits of the actual data sequence
and the transmitted bits”. These redundancy bits are used in communication system to
detect and correct the errors, if any.

How the Hamming code actually corrects the errors?

In Hamming code, the redundancy bits are placed at certain calculated positions in order
to eliminate errors. The distance between the two redundancy bits is called “Hamming
distance”.

To understand the working and the data error correction and detection mechanism of the
hamming code, let’s see to the following stages.

Number of parity bits

As we learned earlier, the number of parity bits to be added to a data string depends upon
the number of information bits of the data string which is to be transmitted. Number of
parity bits will be calculated by using the data bits. This relation is given below.

2P >= n + P +1

Here, n represents the number of bits in the data string.

P represents number of parity bits.

For example, if we have 4 bit data string, i.e. n = 4, then the number of parity bits to be
added can be found by using trial and error method. Let’s take P = 2, then

2P = 22 = 4 and n + P + 1 = 4 + 2 + 1 = 7

This violates the actual expression.

So let’s try P = 3, then

133
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

2P = 23 = 8 and n + P + 1 = 4 + 3 + 1 = 8

So we can say that 3 parity bits are required to transfer the 4 bit data with single bit error
correction.

Where to Place these Parity Bits?

After calculating the number of parity bits required, we should know the appropriate
positions to place them in the information string, to provide single bit error correction.

In the above considered example, we have 4 data bits and 3 parity bits. So the total
codeword to be transmitted is of 7 bits (4 + 3). We generally represent the data sequence
from right to left, as shown below.

bit 7, bit 6, bit 5, bit 4, bit 3, bit 2, bit 1, bit 0

The parity bits have to be located at the positions of powers of 2. I.e. at 1, 2, 4, 8 and 16
etc. Therefore the codeword after including the parity bits will be like this

D7, D6, D5, P4, D3, P2, P1

Here P1, P2 and P3 are parity bits. D1 —- D7 are data bits.

Constructing a Bit Location Table

In Hamming code, each parity bit checks and helps in finding the errors in the whole
code word. So we must find the value of the parity bits to assign them a bit value.

By calculating and inserting the parity bits in to the data bits, we can achieve error
correction through Hamming code.

Let’s understand this clearly, by looking into an example.

Ex:

Encode the data 1101 in even parity, by using Hamming code.

134
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Step 1

Calculate the required number of parity bits.

Let P = 2, then

2P = 22 = 4 and n + P + 1 = 4 + 2 + 1 = 7.

2 parity bits are not sufficient for 4 bit data.

So let’s try P = 3, then

2P = 23 = 8 and n + P + 1 = 4 + 3 + 1 = 8

Therefore 3 parity bits are sufficient for 4 bit data.

The total bits in the code word are 4 + 3 = 7

Step 2

Constructing bit location table

Step 3

Determine the parity bits.

For P1 : 3, 5 and 7 bits are having three 1’s so for even parity, P1 = 1.

For P2 : 3, 6 and 7 bits are having two 1’s so for even parity, P2 = 0.
For P3 : 5, 6 and 7 bits are having two 1’s so for even parity, P3 = 0.

By entering / inserting the parity bits at their respective positions, codeword can be
formed and is transmitted. It is 1100101.

NOTE: If the codeword has all zeros (ex: 0000000), then there is no error in Hamming
code.

135
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Error-Detecting Codes

In digital communication system errors are transferred from one communication system
to another, along with the data. If these errors are not detected and corrected, data will be
lost . For effective communication, data should be transferred with high accuracy .This
can be achieved by first detecting the errors and then correcting them.

Error detection is the process of detecting the errors that are present in the data
transmitted from transmitter to receiver, in a communication system. We use some
redundancy codes to detect these errors, by adding to the data while it is transmitted from
source (transmitter). These codes are called “Error detecting codes”.

Types of Error detection

1. Parity Checking

2. Cyclic Redundancy Check (CRC)

3. Check Sum

[Link] Checking

Parity bit means nothing but an additional bit added to the data at the transmitter before
transmitting the data. Before adding the parity bit, number of 1’s or zeros is calculated in
the data. Based on this calculation of data an extra bit is added to the actual information /
data. The addition of parity bit to the data will result in the change of data string size.

This means if we have an 8 bit data, then after adding a parity bit to the data binary string
it will become a 9 bit binary data string.

Parity check is also called as “Vertical Redundancy Check (VRC)”.

There is two types of parity bits in error detection, they are

 Even parity

 Odd parity

Even Parity

 If the data has even number of 1’s, the parity bit is 0. Ex: data is 10000001 ->
parity bit 0

136
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Odd number of 1’s, the parity bit is 1. Ex: data is 10010001 -> parity bit 1

Odd Parity

 If the data has odd number of 1’s, the parity bit is 0. Ex: data is 10011101 ->
parity bit 0

 Even number of 1’s, the parity bit is 1. Ex: data is 10010101 -> parity bit 1

NOTE:

The counting of data bits will include the parity bit also.

The circuit which adds a parity bit to the data at transmitter is called “Parity generator”.
The parity bits are transmitted and they are checked at the receiver. If the parity bits sent
at the transmitter and the parity bits received at receiver are not equal then an error is
detected. The circuit which checks the parity at receiver is called “Parity checker”.

Messages with even parity and odd parity

[Link] Redundancy Check

Cyclic Redundancy Check (CRC) An error detection mechanism in which a special


number is appended to a block of data in order to detect any changes introduced during
storage (or transmission). The CRC is recalculated on retrieval (or reception) and
compared to the value originally transmitted, which can reveal certain types of error. For
example, a single corrupted bit in the data results in a one-bit change in the calculated
CRC, but multiple corrupt bits may cancel each other out.

137
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

CRC is derived using a more complex algorithm than the simple CHECKSUM,
involving MODULO ARITHMETIC (hence the 'cyclic' name) and treating each input
word as a set of coefficients for a polynomial.

• CRC is more powerful than VRC and LRC in detecting errors.

• It is not based on binary addition like VRC and LRC. Rather it is based on binary
division.

• At the sender side, the data unit to be transmitted IS divided by a predetermined divisor
(binary number) in order to obtain the remainder. This remainder is called CRC.

• The CRC has one bit less than the divisor. It means that if CRC is of n bits, divisor is of
n+ 1 bit.

divisor).
• If the remainder after division is zero then there is no error in the data unit & receiver
accepts it.
• If remainder after division is not zero, it indicates that the data unit has been damaged in
transit and therefore it is rejected.
• This technique is more powerful than the parity check and checksum error detection.
• CRC is based on binary division. A sequence of redundant bits called CRC or CRC
remainder is appended at the end of a data unit such as byte.
Requirements of CRC :
A CRC will be valid if and only if it satisfies the following requirements:
1. It should have exactly one less bit than divisor.
2. Appending the CRC to the end of the data unit should result in the bit sequence which
is exactly divisible by the divisor.
• The various steps followed in the CRC method are
1. A string of n as is appended to the data unit. The length of predetermined divisor is n+
1.
2. The newly formed data unit i.e. original data + string of n as are divided by the divisor
using binary division and remainder is obtained. This remainder is called CRC.

138
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

3. Now, string of n Os appended to data unit is replaced by the CRC remainder (which is
also of n bit).
4. The data unit + CRC is then transmitted to receiver.
5. The receiver on receiving it divides data unit + CRC by the same divisor & checks the
remainder.
6. If the remainder of division is zero, receiver assumes that there is no error in data and it
accepts it.
7. If remainder is non-zero then there is an error in data and receiver rejects it.
• For example, if data to be transmitted is 1001 and predetermined divisor is 1011. The
procedure given below is used:
1. String of 3 zeroes is appended to 1011 as divisor is of 4 bits. Now newly formed data is
1011000.

1. Data unit 1011000 is divided by 1011.

139
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

2. During this process of division, whenever the leftmost bit of dividend or remainder is
0, we use a string of Os of same length as divisor. Thus in this case divisor 1011 is
replaced by 0000.
3. At the receiver side, data received is 1001110.
4. This data is again divided by a divisor 1011.
5. The remainder obtained is 000; it means there is no error.

• CRC can detect all the burst errors that affect an odd number of bits.
• The probability of error detection and the types of detectable errors depends on the
choice of divisor.
• Thus two major requirement of CRC are:
(a) CRC should have exactly one bit less than divisor.

140
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

(b) Appending the CRC to the end of the data unit should result in the bit sequence which
is exactly divisible by the divisor.
Polynomial codes

• A pattern of Os and 1s can be represented as a polynomial with coefficient of o and 1.


• Here, the power of each term shows the position of the bit and the coefficient shows the
values of the bit.
• For example, if binary pattern is 100101, its corresponding polynomial representation is
x5 + x2 + 1. Figure shows the polynomial where all the terms with zero coefficient are
removed and x J is replaced by x and XO by 1.

• The benefits of using polynomial codes is that it produces short codes. For example here
a 6-bit pattern is replaced by 3 terms.
• In polynomial codes, the degree is 1 less than the number of bits in the binary pattern.
The degree of polynomial is the highest power in polynomial. For example as shown in
fig degree of polynomial x5 +x2 + 1 are 5. The bit pattern in this case is 6.
• Addition of two polynomials is based on modulo-2 method. In such as case, addition
and subtraction is same.
• Addition or subtraction is .done by combining terms and deleting pairs of identical
terms. For example adding x5+ x4 + x2 and x6 + x4 + x2 give x6 + x5. The terms x4 and
x2 are deleted.
• If three polynomials are to be added and if we get a same term three times, a pair of
them is detected and the third term is kept. For example, if there is x2 three times then we
keep only one x2
• In case of multiplication of two polynomials, their powers are added. For example,
multiplying x5 + x3 + x2 + x with x2+ x+ 1 yields:
(X5 + x3 + x2 + x) (x2 + x + 1)
= x7 + x6+ x5+ x5+ x4+ x3+ x4+ x3+ x2+ x3+ x2+ x
=X7+x6+x3+X
In this, first polynomial is multiplied by all terms of second. The result is then simplified
and pairs of equal terms are deleted.
• Incase of division, the two polynomials are divided as per the rules of binary division,
until the degree of dividend is less than that of divisor.
CRC generator using polynomials

141
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• If we consider the data unit 1001 and divisor or polynomial generator 1011their
polynomial representation is:

• Now string of n 0s (one less than that of divisor) is appended to data. Now data is
1001000 and its corresponding polynomial representation is x6 + x3.
• The division of x6+x3 by x3+x+ 1 is shown in fig.
• The polynomial generator should have following properties:
1. It should have at least two terms.
2. The coefficient of the term x0 should be 1.
3. It should not be divisible by x.
4. It should be divisible by x+ 1.
• There are several different standard polynomials used by popular protocols for CRC
generation. These are:

3. Checksum
 In checksum error detection scheme, the data is divided into k segments each of m
bits.

142
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 In the sender’s end the segments are added using 1’s complement arithmetic to get
the sum. The sum is complemented to get the checksum.
 The checksum segment is sent along with the data segments.
 At the receiver’s end, all received segments are added using 1’s complement
arithmetic to get the sum. The sum is complemented.
 If the result is zero, the received data is accepted; otherwise discarded.

Elementary Data Link Protocols

An Unrestricted Simplex Protocol

Data is transmitted in one direction only. Both the transmitting and receiving network
layers are always ready. Processing time can be ignored. Infinite buffer space is available.
And best of all, the communication channel between the data link
layers never damages or loses frames. The protocol consists of two distinct
procedures, a sender and a receiver. The sender runs in the data link layer of
the source machine, and the receiver runs in the data link layer of the
destination machine. No sequence numbers or acknowledgements are used
here, so MAX_SEQ is not needed. The only event type possible is

143
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

frame_arrival (i.e., the arrival of an undamaged frame).


The sender is in an infinite while loop just pumping data out onto the line as
fast as it can. The body of the loop consists of three actions: go fetch a packet
from the (always obliging) network layer, construct an outbound frame using
the variable s, and send the frame on its way. Only the info field of the frame
is used by this protocol, because the other fields have to do with error and
flow control and there are no errors or flow control restrictions here. The
receiver is equally simple. Initially, it waits for something to happen, the only
possibility being the arrival of an undamaged frame. The data portion is
passed on to the network layer, and the data link layer settles back to wait for
the next frame, effectively suspending itself until the frame arrives.

A Simplex Stop-and-Wait Protocol

Sender:

Rule 1) Send one data packet at a time.


Rule 2) Send next packet only after receiving acknowledgement for previous.

Receiver:

Rule 1) Send acknowledgement after receiving and consuming of data packet.


Rule 2) After consuming packet acknowledgement need to be sent (Flow Control)

Problems :

144
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

1. Lost Data

2. Lost Acknowledgement:

3. Delayed Acknowledgement/Data: After timeout on sender side, a long delayed


acknowledgement might be wrongly considered as acknowledgement of some other
recent packet.

A Simplex Protocol for a Noisy Channel


In this protocol the unreal "error free" assumption in protocol 2 is dropped. Frames may
be either damaged or lost completely. We assume that transmission errors in the frame are
detected by the hardware checksum.

145
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

One suggestion is that the sender would send a frame, the receiver would send an ACK
frame only if the frame is received correctly. If the frame is in error the receiver simply
ignores it; the transmitter would time out and would retransmit it.

One fatal flaw with the above scheme is that if the ACK frame is lost or damaged,
duplicate frames are accepted at the receiver without the receiver knowing it.

Imagine a situation where the receiver has just sent an ACK frame back to the sender
saying that it correctly received and already passed a frame to its host. However, the ACK
frame gets lost completely, the sender times out and retransmits the frame. There is no
way for the receiver to tell whether this frame is a retransmitted frame or a new frame, so
the receiver accepts this duplicate happily and transfers it to the host. The protocol thus
fails in this aspect.

To overcome this problem it is required that the receiver be able to distinguish a frame
that it is seeing for the first time from a retransmission. One way to achieve this is to have
the sender put a sequence number in the header of each frame it sends. The receiver then
can check the sequence number of each arriving frame to see if it is a new frame or a
duplicate to be discarded.

The receiver needs to distinguish only 2 possibilities: a new frame or a duplicate; a 1-bit
sequence number is sufficient. At any instant the receiver expects a particular sequence
number. Any wrong sequence numbered frame arriving at the receiver is rejected as a
duplicate. A correctly numbered frame arriving at the receiver is accepted, passed to the
host, and the expected sequence number is incremented by 1 (modulo 2).

Sliding Window Protocols


• Window: number of “outstanding” frames at any given point in time.
– So what’s the window size of Stop and Wait?
• Every ACK received, window slides.

146
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

A sliding window of size 1, with a 3-bit sequence number.(a) Initially; (b) After the
first frame has been sent; (c) After the first frame has been received;(d) After the
first acknowledgement has been received

• Allows multiple frames to be in transit at the same time.


• Receiver allocates buffer space for n frames.
• Transmitter is allowed to send n (window size) frames without receiving
ACK.
• Sequence number?

Sliding Window: Receiver


• Receiver maintains window corresponding with frames it can receive.
• Receiver ack’s frame by including sequence number of next expected frame.
– Cumulative ACK: ack’s multiple frames.
• Example: if receiver receives frames 2,3, and 4, it sends an ACK with
sequence number 5, which ack’s receipt of 2, 3, and 4.

Sliding Window: Sender


• Sender maintains window corresponding to frames (sequence numbers) it’s
allowed to send.
• Sequence numbers are bounded; if frame reserves k-bit field for sequence
numbers, then they can range from 0 … 2k -1.
• Transmission window shrinks each time frame is sent, and grows each time
an ACK is received.

Example: 3-bit sequence number and window size 7

147
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

One-Bit Sliding Window Protocol

148
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Two scenarios:
(a) Normal case.
(b) Abnormal case. Notation is (seq, ack, packet number). An * indicates where a
network layer accepts packet. ACK indicates last sequence number received.

Bandwidth-Delay Product
• How large should the sender’s window be?
• Function of how “fat and long” the pipe is

Pipelining

a) Receiver’s window size is 1: discard frames after error with no ACK.


b) Receiver’s window size is large: buffers all frames until error recovered

• Pipelining and error recovery. Effect on error when (a) Receiver’s window
size is 1. (b) Receiver’s window size is large.

Piggybacking technique
In most practical situations there is a need for transmitting data in both directions (i.e.
between 2 computers). A full duplex circuit is required for the operation.

149
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

If protocol 2 or 3 is used in these situations the data frames and ACK (control) frames in
the reverse direction have to be interleaved. This method is acceptable but not efficient.
An efficient method is to absorb the ACK frame into the header of the data frame going
in the same direction. This technique is known as piggybacking.

When a data frame arrives at an IMP (receiver or station), instead of immediately sending
a separate ACK frame, the IMP restrains itself and waits until the host passes it the next
message. The acknowledgement is then attached to the outgoing data frame using the
ACK field in the frame header. In effect, the acknowledgement gets a free ride in the next
outgoing data frame.

This technique makes better use of the channel bandwidth. The ACK field costs only a
few bits, whereas a separate frame would need a header, the acknowledgement, and a
checksum.

An issue arising here is the time period that the IMP waits for a message onto which to
piggyback the ACK. Obviously the IMP cannot wait forever and there is no way to tell
exactly when the next message is available. For these reasons the waiting period is
usually a fixed period. If a new host packet arrives quickly the acknowledgement is
piggybacked onto it; otherwise, the IMP just sends a separate ACK frame

A Protocol Using Go Back N

 Stop and wait ARQ mechanism does not utilize the resources at their best. When
the acknowledgement is received, the sender sits idle and does nothing. In Go-
Back-N ARQ method, both sender and receiver maintain a window.

150
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 The sending-window size enables the sender to send multiple frames without
receiving the acknowledgement of the previous ones. The receiving-window
enables the receiver to receive multiple frames and acknowledge them. The
receiver keeps track of incoming frame’s sequence number.
 When the sender sends all the frames in window, it checks up to what sequence
number it has received positive acknowledgement. If all frames are positively
acknowledged, the sender sends next set of frames. If sender finds that it has
received NACK or has not receive any ACK for a particular frame, it retransmits
all the frames after which it does not receive any positive ACK.

A Protocol Using Selective Repeat


Selective Repeat

Selective repeat is also the sliding window protocol which detects or corrects the error
occurred in datalink layer. The selective repeat protocol retransmits only that frame which
is damaged or lost. In selective repeat protocol, the retransmitted framed is received out
of sequence. The selective repeat protocol can perform following actions

 The receiver is capable of sorting the frame in a proper sequence, as it receives


the retransmitted frame whose sequence is out of order of the receiving frame.

 The sender must be capable of searching the frame for which the NAK has been
received.

 The receiver must contain the buffer to store all the previously received frame on
hold till the retransmitted frame is sorted and placed in a proper sequence.

151
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 The ACK number, like NAK number, refers to the frame which is lost or
damaged.

 It requires the less window size as compared to go-back-n protocol.

Damaged frames

If a receiver receives a damaged frame, it sends the NAK for the frame in which error or
damage is detected. The NAK number, like in go-back-n also indicate the
acknowledgement of the previously received frames and error in the current frame. The
receiver keeps receiving the new frames while waiting for the damaged frame to be
replaced. The frames that are received after the damaged frame are not be acknowledged
until the damaged frame has been replaced.

Lost Frame

As in a selective repeat protocol, a frame can be received out of order and further they are
sorted to maintain a proper sequence of the frames. While sorting, if a frame number is
skipped, the receiver recognize that a frame is lost and it sends NAK for that frame to the
sender. After receiving NAK for the lost frame the sender searches that frame in its
window and retransmits that frame. If the last transmitted frame is lost then receiver does
not respond and this silence is a negative acknowledgement for the sender.

Lost Acknowledgement

If the sender does not receive any ACK or the ACK is lost or damaged in between the
transmission. The sender waits for the time to run out and as the time run outs, the sender
retransmit all the frames for which it has not received the ACK. The sender identifies the
loss of ACK with the help of a timer.

152
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Related Questions:-
Q1. Explain the various design issues of data link layer
[Link] is the role played by data layer?
[Link] of selective repeat over Go Back N.
Q4. How is flow control done at data link layer? Explain any two methods of flow
control at data link layer.
[Link] cyclic redundancy code.

153
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Chapter 6: : Network Layer

Topics Covered

[Link] Issues Of Network Layer


[Link]
[Link]
[Link] Control

Design Issues Of Network Layer

The network layer has been designed with the following goals:

1. The services provided should be independent of the underlying technology. Users


of the service need not be aware of the physical implementation of the network -
for all they know, messages could be transported via carrier pigeon. This design
goal has great importance when we consider the great variety of networks in
operation. The design of the layer must not disable us from connecting to
networks of different technologies.

2. The transport layer (that is the host computer) should be shielded from the
number, type and different topologies of the subnets he uses. That is, all the
transport layer wants is a communication link, it need not know how that link is
made.

3. Finally, there is a need for some uniform addressing scheme for network
addresses.

With these goals in mind, two different types of service emerged: Connection oriented
and connectionless. A connection-oriented service is one in which the user is given a
"reliable" end to end connection. To communicate, the user requests a connection, then
uses the connection, and then closes the connection. A telephone call is the classic
example of a connection oriented service.

In a connection-less service, the user simply bundles his information together, puts an
address on it, and then sends it off, in the hope that it will reach its destination. There is
no guarantee that the bundle will arrive. So - a connection less service is one reminiscent
of the postal system. A letter is sent, that is, put in the post box. It is then in the "postal

154
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

network" where it gets bounced around and hopefully will leave the network in the
correct place, that is, in the addressee's letter box.

Internetworking

Repeater – A repeater operates at the physical layer. Its job is to regenerate the signal
over the same network before the signal becomes too weak or corrupted so as to extend
the length to which the signal can be transmitted over the same network. An important
point to be noted about repeaters is that they do no amplify the signal. When the signal
becomes weak, they copy the signal bit by bit and regenerate it at the original strength. It
is a 2 port device.

Routers – A router is a device like a switch that routes data packets based on their IP
addresses. Router is mainly a Network Layer device. Routers normally connect LANs
and WANs together and have a dynamically updating routing table based on which they
make decisions on routing the data packets. Router divide broadcast domains of hosts
connected through it.

Gateway – A gateway, as the name suggests, is a passage to connect two networks


together that may work upon different networking models. They basically works as the
messenger agents that take data from one system, interpret it, and transfer it to another
system. Gateways are also called protocol converters and can operate at any network
layer. Gateways are generally more complex than switch or router.

A gateway links two systems that do not use the same:

 Communication protocols

 Data formatting structures

 Languages

 Architecture

For example, electronic mail gateways, such as X.400 gateway, receive messages in one
format, and then translate it, and forward in X.400 format used by the receiver, and vice
versa.

155
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Like repeaters, bridges are used to connect similar LANs together, for example, Ethernet-
to-Ethernet and operate at the bottom two layers of the OSI model, i.e. physical layer and
data link layer. As it operates on second layer of the OSI model,' it relays only necessary
data to other signals. MAC addresses (physical addresses) are used to determine whether
data is necessary or not.

It passes information from one LAN segment to another based on the destination address
of the packet. In other words, when a bridge receives data through one of its ports, it
checks the data for a MAC address. If this address matches that of the node connected to
other port, the bridge sends this data through this port. This action is called forwarding. If
the address does not match with any node connected to other port, the bridge discards it.
This action is called filtering. Unlike repeaters, bridges have buffers to store and forward
packets in the event that the destination link is congested with traffic.

The main advantage of bridge over repeater is that it has filtering action. If any noise on
Ethernet occurs because of collision or disturbance in electrical signal, the bridge will
consider it as an incorrectly formed frame and win not forward to the segment connected
to other port of the bridge. Note that bridge can relay broadcast packets and packets with
unknown destination.

So far, we have seen that at the maximum four repeaters can be used to connect multiple
Ethernet segments. However, if a bridge is provided between repeaters, this limit of four
is increased. The maximum number of bridges is not specifically limited.

From architecture point of view bridges are protocol independent devices and are very
simple. They do not perform complex processes on the data packets traveling through
them such as the evaluation of the network as a whole in order to make end-to-end
routing decisions. They simply read the destination address of the incoming data packet

156
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

and forward it along its way to the next link. Therefore, bridges are Inexpensive and fast.
There are bridges called cascading bridges, and are used to support multiple LANs
connected by multiple media.

Dissimilar LANs such as Ethernet-to-token ring can also be connected with the help of
bridge known as encapsulating bridge. The function of encapsulating bridge is also very
simple. It encapsulates the originating LAN data along with control information of the
end user LAN. Bridges with routing function between LANs are also available.

Computer 1 wishes to talk to computer 3 on the same network. The packet sent by
computer 1 will contain the physical address of computer 3 that will also be received by
the bridge device connecting the two LAN segments. The bridge will read the physical
address contained in the packet and observe that this address belongs to the computer on
the same LAN segment. Hence, bridge will filter this packet and will not allow it to be
transmitted on other side of the network. In case computer 1 wishes to talk with computer
C on other segment, the bridge will know from its table of addresses that this address
belongs to the computer attached to other segment of the network. In this case this will be
forwarded to the other segment of the LAN. The bridge learns location of computers
attached the network by watching frames. This will be explained liter on in the
subsequent discussion. Note that case of broadcast and multicast packets, bridge forwards
these packets to all computers attached to the segment on both sides.

Media Access Control (MAC) Bridge

This is used to connect dissimilar LANs such as Ethernet -to-token ring using
encapsulation or translation. This bridge translates the original' packet format from the
requesting LAN segment by encapsulating or enveloping with control data specific to the
protocol of the destination LAN segment.

Address Table

157
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

As explained above, each bridge should have an address table that indicates the location
of different computers or nodes on the segments of LAN. More specifically, it indicates
the connection between nodes and ports. When a bridge is booted first time, this table is
found to be blank. Now, this question arises how this table is filled with appropriate
addresses of different nodes attached to ports. Most of the bridges are called adaptive or
self-leaning bridges because they learn the location of the node and associated port
themselves and make a list of nodes attached to each segment.

When a bridge receives a data packet from a computer, it first copies the physical address
of that computer contained in the packet into its list. Afterward, bridge determines
whether this packet should be forwarded or not. In other words, the bridge learns the
location of the computer on the network as soon as the computer on the network sends
some packet.

If a computer does not send a packet, the bridge will never be able to determine its
position and unnecessarily forward the packet on network. Fortunately, this cannot
happen because a computer with network software attached to a network transmits at
least one frame when the system first boots. Furthermore, computer communication
being bidirectional, there is always an acknowledgement for each received packets,

Bridge Protocols

Loop problem in Transparent Bridges

Loop Problem:

Transparent bridges work fine as long as there are no redundant bridges in the system.
Systems administrators, however, like to have redundant bridges (more than one bridge
between a pair of LANs) to make the system more reliable. If a bridge fails, another
bridge takes over until the failed one is repaired or replaced. Redundancy can create
loops in the system, which is very undesirable. The following figure shows a very simple
example of a loop created in a system with two LANs connected by two bridges.

158
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

1. Station A sends a frame to station D. The tables of both bridges are empty. Both
forward the frame and update their tables based on the source address A.

2. Now there are two copies of the frame on LAN 2. The copy sent out by bridge 1 is
received by bridge 2, which does not have any information about the destination address
D; it floods the bridge. The copy sent out by bridge 2 is received by bridge 1 and is sent
out for lack of information about D. Note that each frame is handled separately because
bridges, as two nodes on a network sharing the medium, use an access method such as
CSMA/CD. The tables of both bridges are updated, but still there is no information for
destination D.

3. Now there are two copies of the frame on LAN 1. Step 2 is repeated, and both copies
flood the network.

4. The process continues on and on. Note that bridges are also repeaters and regenerate
frames. So in each iteration, there are newly generated fresh copies of the frames.

159
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

To solve the looping problem, the bridges use the spanning tree algorithm to create a loop
less topology.

Spanning Tree:

In graph theory, a spanning tree is a graph in which there is no loop. In a bridged LAN,
this means creating a topology in which each LAN can be reached from any other LAN
through one path only (no loop). We cannot change the physical topology of the system
because of physical connections between cables and bridges, but we can create a logical
topology that overlay the physical one. The following figure shows a system with four
LANs and five bridges. We have shown both LANs and bridges as nodes. The connecting
arcs show the connection of a LAN to a bridge and vice versa.

160
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

To find the spanning tree, we need to assign a cost (metric) to each arc. The interpretation
of the cost is left up to the systems administrator. It may be the path with minimum hops
(nodes), the path with minimum delay, or the path with maximum bandwidth. If two ports
have the same shortest value, the systems administrator just chooses one. We have chosen
the minimum hops.

However, the hop count is normally 1 from a bridge to the LAN and 0 in the reverse
direction.

The process to find the spanning tree involves three steps:

1. Every bridge has a built-in ID (normally the serial number, which is unique). Each
bridge broadcasts this ID so that all bridges know which one has the smallest ID. The
bridge with the smallest ID is selected as the root bridge (root of the tree). We assume
that bridge B1 has the smallest ID. It is, therefore, selected as the root bridge.

2. The algorithm tries to find the shortest path (a path with the shortest cost) from the root
bridge to every other bridge or LAN. The shortest path can be found by examining the
total cost from the root bridge to the destination.

The following figure shows the shortest paths.

161
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Dynamic Algorithm:

We have described the spanning tree algorithm as though it required manual entries. This
is not true. Each bridge is equipped with a software package that carries out this process
dynamically. The bridges send special messages to one another, called bridge protocol
data units (BPDUs), to update the spanning tree. The spanning tree is updated when there
is a change in the system such as a failure of a bridge or an addition or deletion of
bridges.

Source Routing Bridges:

162
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Another way to prevent loops in a system with redundant bridges is to use source routing
bridges. A transparent bridge's duties include filtering frames, forwarding, and blocking.
In a system that has source routing bridges; these duties are performed by the source
station and, to some extent, the destination station.
In source routing, a sending station defines the bridges that the frame must visit. The
addresses of these bridges are included in the frame. In other words, the frame contains
not only the source and destination addresses, but also the addresses of all bridges to be
visited.

The source gets these bridge addresses through the exchange of special frames with the
destination prior to sending the data frame.

Fragmentation
An IP packet that is larger than the Maximum Transmission Unit(MTU) of an interface, is
too large for transmission over that interface. The packet must either be fragmented, or
discarded (and an ICMP error message returned to the sender). In either case, the original
data will be fragmented into smaller packets (less than the smallest MTU) in order to
allow it to be received by the final destination system.

There are two approaches to doing this fragmentation:

 IP Router Segmentation - performing the fragmentation in the routers

 IP Path MTU Discovery - forcing the sender to perform the fragmentation

IP Fragmentation processing at a Router


The simplest approach from the end-system point of view is not to worry about the MTU
size. In this simple approach, the sender simply has to ensure that each packet is less than
the MTU of the link on which it is sent. (The router always knows this from the link
interface configuration information).

163
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Large IP packets that exceed the MTU of the link between R1 and R2 are fragmented by
R1 in to two or more IP packets each smaller than the MTU size.
The network layer then has to arrange to cut packets up into smaller fragments whenever
a router encounters a link with an MTU smaller than the received IP packet size. All the
fragments of an IP packet carry the same ID in the IP packet header (allowing the final
receiver to reassemble the fragmented parts into the original PDU). This is called "IP
fragmentation" or "IP segmentation". The problem is, this offloads a lot of work on
to routers, and in the worst case, can also result in packets being segmented by several IP
routers one after another, resulting in very peculiar fragmentation.

Fragmentation Method
To fragment/segment a long internet packet, a router (R1 in the figure below) creates a
new IP packet and copies the contents of the IP header fields from the long packet into
the new IP header. The data of the long packet is then divided into two portions on a 8
byte (64 bit) boundary, so that the first packet is less than the MTU of the out-going
interface. The more-fragments flag (MF) in the first packet is set to one (to indicate that
more fragments of this packet follow). The More Flag may already be set in this packet if
it has already been fragmented by another system. This packet is forwarded.

The second created new packet is then processed. The packet header field is identical to
that of the original packet (including the same value of the packet ID, the total length
field, the more-fragments flag (MF) and the fragment offset field in the original packet).
The packet header field is updated with a new offset field, by adding the number of
payload bytes sent in the first fragment. If this new packet is larger than the allowed link
MTU, the packet is again fragmented.

IP Router Fragmentation

164
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Any packet that has a more fragments (MF) flag set, must have an integral multiple of 8
bytes. (The final fragment, which does not have this flag set, may have an arbitrary
number of bytes).

IP Router fragmentation is not recommended in the modern Internet, and this feature was
not carried-forward when the next generation Internet Protocol (IPv6) was specified.

IP Fragmentation processing at a Sender


Path MTU Discovery allows a sender to fragment/segment a long internet packet, rather
than relying on routers to perform IP-level fragmentation. This is more efficient and more
scalable. It is therefore the recommended method in the current Internet. This is also the
only method supported in IPv6.

IP Reassembly processing at the Receiving End System


IP fragmentation and reassembly employs updating and using the values in the second 32
bits of the IPv4 packet header. An end system that accepts an IP packet (with a
destination IP address that matches its own IP source address) will also reassemble any
fragmented IP packets before these are passed to the next higher protocol layer.

The system stores all received fragments (i.e., IP packets with a more-fragments flag
(MF) set to one, or where the fragment offset is non-zero), in one of a number of buffers
(memory space). Packets with the same 16-bit Identification value are stored in the same
buffer, at the offset specified by the fragment offset field specified in the packet header.

Packets which are incomplete remain stored in the buffer until either all fragments are
received, OR a timer expires, indicating that the receiver does not expect to receive any
more fragments. Completed packets are forwarded to the next higher protocol layer.

Transparent Fragmentation

With transparent fragmentation end hosts (sender and receiver) are unaware that
fragmentation has taken place. A gateway fragments a packet, and the next-hop gateway
on the same network reassembles the fragments back into the original packet.
Drawbacks?

1. All fragments must travel through the same gateway. Why? So they can be
reassembled by the next-hop gateway.

2. Gateways must be careful to avoid reassemble lockup. (The deadlock problem


discussed earlier, where a gateway has used up all of its buffer space to hold
fragments and can no longer accept new ones).

165
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

3. Reassembling fragments uses precious gateway resources that could otherwise be


used forwarding packets).

Another approach is to have gateways fragment packets, while hosts perform reassemble
(if needed). However, now every host must be prepared to do reassemble.

Problems associated with fragmenting:

1. Fragmenting increases waste: the sum of the bits of the individual fragments
exceeds the number of bits in the original message.

2. Loss of a single fragment requires an end-to-end retransmission. That is, the loss
of a single fragment has the same effect as losing the entire packet.

3. More work to forward three small packets than one large one. The cost of
forwarding packets includes a fixed per-packet cost, that includes doing the route
lookup, fielding interrupts, etc.

The IP Protocol

Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is
one of the core protocols of standards-based internetworking methods in the Internet, and
was the first version deployed for production in the ARPANET in 1983. It still routes
most Internet traffic today, despite the ongoing deployment of a successor protocol, IPv6.

IPv4 is a connectionless protocol for use on packet-switched networks. It operates on


a best effort delivery model, in that it does not guarantee delivery, nor does it assure
proper sequencing or avoidance of duplicate delivery. These aspects, including data
integrity, are addressed by an upper layer transport protocol, such as the Transmission
Control Protocol(TCP).

Decomposition of the quad-dotted IPv4 address representation to its binary value


IPv4 uses 32-bit addresses which limits the address space to (232) addresses.
IPv4 reserves special address blocks for private networks (~18 million addresses)
and multicast addresses (~270 million addresses).
Internet Protocol being a layer-3 protocol (OSI) takes data Segments from layer-4
(Transport) and divides it into packets. IP packet encapsulates data unit received from
above layer and add to its own header information.

166
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The encapsulated data is referred to as IP Payload. IP header contains all the necessary
information to deliver the packet at the other end.

IP header includes many relevant information including Version Number, which, in this
context, is 4. Other details are as follows:
 Version: Version no. of Internet Protocol used (e.g. IPv4).
 IHL: Internet Header Length; Length of entire IP header.
 DSCP: Differentiated Services Code Point; this is Type of Service.
 ECN: Explicit Congestion Notification; It carries information about the
congestion seen in the route.
 Total Length: Length of entire IP Packet (including IP header and IP Payload).
 Identification: If IP packet is fragmented during the transmission, all the
fragments contain same identification number. to identify original IP packet they
belong to.
 Flags: As required by the network resources, if IP Packet is too large to handle,
these ‘flags’ tells if they can be fragmented or not. In this 3-bit flag, the MSB is
always set to ‘0’.
 Fragment Offset: This offset tells the exact position of the fragment in the
original IP Packet.
 Time to Live: To avoid looping in the network, every packet is sent with some
TTL value set, which tells the network how many routers (hops) this packet can
cross. At each hop, its value is decremented by one and when the value reaches
zero, the packet is discarded.

167
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Protocol: Tells the Network layer at the destination host, to which Protocol this
packet belongs to, i.e. the next level Protocol. For example protocol number of
ICMP is 1, TCP is 6 and UDP is 17.
 Header Checksum: This field is used to keep checksum value of entire header
which is then used to check if the packet is received error-free.
 Source Address: 32-bit address of the Sender (or source) of the packet.
 Destination Address: 32-bit address of the Receiver (or destination) of the packet.
 Options: This is optional field, which is used if the value of IHL is greater than 5.
These options may contain values for options such as Security, Record Route,
Time Stamp, etc.

IP Addressing
IP address is an address having information about how to reach a specific host, especially
outside the LAN. An IP address is a 32 bit unique address having an address space of 232.
Generally, there are two notations in which IP address is written, dotted decimal notation
and hexadecimal notation.
Dotted Decimal Notation

Hexadecimal Notation

Some points to be noted about dotted decimal notation :


1. The value of any segment (byte) is between 0 and 255 (both included).
2. There are no zeroes preceding the value in any segment (054 is wrong, 54 is correct).

Classful Addressing
The 32 bit IP address is divided into five sub-classes. These are:
 Class A
 Class B
 Class C
 Class D
 Class E

168
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Each of these classes has a valid range of IP addresses. Classes D and E are reserved for
multicast and experimental purposes respectively. The order of bits in the first octet
determine the classes of IP address.
IPv4 address is divided into two parts:
 Network ID
 Host ID
The class of IP address is used to determine the bits used for network ID and host ID and
the number of total networks and hosts possible in that particular class. Each ISP or
network administrator assigns IP address to each device that is connected to its network.

Note: IP addresses are globally managed by Internet Assigned Numbers


Authority(IANA) and regional Internet registries(RIR).
Note: While finding the total number of host IP addresses, 2 IP addresses are not counted
and are therefore, decreased from the total count because the first IP address of any
network is the network number and whereas the last IP address is reserved for broadcast
IP.
Class A:
IP address belonging to class A are assigned to the networks that contain a large number
of hosts.
 The network ID is 8 bits long.
 The host ID is 24 bits long.
The higher order bits of the first octet in class A is always set to 0. The remaining 7 bits
in first octet are used to determine network ID. The 24 bits of host ID are used to
determine the host in any network. The default sub-net mask for class A is 255.x.x.x.
Therefore, class A has a total of:
 2^7 – 2 = 126 network ID
 2^24 – 2 = 16,777,214 host ID
IP addresses belonging to class A ranges from 1.x.x.x – 126.x.x.x

Class B:

169
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

IP address belonging to class B are assigned to the networks that ranges from medium-
sized to large-sized networks.
 The network ID is 16 bits long.
 The host ID is 16 bits long.
The higher order bits of the first octet of IP addresses of class B are always set to 10. The
remaining 14 bits are used to determine network ID. The 16 bits of host ID is used to
determine the host in any network. The default sub-net mask for class B is 255.255.x.x.
Class B has a total of:
 2^14 = 16384 network address
 2^16 – 2 = 65534 host address
IP addresses belonging to class B ranges from 128.0.x.x – 191.255.x.x.

Class C:
IP address belonging to class C are assigned to small-sized networks.
 The network ID is 24 bits long.
 The host ID is 8 bits long.
The higher order bits of the first octet of IP addresses of class C are always set to 110.
The remaining 21 bits are used to determine network ID. The 8 bits of host ID is used to
determine the host in any network. The default sub-net mask for class C is 255.255.255.x.
Class C has a total of:
 2^21 = 2097152 network address
 2^8 – 2 = 254 host address
IP addresses belonging to class C ranges from 192.0.0.x – 223.255.255.x.

Class D:
IP address belonging to class D are reserved for multi-casting. The higher order bits of
the first octet of IP addresses belonging to class D are always set to 1110. The remaining
bits are for the address that interested hosts recognize.

170
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Class D does not posses any sub-net mask. IP addresses belonging to class D ranges from
[Link] – [Link].

Class E:
IP addresses belonging to class E are reserved for experimental and research purposes. IP
addresses of class E ranges from [Link] – [Link]. This class doesn’t have
any sub-net mask. The higher order bits of first octet of class E are always set to 1111.

Range of special IP addresses:


[Link] – [Link] : Link local addresses
[Link] – [Link] : Loop-back addresses
[Link] – [Link] : used to communicate within the current network.
Rules for assigning Host ID:
Host ID’s are used to identify a host within a network. The host ID are assigned based on
the following rules:
 Within any network, the host ID must be unique to that network.
 Host ID in which all bits are set to 0 cannot be assigned because
this host ID is used to represent the network ID of the IP address.
 Host ID in which all bits are set to 1 cannot be assigned because
this host ID is reserved as a broadcast address to send packets to all the hosts present
on that particular network.
Rules for assigning Network ID:
Hosts that are located on the same physical network are identified by the network ID, as
all host on the same physical network are assigned the same network ID. The network ID
is assigned based on the following rules:
 The network ID cannot start with 127 because 127 belongs to class
A address and is reserved for internal loop-back functions.
 All bits of network ID set to 1 are reserved for use as an IP
broadcast address and therefore, cannot be used.
 All bits of network ID set to 0 are used to denote a specific host on
the local network and are not routed and therefore, aren’t used.
Summary of Classful addressing :

171
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The IPv6 Protocol

It offers the following features:

 Larger Address Space

In contrast to IPv4, IPv6 uses 4 times more bits to address a device on the
Internet. This much of extra bits can provide approximately 3.4×1038 different
combinations of addresses. This address can accumulate the aggressive
requirement of address allotment for almost everything in this world. According
to an estimate, 1564 addresses can be allocated to every square meter of this
earth.

 Simplified Header

IPv6’s header has been simplified by moving all unnecessary information and
options (which are present in IPv4 header) to the end of the IPv6 header. IPv6
header is only twice as bigger than IPv4 provided the fact that IPv6 address is
four times longer.

 End-to-end Connectivity

Every system now has unique IP address and can traverse through the Internet
without using NAT or other translating components. After IPv6 is fully
implemented, every host can directly reach other hosts on the Internet, with some
limitations involved like Firewall, organization policies, etc.

 Auto-configuration

IPv6 supports both stateful and stateless auto configuration mode of its host
devices. This way, absence of a DHCP server does not put a halt on inter
segment communication.

 Faster Forwarding/Routing

172
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Simplified header puts all unnecessary information at the end of the header. The
information contained in the first part of the header is adequate for a Router to
take routing decisions, thus making routing decision as quickly as looking at the
mandatory header.

 IPSec

Initially it was decided that IPv6 must have IPSec security, making it more
secure than IPv4. This feature has now been made optional.

 No Broadcast

Though Ethernet/Token Ring are considered as broadcast network because they


support Broadcasting, IPv6 does not have any broadcast support any more. It
uses multicast to communicate with multiple hosts.

 Anycast Support

This is another characteristic of IPv6. IPv6 has introduced Anycast mode of


packet routing. In this mode, multiple interfaces over the Internet are assigned
same Anycast IP address. Routers, while routing, send the packet to the nearest
destination.

 Mobility

IPv6 was designed keeping mobility in mind. This feature enables hosts (such as
mobile phone) to roam around in different geographical area and remain
connected with the same IP address. The mobility feature of IPv6 takes
advantage of auto IP configuration and Extension headers.

 Enhanced Priority Support

IPv4 used 6 bits DSCP (Differential Service Code Point) and 2 bits ECN
(Explicit Congestion Notification) to provide Quality of Service but it could only
be used if the end-to-end devices support it, that is, the source and destination
device and underlying network must support it.

In IPv6, Traffic class and Flow label are used to tell the underlying routers how
to efficiently process the packet and route it.

 Smooth Transition

Large IP address scheme in IPv6 enables to allocate devices with globally unique
IP addresses. This mechanism saves IP addresses and NAT is not required. So

173
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

devices can send/receive data among each other, for example, VoIP and/or any
streaming media can be used much efficiently.

Other fact is, the header is less loaded, so routers can take forwarding decisions
and forward them as quickly as they arrive.

 Extensibility

One of the major advantages of IPv6 header is that it is extensible to add more
information in the option part. IPv4 provides only 40-bytes for options, whereas
options in IPv6 can be as much as the size of IPv6 packet itself.

The wonder of IPv6 lies in its header. An IPv6 address is 4 times larger than IPv4, but
surprisingly, the header of an IPv6 address is only 2 times larger than that of IPv4. IPv6
headers have one Fixed Header and zero or more Optional (Extension) Headers. All the
necessary information that is essential for a router is kept in the Fixed Header. The
Extension Header contains optional information that helps routers to understand how to
handle a packet/flow.
Fixed Header

[Ima
ge: IPv6 Fixed Header]
IPv6 fixed header is 40 bytes long and contains the following information.

S.N. Field & Description

1 Version (4-bits): It represents the version of Internet Protocol, i.e. 0110.

2 Traffic Class (8-bits): These 8 bits are divided into two parts. The most significant
6 bits are used for Type of Service to let the Router Known what services should
be provided to this packet. The least significant 2 bits are used for Explicit
Congestion Notification (ECN).

174
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

3 Flow Label (20-bits): This label is used to maintain the sequential flow of the
packets belonging to a communication. The source labels the sequence to help the
router identify that a particular packet belongs to a specific flow of information.
This field helps avoid re-ordering of data packets. It is designed for
streaming/real-time media.

4 Payload Length (16-bits): This field is used to tell the routers how much
information a particular packet contains in its payload. Payload is composed of
Extension Headers and Upper Layer data. With 16 bits, up to 65535 bytes can be
indicated; but if the Extension Headers contain Hop-by-Hop Extension Header,
then the payload may exceed 65535 bytes and this field is set to 0.

5 Next Header (8-bits): This field is used to indicate either the type of Extension
Header, or if the Extension Header is not present then it indicates the Upper Layer
PDU. The values for the type of Upper Layer PDU are same as IPv4’s.

6 Hop Limit (8-bits): This field is used to stop packet to loop in the network
infinitely. This is same as TTL in IPv4. The value of Hop Limit field is
decremented by 1 as it passes a link (router/hop). When the field reaches 0 the
packet is discarded.

7 Source Address (128-bits): This field indicates the address of originator of the
packet.

8 Destination Address (128-bits): This field provides the address of intended


recipient of the packet.

Extension Headers
In IPv6, the Fixed Header contains only that much information which is necessary,
avoiding those information which is either not required or is rarely used. All such
information is put between the Fixed Header and the Upper layer header in the form of
Extension Headers. Each Extension Header is identified by a distinct value.
When Extension Headers are used, IPv6 Fixed Header’s Next Header field points to the
first Extension Header. If there is one more Extension Header, then the first Extension
Header’s ‘Next-Header’ field points to the second one, and so on. The last Extension
Header’s ‘Next-Header’ field points to the Upper Layer Header. Thus, all the headers
points to the next one in a linked list manner.
If the Next Header field contains the value 59, it indicates that there are no headers after
this header, not even Upper Layer Header.
The following Extension Headers must be supported as per RFC 2460:

175
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The sequence of Extension Headers should be:

These headers:
 1. should be processed by First and subsequent destinations.
 2. should be processed by Final Destination.
Extension Headers are arranged one after another in a linked list manner, as depicted in
the following diagram:

IPv6 offers several types of modes by which a single host can be addressed.

Unicast
In unicast mode of addressing, an IPv6 interface (host) is uniquely identified in a
network segment. The IPv6 packet contains both source and destination IP addresses. A
host interface is equipped with an IP address which is unique in that network
[Link] a network switch or a router receives a unicast IP packet, destined to a
single host, it sends out one of its outgoing interface which connects to that particular
host.

176
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Multicast
The IPv6 multicast mode is same as that of IPv4. The packet destined to multiple hosts
is sent on a special multicast address. All the hosts interested in that multicast
information, need to join that multicast group first. All the interfaces that joined the
group receive the multicast packet and process it, while other hosts not interested in
multicast packets ignore the multicast information.

Anycast
IPv6 has introduced a new type of addressing, which is called Anycast addressing. In
this addressing mode, multiple interfaces (hosts) are assigned same Anycast IP address.
When a host wishes to communicate with a host equipped with an Anycast IP address, it
sends a Unicast message. With the help of complex routing mechanism, that Unicast
message is delivered to the host closest to the Sender in terms of Routing cost.

In the above picture, when a client computer tries to reach a server, the request is
forwarded to the server with the lowest Routing Cost.

Routing

177
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Routing is the process of moving packets across a network from one host to a another. It
is usually performed by dedicated devices called routers.
Packets are the fundamental unit of information transport in all modern computer
networks, and increasingly in other communications networks as well. They are
transmitted over packet switched networks, which are networks on which
each message (i.e., data that is transmitted) is cut up into a set of small segments prior to
transmission. Each packet is then transmitted individually and can follow the same path
or a different path to the common destination. Once all of the packets have arrived at the
destination, they are automatically reassembled to recreate the original message.

Routing is a key feature of the Internet and it, together with a great deal of deliberate
redundancy of high capacity transmission lines (e.g., optical fiber cable and microwave),
is a key factor in the robustness (i.e., resistance to equipment failure) of the Internet. Each
intermediary router performs routing by passing along the message to the next router. Part
of this process involves analyzing self-configuring routing tables to determine
the best (i.e., optimal) path.

Routing is sometimes confused with bridging, which performs a somewhat similar


function. The main difference is that the latter occurs at a lower level of the OSI (open
systems interconnect) model and is thus more of a hardware function; the former occurs
at a higher level where the software component is more important, and thus it can
perform more complex analysis to determine the optimal path for each packet.

Routing is also used by circuit switched networks, in which a dedicated circuit is


established for the duration of the transmission of each message. The dominant circuit
switched network is the public switched telephone network(PSTN), which is the
worldwide collection of interconnected public telephone networks that was designed
primarily for voice traffic.

STATIC ROUTING

Static routing is not really a routing protocol. Static routing is simply the process of
manually entering routes into a device's routing table via a configuration file that is
loaded when the routing device starts up. As an alternative, these routes can be entered by
a network administrator who configures the routes manually. Since these manually
configured routes don't change after they are configured (unless a human changes them)
they are called 'static' routes.
Static routing is the simplest form of routing, but it is a manual process.
Use static routing when you have very few devices to configure (<5) and when you know
the routes will probably never change.

178
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Static routing also does not handle failures in external networks well because any route
that is configured manually must be updated or reconfigured manually to fix or repair any
lost connectivity.

DYNAMIC ROUTING

Dynamic routing protocols are supported by software applications running on the routing
device (the router) which dynamically learn network destinations and how to get to them
and also advertise those destinations to other routers. This advertisement function allows
all the routers to learn about all the destination networks that exist and how to to
those networks.
A router using dynamic routing will 'learn' the routes to all networks that are directly
connected to the device. Next, the router will learn routes from other routers that run the
same routing protocol (RIP, RIP2, EIGRP, OSPF, IS-IS, BGP etc). Each router will then
sort through it's list of routes and select one or more 'best' routes for
each network destination the router knows or has learned.
Dynamic routing protocols will then distribute this 'best route' information to
other routers running the same routing protocol, thereby extending the information on
what networks exist and can be reached. This gives dynamic routing protocols the ability
to adapt to logical network topology changes, equipment failures or network outages 'on
the fly'.

Path determination
Path determination will explain how path determination occurs.

Path determination occurs at the network layer. A router uses path determination to
compare a destination address to the available routes in its routing table and select the
best path. The routers learn of these available routes through static routing or dynamic
routing. Routes configured manually by the network administrator are static routes.
Routes learned by others routers using a routing protocol are dynamic routes.

The router uses path determination to decide which port to send a packet out of to reach
its destination. This process is also referred to as routing the packet. Each router that the
packet encounters along the way is called a hop. The hop count is the distanced traveled.
Path determination can be compared to a person who drives from one location in a city to
another. The driver has a map that shows which streets lead to the destination, just as a
router has a routing table. The driver travels from one intersection to another just as a
packet travels from one router to another in each hop. At any intersection, the driver can
choose to turn left, turn right, or go straight ahead. This is similar to how a router chooses
the outbound port through which a packet is sent.

The decisions of a driver are influenced by factors such as traffic, the speed limit, the
number of lanes, tolls, and whether or not a road is frequently closed. Sometimes it is
faster to take a longer route on a smaller, less crowded back street instead of a highway
with a lot of traffic. Similarly, routers can make decisions based on the load, bandwidth,
delay, cost, and reliability of a network link.

179
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The following process is used to determine the path for every packet that is routed:

• The router compares the IP address of the packet that it received to the IP tables that it
has.
• The destination address is obtained from the packet.
• The mask of the first entry in the routing table is applied to the destination address.
• The masked destination and the routing table entry are compared.
• If there is a match, the packet is forwarded to the port that is associated with that table
entry.
• If there is not a match, the next entry in the table is checked.
• If the packet does not match any entries in the table, the router checks to see if a default
route has been set.

• If a default route has been set, the packet is forwarded to the associated port. A default
route is a route that is configured by the network administrator as the route to use if there
are no matches in the routing table.
• If there is no default route, the packet is discarded. A message is often sent back to the
device that sent the data to indicate that the destination was unreachable.
Algorithm Types
• Static versus dynamic

STATIC ROUTING

Static routing is not really a routing protocol. Static routing is simply the process of
manually entering routes into a device's routing table via a configuration file that is
loaded when the routing device starts up. As an alternative, these routes can be entered by
a network administrator who configures the routes manually. Since these manually
configured routes don't change after they are configured (unless a human changes them)
they are called 'static' routes.
Static routing is the simplest form of routing, but it is a manual process.
Use static routing when you have very few devices to configure (<5) and when you know
the routes will probably never change.
Static routing also does not handle failures in external networks well because any route
that is configured manually must be updated or reconfigured manually to fix or repair any
lost connectivity.

DYNAMIC ROUTING

Dynamic routing protocols are supported by software applications running on the routing
device (the router) which dynamically learn network destinations and how to get to them
and also advertise those destinations to other routers. This advertisement function allows
all the routers to learn about all the destination networks that exist and how to to
those networks.
A router using dynamic routing will 'learn' the routes to all networks that are directly
connected to the device. Next, the router will learn routes from other routers that run the
same routing protocol (RIP, RIP2, EIGRP, OSPF, IS-IS, BGP etc). Each router will then

180
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

sort through it's list of routes and select one or more 'best' routes for
each network destination the router knows or has learned.
Dynamic routing protocols will then distribute this 'best route' information to
other routers running the same routing protocol, thereby extending the information on
what networks exist and can be reached. This gives dynamic routing protocols the ability
to adapt to logical network topology changes, equipment failures or network outages 'on
the fly'.

• Single-path versus multipath

Single Path protocols learn routes and select a single best route to each destination. These
protocols are incapable of load balancing traffic. An example of a single-path protocol is
standard Border Gateway Protocol (BGP). BGP will advertise only the single best path it
knows to a destination. It will only insert a single path to a destination in the IP routing
table. However, today there is eBGP Multipath, which allows BGP to perform load
balancing by creating equal cost paths.

Multi-path protocols learn routes and can select more than one path to a destination.
These protocols are better for performing load balancing. OSPF, RIP and several other
protocols will learn several best paths and will route traffic accordingly, dividing up the
bandwidth based on the protocol's metrics, or on the administrator's configuration.

• Flat versus hierarchical

FLAT ROUTING PROTOCOLS

Flat routing protocols distribute information as needed to any router that can be reached
or receive information. No effort is made to organize the network or its traffic, only to
discover the best route hop by hop to a destination by any path. Think of this as all
routers sitting on a flat geometric plane. Routing Information Protocol (RIP) is an
example of a flat routing protocol.

HIERARCHICHAL ROUTING PROTOCOLS

Hierarchical routing protocols often group routers together by function into a hierarchy. A
heirarchical routing protocol allows an administrator to make best use of his fast
powerful routers in the backbone, and the slower, lower-powered routers may be used for
network access at the edge of the network. The access routers form the first tier of the
hierarchy, and the backbone routers form the second tier. Hierarchichal protocols make an
effort to keep local traffic local, that is, they will not forward traffic to the backbone if it
is not necessary to reach a destination. Some hierearchichal routing protocols also
perform route aggregation to reduce the number of routes advertised (only summary
routes are advertised).

181
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Connections and data flow through the access routers, and only enter the backbone when
trying to reach distant parts of the network that have no local connections other than the
backbone routers. This allows traffic to flow freely locally, and concentrates long distance
data onto the backbone links to flow efficiently to the opposite side minimizing
congestion.
Open Shortest Path First (OSPF) and Intermediate-system to Intermediate-System (IS-IS)
are two routing protocols that can be configured to organize a network hierarchically.

In both Link State and Distance Vector algorithms, every router has to save some
information about other routers. When the network size grows, the number of routers in
the network increases. Consequently, the size of routing tables increases, as well, and
routers can't handle network traffic as efficiently. We use hierarchical routing to
overcome this problem. Let's examine this subject with an example:

We use DV algorithms to find best routes between nodes. In the situation depicted below,
every node of the network has to save a routing table with 17 records. Here is a typical
graph and routing table for A:

In hierarchical routing, routers are classified in groups known as regions. Each router has
only the information about the routers in its own region and has no information about
routers in other regions. So routers just save one record in their table for every other
region. In this example, we have classified our network into five regions (see below).

If A wants to send packets to any router in region 2 (D, E, F or G), it sends them to B, and
so on. As you can see, in this type of routing, the tables can be summarized, so network
efficiency improves. The above example shows two-level hierarchical routing. We can
also use three- or four-level hierarchical routing.

In three-level hierarchical routing, the network is classified into a number of clusters.


Each cluster is made up of a number of regions, and each region contains a number or
routers. Hierarchical routing is widely used in Internet routing and makes use of several
routing protocols.

182
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Network graph and A’s routing table.

183
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• Host-intelligent versus router-intelligent

Some routing algorithms assume that the source end node will determine the entire route.
This is usually referred to as source routing. In source-routing systems, routers merely act
as store-and-forward devices, mindlessly sending the packet to the next stop. Other
algorithms assume that hosts know nothing about routes. In these algorithms, routers
determine the path through the internetwork based on their own calculations. In the first
system, the hosts have the routing intelligence. In the latter system, routers have the
routing intelligence

• Intradomain versus interdomain

Some routing algorithms work only within domains; others work within and
between domains. The nature of these two algorithm types is different. It
stands to reason, therefore, that an optimal intradomain-routing algorithm
would not necessarily be an optimal interdomain-routing algorithm.

Intradomain Routing
Based on unreliable datagram delivery
Distance vector - Routing Information Protocol (RIP),
based on Bellman-Ford - Each neighbor periodically exchange reachability information
to its neighbors
Link state - Open Shortest Path First (OSPF),
based on Dijkstra - Each network periodically floods immediate reachability information
to other routers

Interdomain Routing
[Link] is divided into Autonomous Systems
Distinct regions of administrative control
Routers/links managed by a single “institution”
[Link] of Autonomous Systems
Large, tier-1 provider with a nationwide backbone
Medium-sized regional provider with smaller backbone
Small network run by a single company or university
[Link] between Autonomous Systems
Internal topology is not shared between ASes

184
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

but, neighboring ASes interact to coordinate routing


[Link] uniquely identified by “AS Number”
Used for routing, among other things

Why interdomain routing?


When several organizations join to form the internet they have to set up links between
them the added lans are called “demarcation zones”

In order to have global connectivity:


each router must have a routing entry (possibly the default one) that matches the
destination address of the packet this should be true for packets to be delivered locally as
well as for packets to be delivered to remote lans.

How to update the routing tables?


In principle you have three options
1 run a single routing algorithm along with adjacent organizations
2 update the routing tables by hand, adding static routes to external lans
3 combine an exterior gateway protocol with the interior gateway protocol of the
networks

Link-state versus distance vector


A distance-vector routing (DVR) protocol requires that a router inform its neighbors of
topology changes periodically. Historically known as the old ARPANET routing
algorithm (or known as Bellman-Ford algorithm).
Bellman Ford Basics – Each router maintains a Distance Vector table containing the
distance between itself and ALL possible destination nodes. Distances, based on a chosen
metric, are computed using information from the neighbors’ distance vectors.
Distance Vector Algorithm –
1. A router transmits its distance vector to each of its neighbors in a routing packet.
2. Each router receives and saves the most recently received distance vector from
each of its neighbors.
3. A router recalculates its distance vector when:
 It receives a distance vector from a neighbor containing different
information than before.
 It discovers that a link to a neighbor has gone down.
The DV calculation is based on minimizing the cost to each destination
 From time-to-time, each node sends its own distance vector estimate to neighbors.
 When a node x receives new DV estimate from any neighbor v, it saves v’s
distance vector and it updates its own DV using B-F equation:
 Dx(y) = min { C(x,v) + Dv(y)} for each node y ∈ N

Example – Consider 3-routers X, Y and Z as shown in figure. Each router have their
routing table. Every routing table will contain distance to the destination nodes.

185
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Consider router X , X will share it routing table to neighbors and neighbors will share it
routing table to it to X and distance from node X to destination will be calculated using
bellmen- ford equation.
Dx(y) = min { C(x,v) + Dv(y)} for each node y ∈ N

As we can see that distance will be less going from X to Z when Y is intermediate
node(hop) so it will be update in routing table X.

Similarly for Z also –

Finally the routing table for all –

186
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Advantages of Distance Vector routing –


 It is simpler to configure and maintain than link state routing.
Disadvantages of Distance Vector routing –
 It is slower to converge than link state.
 It is at risk from the count-to-infinity problem.
 It creates more traffic than link state since a hop count change must be
propagated to all routers and processed on each router. Hop count updates take
place on a periodic basis, even if there are no changes in the network topology, so
bandwidth-wasting broadcasts still occur.
 For larger networks, distance vector routing results in larger routing tables
than link state since each router must know about all other routers. This can also
lead to congestion on WAN links.

Count-to-infinity problem

The main issue with Distance Vector Routing (DVR) protocols is Routing Loops,
since Bellman-Ford Algorithm cannot prevent loops. This routing loop in DVR network
causes Count to Infinity Problem. Routing loops usually occur when any interface goes
down or two-routers send updates at the same time.

Counting to infinity problem:

So in this example, the Bellman-Ford algorithm will converge for each router, they will
have entries for each other. B will know that it can get to C at a cost of 1, and A will
know that it can get to C via B at a cost of 2.

If the link between B and C is disconnected, then B will know that it can no longer get to
C via that link and will remove it from it’s table. Before it can send any updates it’s
possible that it will receive an update from A which will be advertising that it can get to C
at a cost of 2. B can get to A at a cost of 1, so it will update a route to C via A at a cost of

187
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

3. A will then receive updates from B later and update its cost to 4. They will then go on
feeding each other bad information toward infinity which is called as Count to Infinity
problem.

Solution for Count to Infinity problem:-

Route Poisoning:
When a route fails, distance vector protocols spread the bad news about a route failure by
poisoning the route. Route poisoning refers to the practice of advertising a route, but with
a special metric value called Infinity. Routers consider routes advertised with an infinite
metric to have failed. Each distance vector routing protocol uses the concept of an actual
metric value that represents infinity. RIP defines infinity as 16. The main disadvantage of
poison reverse is that it can significantly increase the size of routing announcements in
certain fairly common network topologies.

Link State Routing:

 The following sequence of steps can be executed in the Link State Routing.

 The basis of this advertising is a short packed called a Link State Packet
(LSP).

 OSPF (Open shortest path first) and IS-IS are examples of Link state
routing.

 Link State Packet(LSP) contains the following information:

1. The ID of the node that created the LSP;

2. A list of directly connected neighbors of that node, with the cost


of the link to each one;

3. A sequence number;

4. A time to live(TTL) for this packet.

188
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 When a router floods the network with information about its


neighbourhood, it is said to be advertising.

1. Discover your neighbors

2. Measure delay to your neighbors

3. Bundle all the information about your neighbors together

4. Send this information to all other routers in the subnet

5. Compute the shortest path to every router with the information you
receive

6. Each router finds out its own shortest paths to the other routers by
using Dijkstra's algorithm.

 In link state routing, each router shares its knowledge of its neighbourhood
with all routers in the network.

 Link-state protocols implement an algorithm called the shortest path first


(SPF, also known as Dijkstra's Algorithm) to determine the path to a remote
destination.

 There is no hop count limit. (For an IP datagram, the maximum time to live
ensures that loops are avoided.)

 Only when changes occur, It sends all summary information every 30


minutes by default. Only devices running routing algorithms listen to these
updates. Updates are sent to a multicast address.

 Updates are faster and convergence times are reduced. Higher CPU and
memory requirements to maintain link-state databases.

 Link-state protocols maintain three separate tables:

o Neighbor table: It contains a list of all neighbors, and the interface


each neighbor is connected off of. Neighbors are formed by sending
Hello packets.

o Topology table (Link- State table) : It contains a map of all links


within an area, including each link’s status.

o Routing table : It contains the best routes to each particular


destination

189
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Congestion Control

Congestion is an important issue that can arise in packet switched network. Congestion is
a situation in Communication Networks in which too many packets are present in a part
of the subnet, performance degrades. Congestion in a network may occur when the load
on the network (i.e. the number of packets sent to the network) is greater than the
capacity of the network (i.e. the number of packets a network can handle.)

In other words when too much traffic is offered, congestion sets in and performance
degrades sharply

How to correct the Congestion Problem:

Congestion Control refers to techniques and mechanisms that can either prevent
congestion, before it happens, or remove congestion, after it has happened. Congestion
control mechanisms are divided into two categories, one category prevents the congestion
from happening and the other category removes congestion after it has taken place.

In modern networks, avoiding congestive collapse involves the application of network


congestion avoidance techniques along with congestion control, such as:

 Exponential back off protocols that use algorithm feedback to decrease data packet
throughput to acceptable rates

 Priority techniques to allow only critical data stream transmission

 Allocation of appropriate network resources in anticipation of required increases in


data packet throughput

Avoiding network congestion and collapse requires two major components:

 Routers capable of reordering or dropping data packets when received rates reach
critical levels

 Flow control mechanisms that respond appropriately when data flow rates reach
critical levels.

190
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

These two categories are:

1. Open loop

2. Closed loop

Open Loop Congestion Control

• In this method, policies are used to prevent the congestion before it happens.

• Congestion control is handled either by the source or by the destination.

• The various methods used for open loop congestion control are:

Retransmission Policy

• The sender retransmits a packet, if it feels that the packet it has sent is lost or corrupted.

• However retransmission in general may increase the congestion in the network. But we
need to implement good retransmission policy to prevent congestion.

• The retransmission policy and the retransmission timers need to be designed to optimize
efficiency and at the same time prevent the congestion.

Window Policy

• To implement window policy, selective reject window method is used for congestion
control.

191
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• Selective Reject method is preferred over Go-back-n window as in Go-back-n method,


when timer for a packet times out, several packets are resent, although some may have
arrived safely at the receiver. Thus, this duplication may make congestion worse.

• Selective reject method sends only the specific lost or damaged packets.

Acknowledgement Policy

• The acknowledgement policy imposed by the receiver may also affect congestion.

• If the receiver does not acknowledge every packet it receives it may slow down the
sender and help prevent congestion.

• Acknowledgments also add to the traffic load on the network. Thus, by sending fewer
acknowledgements we can reduce load on the network.

• To implement it, several approaches can be used:

1. A receiver may send an acknowledgement only if it has a packet to be sent.

2. A receiver may send an acknowledgement when a timer expires.

3. A receiver may also decide to acknowledge only N packets at a time.

Discarding Policy

• A router may discard less sensitive packets when congestion is likely to happen.

• Such a discarding policy may prevent congestion and at the same time may not harm
the integrity of the transmission.

Admission Policy

• An admission policy, which is a quality-of-service mechanism, can also prevent


congestion in virtual circuit networks.

• Switches in a flow first check the resource requirement of a flow before admitting it to
the network.

• A router can deny establishing a virtual circuit connection if there is congestion in the
"network or if there is a possibility of future congestion.

Closed Loop Congestion Control

192
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• Closed loop congestion control mechanisms try to remove the congestion after it
happens.

• The various methods used for closed loop congestion control are:

Backpressure

• Backpressure is a node-to-node congestion control that starts with a node and


propagates, in the opposite direction of data flow.

• The backpressure technique can be applied only to virtual circuit networks. In such
virtual circuit each node knows the upstream node from which a data flow is coming.

• In this method of congestion control, the congested node stops receiving data from the
immediate upstream node or nodes.

• This may cause the upstream node on nodes to become congested, and they, in turn,
reject data from their upstream node or nodes.

• As shown in fig node 3 is congested and it stops receiving packets and informs its
upstream node 2 to slow down. Node 2 in turns may be congested and informs node 1 to
slow down. Now node 1 may create congestion and informs the source node to slow
down. In this way the congestion is alleviated. Thus, the pressure on node 3 is moved
backward to the source to remove the congestion.

Choke Packet

• In this method of congestion control, congested router or node sends a special type of
packet called choke packet to the source to inform it about the congestion.

• Here, congested node does not inform its upstream node about the congestion as in
backpressure method.

193
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• In choke packet method, congested node sends a warning directly to the source
station i.e. the intermediate nodes through which the packet has traveled are not warned.

Implicit Signaling

• In implicit signaling, there is no communication between the congested node or nodes


and the source.

• The source guesses that there is congestion somewhere in the network when it does not
receive any acknowledgment. Therefore the delay in receiving an acknowledgment is
interpreted as congestion in the network.

• On sensing this congestion, the source slows down.

• This type of congestion control policy is used by TCP.

Explicit Signaling

• In this method, the congested nodes explicitly send a signal to the source or destination
to inform about the congestion.

• Explicit signaling is different from the choke packet method. In choke packed method, a
separate packet is used for this purpose whereas in explicit signaling method, the signal is
included in the packets that carry data .

• Explicit signaling can occur in either the forward direction or the backward direction .

• In backward signaling, a bit is set in a packet moving in the direction opposite to the
congestion. This bit warns the source about the congestion and informs the source to slow
down.

• In forward signaling, a bit is set in a packet moving in the direction of congestion. This
bit warns the destination about the congestion. The receiver in this case uses policies such
as slowing down the acknowledgements to remove the congestion.

194
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Congestion control algorithms

Leaky Bucket Algorithm

• It is a traffic shaping mechanism that controls the amount and the rate of the traffic sent
to the network.

• A leaky bucket algorithm shapes bursty traffic into fixed rate traffic by averaging the
data rate.

• Imagine a bucket with a small hole at the bottom.

• The rate at which the water is poured into the bucket is not fixed and can vary but it
leaks from the bucket at a constant rate. Thus (as long as water is present in bucket), the
rate at which the water leaks does not depend on the rate at which the water is input to the
bucket.

• Also, when the bucket is full, any additional water that enters into the bucket spills over
the sides and is lost.

• The same concept can be applied to packets in the network. Consider that data is
coming from the source at variable speeds. Suppose that a source sends data at 12 Mbps
for 4 seconds. Then there is no data for 3 seconds. The source again transmits data at a
rate of 10 Mbps for 2 seconds. Thus, in a time span of 9 seconds, 68 Mb data has been
transmitted.

If a leaky bucket algorithm is used, the data flow will be 8 Mbps for 9 seconds. Thus
constant flow is maintained.

195
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Token bucket Algorithm

• The leaky bucket algorithm allows only an average (constant) rate of data flow. Its
major problem is that it cannot deal with bursty data.

• A leaky bucket algorithm does not consider the idle time of the host. For example, if the
host was idle for 10 seconds and now it is willing to sent data at a very high speed for
another 10 seconds, the total data transmission will be divided into 20 seconds and
average data rate will be maintained. The host is having no advantage of sitting idle for
10 seconds.

• To overcome this problem, a token bucket algorithm is used. A token bucket algorithm
allows bursty data transfers.

• A token bucket algorithm is a modification of leaky bucket in which leaky bucket


contains tokens.

• In this algorithm, a token(s) are generated at every clock tick. For a packet to be
transmitted, system must remove token(s) from the bucket.

• Thus, a token bucket algorithm allows idle hosts to accumulate credit for the future in
form of tokens.

196
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• For example, if a system generates 100 tokens in one clock tick and the host is idle for
100 ticks. The bucket will contain 10,000 tokens.

Now, if the host wants to send bursty data, it can consume all 10,000 tokens at once for
sending 10,000 cells or bytes.

Thus a host can send bursty data as long as bucket is not empty.

Related Questions:-

Q1. Explain different Congestion Control algorithms.

Q2. Explain any two routing algorithms with appropriate example.

Q3. Explain Hierarchical routing with the help of example.


Q4. Explain IPV6.
[Link] IPV4.
Q6. Explain Repeaters, Routers and Gateways briefly.
Q7. Explain design issues of network layer.

197
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Chapter 7: Transport Layer


Topics Covered
Services
Elements of Transport Protocols
User Datagram Protocol (UDP)
Transmission Control Protocol (TCP)

PROCESS-TO-PROCESS DELIVERY
The data link layer is responsible for delivery of frames between two neighboring nodes
over a link. This is called node-to-node delivery. The network layer is responsible for
delivery of datagrams between two hosts. This is called host-to-host delivery.
Services

The basic function of the Transport layer is to accept data from above, split it up into
smaller units, pass these to the network layer, and ensure that the pieces all arrive
correctly at the other end. Furthermore, all this must be done efficiently and in a way that
isolates the upper layers from the inevitable changes in the hardware technology.

The transport layer also determines what type of service to provide to the session layer,
and, ultimately, to the users of the network. The most popular type of transport
connection is an error-free point-to-point channel that delivers messages or bytes in the
order in which they were sent.

The transport layer is a true end-to-end layer, all the way from the source to the
destination. In other words, a program on the source machine carries on a conversation
with a similar program on the destination machine, using the message headers and control
messages.

198
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

1. Service Point Addressing : Transport Layer header includes service point


address which is port address. This layer gets the message to the correct process on
the computer unlike Network Layer, which gets each packet to the correct computer.

2. Segmentation and Reassembling : A message is divided into segments; each


segment contains sequence number, which enables this layer in reassembling the
message. Message is reassembled correctly upon arrival at the destination and
replaces packets which were lost in transmission.

3. Connection Control : It includes 2 types :

o Connectionless Transport Layer : Each segment is considered as an


independent packet and delivered to the transport layer at the destination machine.

o Connection Oriented Transport Layer : Before delivering packets,


connection is made with transport layer at the destination machine.

4. Flow Control : In this layer, flow control is performed end to end.

5. Error Control : Error Control is performed end to end in this layer to ensure that
the complete message arrives at the receiving transport layer without any error. Error
Correction is done through retransmission.

Elements of Transport Protocols

Client/Server Paradigm

Although there are several ways to achieve process-to-process communication, the most
common one is through the client/server paradigm. A process on the local host, called
a client, needs services from a process usually on the remote host, called a server.
Both processes (client and server) have the same name. For example, to get the day
and time from a remote machine, we need a Daytime client process running on the
local host and a Daytime server process running on a remote machine.
Operating systems today support both multiuser and multiprogramming environments.
A remote computer can run several server programs at the same time, just as
local computers can run one or more client programs at the same time. For
communication, we must define the following:
1. Local host
2. Local process
3. Remote host
4. Remote process

Addressing

199
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Whenever we need to deliver something to one specific destination among many, we


need an address. At the data link layer, we need a MAC address to choose one node
among several nodes if the connection is not point-to-point. A frame in the data link layer
needs a destination MAC address for delivery and a source address for the next node's
reply.
At the network layer, we need an IP address to choose one host among millions. A
datagram in the network layer needs a destination IP address for delivery and a source
IP address for the destination's reply.
At the transport layer, we need a transport layer address, called a port number, to
choose among multiple processes running on the destination host. The destination port
number is needed for delivery; the source port number is needed for the reply.

IANA Ranges

The IANA (Internet Assigned Number Authority) has divided the port numbers into
three ranges: well known, registered, and dynamic (or private).
Well-known ports. The ports ranging from 0 to 1023 are assigned and controlled
by IANA. These are the well-known ports.
Registered ports. The ports ranging from 1024 to 49,151 are not assigned or controlled
by IANA. They can only be registered with IANA to prevent duplication.
Dynamic ports. The ports ranging from 49,152 to 65,535 are neither controlled
nor registered. They can be used by any process. These are the ephemeral ports.

Socket Addresses

Process-to-process delivery needs two identifiers, IP address and the port number, at
each end to make a connection. The combination of an IP address and a port number is
called a socket address. The client socket address defines the client process uniquely
just as the server socket address defines the server process uniquely.
A transport layer protocol needs a pair of socket addresses: the client socket address
and the server socket address. These four pieces of information are part of the IP header
and the transport layer protocol header. The IP header contains the IP addresses; the
UDP or TCP header contains the port numbers.

Multiplexing and Demultiplexing

The addressing mechanism allows multiplexing and demultiplexing by the transport


Layer.

Multiplexing

At the sender site, there may be several processes that need to send packets. However,
there is only one transport layer protocol at any time. This is a many-to-one relationship
and requires multiplexing. The protocol accepts messages from different processes,
differentiated by their assigned port numbers. After adding the header, the transport layer
passes the packet to the network layer.

Demultiplexing

200
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

At the receiver site, the relationship is one-to-many and requires demultiplexing. The
transport layer receives datagrams from the network layer. After error checking and
dropping of the header, the transport layer delivers each message to the appropriate
process based on the port number.

Connectionless Versus Connection-Oriented Service

A transport layer protocol can either be connectionless or connection-oriented.

Connectionless Service
In a connectionless service, the packets are sent from one party to another with no need
for connection establishment or connection release. The packets are not numbered; they
may be delayed or lost or may arrive out of sequence. There is no acknowledgment
either. One of the transport layer protocols in the Internet model,
UDP, is connectionless.

Connection-Oriented Service
In a connection-oriented service, a connection is first established between the sender
and the receiver. Data are transferred. At the end, the connection is released.
TCP and SCTP are connection-oriented protocols.

Reliable Versus Unreliable

The transport layer service can be reliable or unreliable. If the application layer program
needs reliability, we use a reliable transport layer protocol by implementing flow and
error control at the transport layer. This means a slower and more complex service. On
the other hand, if the application program does not need reliability because it uses its
own flow and error control mechanism or it needs fast service or the nature of the service
does not demand flow and error control (real-time applications), then an unreliable
protocol can be used.
In the Internet, there are three common different transport layer protocols, as we have
already mentioned. UDP is connectionless and unreliable; TCP and SCTP are connection
oriented and reliable. These three can respond to the demands of the application layer
programs.

User Datagram Protocol (UDP)

The User Datagram Protocol (UDP) is simplest Transport Layer communication


protocol available of the TCP/IP protocol suite. It involves minimum amount of
communication mechanism. UDP is said to be an unreliable transport protocol but it
uses IP services which provides best effort delivery mechanism.

201
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

In UDP, the receiver does not generate an acknowledgement of packet received and in
turn, the sender does not wait for any acknowledgement of packet sent. This
shortcoming makes this protocol unreliable as well as easier on processing.

Requirement of UDP
A question may arise, why do we need an unreliable protocol to transport the data? We
deploy UDP where the acknowledgement packets share significant amount of bandwidth
along with the actual data. For example, in case of video streaming, thousands of
packets are forwarded towards its users. Acknowledging all the packets is troublesome
and may contain huge amount of bandwidth wastage. The best delivery mechanism of
underlying IP protocol ensures best efforts to deliver its packets, but even if some
packets in video streaming get lost, the impact is not calamitous and can be ignored
easily. Loss of few packets in video and voice traffic sometimes goes unnoticed.
Features
 UDP is used when acknowledgement of data does not hold any significance.
 UDP is good protocol for data flowing in one direction.
 UDP is simple and suitable for query based communications.
 UDP is not connection oriented.
 UDP does not provide congestion control mechanism.
 UDP does not guarantee ordered delivery of data.
 UDP is stateless.
 UDP is suitable protocol for streaming applications such as VoIP, multimedia
streaming.
UDP Header
UDP header is as simple as its function.

UDP header contains four main parameters:


 Source Port - This 16 bits information is used to identify the source port of the
packet.
 Destination Port - This 16 bits information, is used identify application level
service on destination machine.
 Length - Length field specifies the entire length of UDP packet (including
header). It is 16-bits field and minimum value is 8-byte, i.e. the size of UDP
header itself.

202
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Checksum - This field stores the checksum value generated by the sender before
sending. IPv4 has this field as optional so when checksum field does not contain
any value it is made 0 and all its bits are set to zero.
The destination IP address and port number are encapsulated in each UDP packet. These
two numbers together uniquely identify the recipient and are used by the underlying
operating system to deliver the packet to a specific process (application). Each UDP
packet also contains the sender's IP address and port number.
One way to think of UDP is by analogy to communications via a letter. You write the
letter (this is the data you are sending); put the letter inside an envelope (the UDP
packet); address the envelope (using an IP address and a port number); put your return
address on the envelope (your local IP address and port number); and then you send the
letter.
Like a real letter, you have no way of knowing whether a UDP packet was received. If
you send a second letter one day after the first, the second one may be received before the
first. Or, the second one may never be received.

UDP Operation
UDP uses concepts common to the transport layer.

Connectionless Services
As mentioned previously, UDP provides a connectionless service. This means that each
user datagram sent by UDP is an independent datagram. There is no relationship
between the different user datagrams even if they are coming from the same source
process and going to the same destination program. The user datagrams are not
numbered.
Also, there is no connection establishment and no connection termination, as is the case
for TCP. This means that each user datagram can travel on a different path.
One of the ramifications of being connectionless is that the process that uses UDP
cannot send a stream of data to UDP and expect UDP to chop them into different
related user datagrams. Instead each request must be small enough to fit into one user
datagram. Only those processes sending short messages should use UDP.

Flow and Error Control


UDP is a very simple, unreliable transport protocol. There is no flow control and hence
no window mechanism. The receiver may overflow with incoming messages.
There is no error control mechanism in UDP except for the checksum. This means
that the sender does not know if a message has been lost or duplicated. When the receiver
detects an error through the checksum, the user datagram is silently discarded.
The lack of flow control and error control means that the process using UDP
should provide these mechanisms.

Encapsulation and Decapsulation


To send a message from one process to another, the UDP protocol encapsulates and
decapsulates messages in an IP datagram.
Queuing

203
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

At the client site, when a process starts, it requests a port number from the operating
system. Some implementations create both an incoming and an outgoing queue
associated with each process. Other implementations create only an incoming queue
associated with each process.
Note that even if a process wants to communicate with multiple processes, it
obtains only one port number and eventually one outgoing and one incoming queue.
The queues opened by the client are, in most cases, identified by ephemeral port
numbers.
The queues function as long as the process is running. When the process terminates, the
queues are destroyed.
The client process can send messages to the outgoing queue by using the source
port number specified in the request. UDP removes the messages one by one and, after
adding the UDP header, delivers them to IP. An outgoing queue can overflow. If this
happens, the operating system can ask the client process to wait before sending any
more messages.
When a message arrives for a client, UDP checks to see if an incoming queue has
been created for the port number specified in the destination port number field of the
user datagram. If there is such a queue, UDP sends the received user datagram to the
end of the queue. If there is no such queue, UDP discards the user datagram and asks
the ICMP protocol to send a port unreachable message to the server. All the incoming
messages for one particular client program, whether coming from the same or a different
server, are sent to the same queue. An incoming queue can overflow. If this happens,
UDP drops the user datagram and asks for a port unreachable message to be sent to
the server.
At the server site, the mechanism of creating queues is different. In its simplest form,
a server asks for incoming and outgoing queues, using its well-known port, when it starts
running. The queues remain open as long as the server is running.
When a message arrives for a server, UDP checks to see if an incoming queue has
been created for the port number specified in the destination port number field of the user
datagram. If there is such a queue, UDP sends the received user datagram to the end of
the queue. If there is no such queue, UDP discards the user datagram and asks the ICMP
protocol to send a port unreachable message to the client. All the incoming messages
for one particular server, whether coming from the same or a different client, are sent to
the same queue. An incoming queue can overflow. If this happens, UDP drops the user
datagram and asks for a port unreachable message to be sent to the client.
When a server wants to respond to a client, it sends messages to the outgoing queue,
using the source port number specified in the request. UDP removes the messages one
by one and, after adding the UDP header, delivers them to IP. An outgoing queue can
overflow. If this happens, the operating system asks the server to wait before sending
any more messages.

Transmission Control Protocol (TCP)


The transmission Control Protocol (TCP) is one of the most important protocols of
Internet Protocols suite. It is most widely used protocol for data transmission in
communication network such as internet.

204
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Features
 TCP is reliable protocol. That is, the receiver always sends either positive or
negative acknowledgement about the data packet to the sender, so that the sender
always has bright clue about whether the data packet is reached the destination or
it needs to resend it.
 TCP ensures that the data reaches intended destination in the same order it was
sent.
 TCP is connection oriented. TCP requires that connection between two remote
points be established before sending actual data.
 TCP provides error-checking and recovery mechanism.
 TCP provides end-to-end communication.
 TCP provides flow control and quality of service.
 TCP operates in Client/Server point-to-point mode.
 TCP provides full duplex server, i.e. it can perform roles of both receiver and
sender.
Header
The length of TCP header is minimum 20 bytes long and maximum 60 bytes.

 Source Port (16-bits) - It identifies source port of the application process on the
sending device.
 Destination Port (16-bits) - It identifies destination port of the application process
on the receiving device.
 Sequence Number (32-bits) - Sequence number of data bytes of a segment in a
session.
 Acknowledgement Number (32-bits) - When ACK flag is set, this number
contains the next sequence number of the data byte expected and works as
acknowledgement of the previous data received.
 Data Offset (4-bits) - This field implies both, the size of TCP header (32-bit
words) and the offset of data in current packet in the whole TCP segment.
 Reserved (3-bits) - Reserved for future use and all are set zero by default.

205
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Flags (1-bit each)


o NS - Nonce Sum bit is used by Explicit Congestion Notification signaling
process.
o CWR - When a host receives packet with ECE bit set, it sets Congestion
Windows Reduced to acknowledge that ECE received.
o ECE -It has two meanings:
 If SYN bit is clear to 0, then ECE means that the IP packet has its
CE (congestion experience) bit set.
 If SYN bit is set to 1, ECE means that the device is ECT capable.
o URG - It indicates that Urgent Pointer field has significant data and
should be processed.
o ACK - It indicates that Acknowledgement field has significance. If ACK
is cleared to 0, it indicates that packet does not contain any
acknowledgement.
o PSH - When set, it is a request to the receiving station to PUSH data (as
soon as it comes) to the receiving application without buffering it.
o RST - Reset flag has the following features:
 It is used to refuse an incoming connection.
 It is used to reject a segment.
 It is used to restart a connection.
o SYN - This flag is used to set up a connection between hosts.
o FIN - This flag is used to release a connection and no more data is
exchanged thereafter. Because packets with SYN and FIN flags have
sequence numbers, they are processed in correct order.
 Windows Size - This field is used for flow control between two stations and
indicates the amount of buffer (in bytes) the receiver has allocated for a segment,
i.e. how much data is the receiver expecting.
 Checksum - This field contains the checksum of Header, Data and Pseudo
Headers.
 Urgent Pointer - It points to the urgent data byte if URG flag is set to 1.
Options - It facilitates additional options which are not covered by the regular header.
Option field is always described in 32-bit words. If this field contains data less than 32-
bit, padding is used to cover the remaining bits to reach 32-bit boundary.

TCP Services
The services offered by TCP to the processes at the application layer are:

206
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Process-to-Process Communication
Like UDP, TCP provides process-to-process communication using port numbers
Stream Delivery Service
TCP, unlike UDP, is a stream-oriented protocol. In UDP, a process (an application
program) sends messages, with predefined boundaries, to UDP for delivery. UDP adds its
own header to each of these messages and delivers them to IP for transmission. Each
message from the process is calIed a user datagram and becomes, eventually, one IP
datagram. Neither IP nor UDP recognizes any relationship between the datagrams.
TCP, on the other hand, allows the sending process to deliver data as a stream of
bytes and allows the receiving process to obtain data as a stream of bytes. TCP creates
an environment in which the two processes seem to be connected by an imaginary "tube"
that carries their data across the Internet. The sending process produces (writes to) the
stream of bytes, and the receiving process consumes (reads from) them.

Sending and Receiving Buffers


Because the sending and the receiving processes may not write or read data at the same
speed, TCP needs buffers for storage. There are two buffers, the sending buffer and the
receiving buffer, one for each direction. (These buffers are also necessary for flow and
error control mechanisms used by TCP.) One way to implement a buffer is to use a
circular array of I-byte locations For simplicity, we have shown two buffers of 20 bytes
each; normally the buffers are hundreds or thousands of bytes, depending on the
implementation.
We also show the buffers as the same size, which is not always the case.

Figure shows the movement of the data in one direction. At the sending site,
the buffer has three types of chambers. The white section contains empty chambers that
can be filled by the sending process (producer). The gray area holds bytes that have
been sent but not yet acknowledged. TCP keeps these bytes in the buffer until it receives
an acknowledgment. The colored area contains bytes to be sent by the sending TCP.
TCP may be able to send only part of this colored section. This could be due to the
slowness of the receiving process or perhaps to congestion in the network. Also note that
after the bytes in the gray chambers are acknowledged, the chambers are recycled and
available for use by the sending process.

207
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

This is why we show a circular buffer.


The operation of the buffer at the receiver site is simpler. The circular buffer is
divided into two areas (shown as white and colored). The white area contains empty
chambers to be filled by bytes received from the network. The colored sections contain
received bytes that can be read by the receiving process. When a byte is read by the
receiving process, the chamber is recycled and added to the pool of empty chambers.

Segments
Although buffering handles the disparity between the speed of the producing
and consuming processes, we need one more step before we can send data. The IP layer,
as a service provider for TCP, needs to send data in packets, not as a stream of bytes. At
the transport layer, TCP groups a number of bytes together into a packet called a segment.
TCP adds a header to each segment (for control purposes) and delivers the segment to the
IP layer for transmission. The segments are encapsulated in IP datagrams and transmitted.
This entire operation is transparent to the receiving process. Later we will see that
segments may be received out of order, lost, or corrupted and resent. All these are
handled by TCP with the receiving process unaware of any activities. Figure shows how
segments are created from the bytes in the buffers.
Note that the segments are not necessarily the same size. In Figure, for simplicity,
we show one segment carrying 3 bytes and the other carrying 5 bytes. In reality,
segments carry hundreds, if not thousands, of bytes.

Full-Duplex Communication
TCP offers full-duplex service, in which data can flow in both directions at the same
time.
Each TCP then has a sending and receiving buffer, and segments move in both directions.

Connection-Oriented Service

TCP, unlike UDP, is a connection-oriented protocol. When a process at site A wants to


send and receive data from another process at site B, the following occurs:
1. The two TCPs establish a connection between them.
2. Data are exchanged in both directions.
3. The connection is terminated.

208
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Note that this is a virtual connection, not a physical connection. The TCP segment is
encapsulated in an IP datagram and can be sent out of order, or lost, or corrupted, and
then resent. Each may use a different path to reach the destination. There is no physical
connection.

TCP creates a stream-oriented environment in which it accepts the responsibility of


delivering the bytes in order to the other site. The situation is similar to creating a bridge
that spans multiple islands and passing all the bytes from one island to another in one
single connection.

Reliable Service
TCP is a reliable transport protocol. It uses an acknowledgment mechanism to check
the safe and sound arrival of data. We will discuss this feature further in the section on
error control.

TCP Features

Numbering System
Although the TCP software keeps track of the segments being transmitted or received,
there is no field for a segment number value in the segment header. Instead, there are
two fields called the sequence number and the acknowledgment number. These two
fields refer to the byte number and not the segment number.

Byte Number
TCP numbers all data bytes that are transmitted in a connection.

Numbering
Is independent in each direction. When TCP receives bytes of data from a process, it
stores them in the sending buffer and numbers them. The numbering does not necessarily
start from O. Instead, TCP generates a random number between 0 and 232 - 1 for the
number of the first byte. For example, if the random number happens to be 1057 and the
total data to be sent are 6000 bytes, the bytes are numbered from 1057 to 7056. We will
see that byte numbering is used for flow and error control.

Flow Control
TCP, unlike UDP, provides flow control. The receiver of the data controls the amount of
data that are to be sent by the sender. This is done to prevent the receiver from being
overwhelmed with data. The numbering system allows TCP to use a byte-oriented flow
control.

Error Control
To provide reliable service, TCP implements an error control mechanism. Although
error control considers a segment as the unit of data for error detection (loss or corrupted
segments), error control is byte-oriented.

Congestion Control

209
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

TCP, unlike UDP, takes into account congestion in the network. The amount of data sent
by a sender is not only controlled by the receiver (flow control), but is also determined
by the level of congestion in the network.

TCP Connection Establishment and Termination

To aid in our understanding of the connect, accept, and close functions and to help us
debug TCP applications using the netstat program, we must understand how TCP
connections are established and terminated, and TCP's state transition diagram.

Three-Way Handshake

This could also be seen as a way of how TCP connection is established. Before getting
into the details, let us look at some basics. TCP stands for Transmission Control
Protocol which indicates that it does something to control the transmission of the data in
a reliable way.

The process of communication between devices over the internet happens according to
the current TCP/IP suite model(stripped out version of OSI reference model). The
Application layer is a top pile of stack of TCP/IP model from where network referenced
application like web browser on the client side establish connection with the server.
From the application layer,the information is transferred to the transport layer where our
topic comes into picture. The two important protocols of this layer are – TCP, UDP(User
Datagram Protocol) out of which TCP is prevalent(since it provides reliability for the
connection established). However you can find application of UDP in querying the DNS
server to get the binary equivalent of the Domain Name used for the website.

TCP 3 way handshake

TCP provides reliable communication with something called Positive Acknowledgement


with Re-transmission(PAR).
The Protocol Data Unit(PDU) of the transport layer is called segment. Now a device
using PAR resend the data unit until it receives an acknowledgement. If the data unit
received at the receiver’s end is damaged(It checks the data with checksum functionality
of the transport layer that is used for Error Detection), then receiver discards the segment.
So the sender has to resend the data unit for which positive acknowledgement is not
received. You can realize from above mechanism that three segments are exchanged
between sender(client) and receiver(server) for a reliable TCP connection to get
established.

210
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Connection Establishment in TCP

 Step 1 (SYN) : In the first step, client wants to establish a connection with server,
so it sends a segment with SYN(Synchronize Sequence Number) which informs
server that client is likely to start communication and with what sequence number it
starts segments with

 Step 2 (SYN + ACK): Server responds to the client request with SYN-ACK
signal bits set. Acknowledgement(ACK) signifies the response of segment it
received and SYN signifies with what sequence number it is likely to start the
segments with
 Step 3 (ACK) : In the final part client acknowledges the response of server and
they both establish a reliable connection with which they will start eh actual data
transfer
The steps 1, 2 establish the connection parameter (sequence number) for one direction
and it is acknowledged. The steps 2, 3 establish the connection parameter (sequence
number) for the other direction and it is acknowledged. With these, a full-duplex
communication is established.
Note – Initial sequence numbers are randomly selected while establishing connections
between client and server.

TCP Options

Each SYN can contain TCP options. Commonly used options include the following:

 MSS option. With this option, the TCP sending the SYN announces its maximum
segment size, the maximum amount of data that it is willing to accept in each TCP
segment, on this connection. The sending TCP uses the receiver's MSS value as
the maximum size of a segment that it sends.

211
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Window scale option. The maximum window that either TCP can
advertise to the other TCP is 65,535, because the corresponding field in
the TCP header occupies 16 bits.

To provide interoperability with older implementations that do not


support this option, the following rules apply. TCP can send the option
with its SYN as part of an active open. But, it can scale its windows only
if the other end also sends the option with its SYN. Similarly, the server's
TCP can send this option only if it receives the option with the client's
SYN. This logic assumes that implementations ignore options that they do
not understand, which is required and common, but unfortunately, not
guaranteed with all implementations.

 Timestamp option. This option is needed for high-speed connections to prevent


possible data corruption caused by old, delayed, or duplicated segments. Since it
is a newer option, it is negotiated similarly to the window scale option. As
network programmers there is nothing we need to worry about with this option.

TCP Connection Termination

In TCP 3-way Handshake Process we studied that how connection establish between
client and server in Transmission Control Protocol (TCP) using SYN bit segments. In this
article we will study about how TCP close connection between Client and Server. Here
we will also need to send bit segments to server which FIN bit is set to 1.

How mechanism works In TCP :


1. Step 1 (FIN From Client) – Suppose that the client application decides it wants
to close the connection. (Note that the server could also choose to close the
connection). This causes the client send a TCP segment with the FIN bit set to 1 to
server and to enter the FIN_WAIT_1 state. While in the FIN_WAIT_1 state, the
client waits for a TCP segment from the server with an acknowledgment (ACK)

212
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

2. Step 2 (ACK From Server) – When Server received FIN bit segment from
Sender (Client), Server Immediately send acknowledgement (ACK) segment to the
Sender (Client).

3. Step 3 (Client waiting) – While in the FIN_WAIT_1 state, the client waits for a
TCP segment from the server with an acknowledgment. When it receives this
segment, the client enters the FIN_WAIT_2 state. While in the FIN_WAIT_2 state,
the client waits for another segment from the server with the FIN bit set to 1.

4. Step 4 (FIN from Server) – Server sends FIN bit segment to the Sender(Client)
after some time when Server send the ACK segment (because of some closing
process in the Server).

5. Step 5 (ACK from Client) – When Client receive FIN bit segment from the
Server, the client acknowledges the server’s segment and enters
the TIME_WAIT state. The TIME_WAIT state lets the client resend the final
acknowledgment in case the ACK is [Link] time spent by client in
the TIME_WAIT state is depend on their implementation, but their typical values
are 30 seconds, 1 minute, and 2 minutes. After the wait, the connection formally
closes and all resources on the client side (including port numbers and buffer data)
are released.

In the below Figures illustrates the series of states visited by the server-side and also
Client-side, assuming the client begins connection [Link] these two state-transition
figures, we have only shown how a TCP connection is normally established and shut-
down.

213
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

TCP states visited by ClientSide –

TCP connection management

TCP states visited by ServerSide –

214
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Related Questions:-
[Link] a short note on UDP and its working.
[Link] short note on TCP.

Q3. Compare TCP and UDP protocol transport layer. Draw header used in both
techniques.

215
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Chapter 8: Application Layer

Topics Covered

[Link] Security
[Link]
3.E-mail
[Link]
[Link]
[Link] Wide Web
[Link]
[Link]
[Link]

Network Security

Network security is the security provided to a network from unauthorized access and
risks. It is the duty of network administrators to adopt preventive measures to protect
their networks from potential security threats.

Computer networks that are involved in regular transactions and communication within
the government, individuals, or business require security. The most common and simple
way of protecting a network resource is by assigning it a unique name and a
corresponding password.

Types of Network Security Devices

Active Devices

These security devices block the surplus traffic. Firewalls, antivirus scanning devices,
and content filtering devices are the examples of such devices.

216
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Passive Devices

These devices identify and report on unwanted traffic, for example, intrusion detection
appliances.

Preventative Devices

These devices scan the networks and identify potential security problems. For example,
penetration testing devices and vulnerability assessment appliances.

Unified Threat Management (UTM)

These devices serve as all-in-one security devices. Examples include firewalls, content
filtering, web caching, etc.

Firewalls

A firewall is a network security system that manages and regulates the network traffic
based on some protocols. A firewall establishes a barrier between a trusted internal
network and the internet.

Firewalls exist both as software that run on a hardware and as hardware appliances.
Firewalls that are hardware-based also provide other functions like acting as a DHCP
server for that network.

Most personal computers use software-based firewalls to secure data from threats from
the internet. Many routers that pass data between networks contain firewall components
and conversely, many firewalls can perform basic routing functions.

Firewalls are commonly used in private networks or intranets to prevent unauthorized


access from the internet. Every message entering or leaving the intranet goes through the
firewall to be examined for security measures.

An ideal firewall configuration consists of both hardware and software based devices. A
firewall also helps in providing remote access to a private network through secure
authentication certificates and logins.

Hardware and Software Firewalls

Hardware firewalls are standalone products. These are also found in broadband routers.
Most hardware firewalls provide a minimum of four network ports to connect other
computers. For larger networks − e.g., for business purpose − business networking
firewall solutions are available.

217
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Software firewalls are installed on your computers. A software firewall protects your
computer from internet threats.

Antivirus

An antivirus is a tool that is used to detect and remove malicious software. It was
originally designed to detect and remove viruses from computers.

Modern antivirus software provide protection not only from virus, but also from worms,
Trojan-horses, adwares, spywares, keyloggers, etc. Some products also provide
protection from malicious URLs, spam, phishing attacks, botnets, DDoS attacks, etc.

Content Filtering

Content filtering devices screen unpleasant and offensive emails or webpages. These are
used as a part of firewalls in corporations as well as in personal computers. These
devices generate the message "Access Denied" when someone tries to access any
unauthorized web page or email.

Content is usually screened for pornographic content and also for violence- or hate-
oriented content. Organizations also exclude shopping and job related contents.

Content filtering can be divided into the following categories −

 Web filtering

 Screening of Web sites or pages

 E-mail filtering

 Screening of e-mail for spam

 Other objectionable content

Intrusion Detection Systems

Intrusion Detection Systems, also known as Intrusion Detection and Prevention


Systems, are the appliances that monitor malicious activities in a network, log
information about such activities, take steps to stop them, and finally report them.

Intrusion detection systems help in sending an alarm against any malicious activity in
the network, drop the packets, and reset the connection to save the IP address from any
blockage. Intrusion detection systems can also perform the following actions −

218
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Correct Cyclic Redundancy Check (CRC) errors

 Prevent TCP sequencing issues

 Clean up unwanted transport and network layer options

Internet Protocol Security (IPsec)

Internet protocol security (IPsec) is a set of protocols that provides security for Internet
Protocol. It can use cryptography to provide security. IPsec can be used for the setting up
of virtual private networks (VPNs) in a secure manner.

Also known as IP Security.

IPsec involves two security services:

 Authentication Header (AH): This authenticates the sender and it discovers any
changes in data during transmission.

 Encapsulating Security Payload (ESP): This not only performs authentication for
the sender but also encrypts the data being sent.

There are two modes of IPsec:

 Tunnel Mode: This will take the whole IP packet to form secure communication
between two places, or gateways.

 Transport Mode: This only encapsulates the IP payload (not the entire IP packet as
in tunnel mode) to ensure a secure channel of communication.

Encryption and Decryption


Encryption is the process of transforming information so it is unintelligible to anyone but
the intended recipient. Decryption is the process of transforming encrypted information
so that it is intelligible again. A cryptographic algorithm, also called a cipher, is a
mathematical function used for encryption or decryption. In most cases, two related
functions are employed, one for encryption and the other for decryption.
With most modern cryptography, the ability to keep encrypted information secret is based
not on the cryptographic algorithm, which is widely known, but on a number called a key
that must be used with the algorithm to produce an encrypted result or to decrypt
previously encrypted information. Decryption with the correct key is simple. Decryption
without the correct key is very difficult, and in some cases impossible for all practical
purposes.

219
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Symmetric-Key Encryption

With symmetric-key encryption, the encryption key can be calculated from the
decryption key and vice versa. With most symmetric algorithms, the same key is used for
both encryption and decryption, as shown in Figure 1.

Implementations of symmetric-key encryption can be highly efficient, so that users do


not experience any significant time delay as a result of the encryption and decryption.
Symmetric-key encryption also provides a degree of authentication, since information
encrypted with one symmetric key cannot be decrypted with any other symmetric key.
Thus, as long as the symmetric key is kept secret by the two parties using it to encrypt
communications, each party can be sure that it is communicating with the other as long as
the decrypted messages continue to make sense.

Symmetric-key encryption is effective only if the symmetric key is kept secret by the two
parties involved. If anyone else discovers the key, it affects both confidentiality and
authentication. A person with an unauthorized symmetric key not only can decrypt
messages sent with that key, but can encrypt new messages and send them as if they came
from one of the two parties who were originally using the key.

Symmetric-key encryption plays an important role in the SSL protocol, which is widely
used for authentication, tamper detection, and encryption over TCP/IP networks. SSL
also uses techniques of public-key encryption, which is described in the next section.

Public-Key Encryption

The most commonly used implementations of public-key encryption are based on


algorithms patented by RSA Data Security. Therefore, this section describes the RSA
approach to public-key encryption.

Public-key encryption (also called asymmetric encryption) involves a pair of keys-a


public key and a private key-associated with an entity that needs to authenticate its
identity electronically or to sign or encrypt data. Each public key is published, and the
corresponding private key is kept secret. Data encrypted with your public key can be
decrypted only with your private key. Figure 2 shows a simplified view of the way
public-key encryption works.

220
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The scheme shown in Figure 2 lets you freely distribute a public key, and only you will
be able to read data encrypted using this key. In general, to send encrypted data to
someone, you encrypt the data with that person's public key, and the person receiving the
encrypted data decrypts it with the corresponding private key.

Compared with symmetric-key encryption, public-key encryption requires more


computation and is therefore not always appropriate for large amounts of data. However,
it's possible to use public-key encryption to send a symmetric key, which can then be
used to encrypt additional data. This is the approach used by the SSL protocol.

As it happens, the reverse of the scheme shown in Figure 2 also works: data encrypted
with your private key can be decrypted only with your public key. This would not be a
desirable way to encrypt sensitive data, however, because it means that anyone with your
public key, which is by definition published, could decrypt the data. Nevertheless,
private-key encryption is useful, because it means you can use your private key to sign
data with your digital signature-an important requirement for electronic commerce and
other commercial applications of cryptography. Client software such as Firefox can then
use your public key to confirm that the message was signed with your private key and
that it hasn't been tampered with since being signed. "Digital Signatures" describes how
this confirmation process works.

cryptographic systems are also referred to as Ciphers. In general, a cipher is simply just
a set of steps (an algorithm) for performing both an encryption, and the corresponding
decryption.

Caesar Cipher

It is a mono-alphabetic cipher wherein each letter of the plaintext is substituted by


another letter to form the ciphertext. It is a simplest form of substitution cipher scheme.

This cryptosystem is generally referred to as the Shift Cipher. The concept is to replace
each alphabet by another alphabet which is ‘shifted’ by some fixed number between 0
and 25.

221
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

For this type of scheme, both sender and receiver agree on a ‘secret shift number’ for
shifting the alphabet. This number which is between 0 and 25 becomes the key of
encryption.

The name ‘Caesar Cipher’ is occasionally used to describe the Shift Cipher when the
‘shift of three’ is used.

Process of Shift Cipher

 In order to encrypt a plaintext letter, the sender positions the sliding ruler
underneath the first set of plaintext letters and slides it to LEFT by the number of
positions of the secret shift.

 The plaintext letter is then encrypted to the ciphertext letter on the sliding ruler
underneath. The result of this process is depicted in the following illustration for
an agreed shift of three positions. In this case, the plaintext ‘tutorial’ is encrypted
to the ciphertext ‘WXWRULDO’. Here is the ciphertext alphabet for a Shift of 3

 On receiving the ciphertext, the receiver who also knows the secret shift,
positions his sliding ruler underneath the ciphertext alphabet and slides it to
RIGHT by the agreed shift number, 3 in this case.

 He then replaces the ciphertext letter by the plaintext letter on the sliding ruler
underneath. Hence the ciphertext ‘WXWRULDO’ is decrypted to ‘tutorial’. To
decrypt a message encoded with a Shift of 3, generate the plaintext alphabet
using a shift of ‘-3’ as shown below −

Security Value

Caesar Cipher is not a secure cryptosystem because there are only 26 possible keys to
try out. An attacker can carry out an exhaustive key search with available limited
computing resources.

Simple Substitution Cipher

It is an improvement to the Caesar Cipher. Instead of shifting the alphabets by some


number, this scheme uses some permutation of the letters in alphabet.

222
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

For example, A.B…..Y.Z and Z.Y……B.A are two obvious permutation of all the letters
in alphabet. Permutation is nothing but a jumbled up set of alphabets.

With 26 letters in alphabet, the possible permutations are 26! (Factorial of 26) which is
equal to 4x1026. The sender and the receiver may choose any one of these possible
permutation as a ciphertext alphabet. This permutation is the secret key of the scheme.

Process of Simple Substitution Cipher

 Write the alphabets A, B, C,...,Z in the natural order.

 The sender and the receiver decide on a randomly selected permutation of the
letters of the alphabet.

 Underneath the natural order alphabets, write out the chosen permutation of the
letters of the alphabet. For encryption, sender replaces each plaintext letters by
substituting the permutation letter that is directly beneath it in the table. This
process is shown in the following illustration. In this example, the chosen
permutation is K,D, G, ..., O. The plaintext ‘point’ is encrypted to ‘MJBXZ’.

Here is a jumbled Ciphertext alphabet, where the order of the ciphertext letters is a key.

 On receiving the ciphertext, the receiver, who also knows the randomly chosen
permutation, replaces each ciphertext letter on the bottom row with the
corresponding plaintext letter in the top row. The ciphertext ‘MJBXZ’ is
decrypted to ‘point’.

Security Value

Simple Substitution Cipher is a considerable improvement over the Caesar Cipher. The
possible number of keys is large (26!) and even the modern computing systems are not
yet powerful enough to comfortably launch a brute force attack to break the system.
However, the Simple Substitution Cipher has a simple design and it is prone to design
flaws, say choosing obvious permutation, this cryptosystem can be easily broken.

One-Time Pad

The circumstances are −

 The length of the keyword is same as the length of the plaintext.

223
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 The keyword is a randomly generated string of alphabets.

 The keyword is used only once.


Security Value

Let us compare Shift cipher with one-time pad.

Shift Cipher − Easy to Break

In case of Shift cipher, the entire message could have had a shift between 1 and 25. This
is a very small size, and very easy to brute force. However, with each character now
having its own individual shift between 1 and 26, the possible keys grow exponentially
for the message.

One-time Pad − Impossible to Break

Let us say, we encrypt the name “point” with a one-time pad. It is a 5 letter text. To
break the ciphertext by brute force, you need to try all possibilities of keys and conduct
computation for (26 x 26 x 26 x 26 x 26) = 26 5 = 11881376 times. That’s for a message
with 5 alphabets. Thus, for a longer message, the computation grows exponentially with
every additional alphabet. This makes it computationally impossible to break the
ciphertext by brute force.

Transposition Cipher

It is another type of cipher where the order of the alphabets in the plaintext is rearranged
to create the ciphertext. The actual plaintext alphabets are not replaced.

An example is a ‘simple columnar transposition’ cipher where the plaintext is written


horizontally with a certain alphabet width. Then the ciphertext is read vertically as
shown.

For example, the plaintext is “golden statue is in eleventh cave” and the secret random
key chosen is “five”. We arrange this text horizontally in table with number of column
equal to key value. The resulting text is shown below.

224
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The ciphertext is obtained by reading column vertically downward from first to last
column. The ciphertext is ‘gnuneaoseenvltiltedasehetivc’.

To decrypt, the receiver prepares similar table. The number of columns is equal to key
number. The number of rows is obtained by dividing number of total ciphertext
alphabets by key value and rounding of the quotient to next integer value.

The receiver then writes the received ciphertext vertically down and from left to right
column. To obtain the text, he reads horizontally left to right and from top to bottom
row.

E-mail Hacking

Email hacking can be done in any of the following ways:

 Spam

 Virus

 Phishing

225
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Spam

E-mail spamming is an act of sending Unsolicited Bulk E-mails (UBI) which one has
not asked for. Email spams are the junk mails sent by commercial companies as an
advertisement of their products and services.

Virus

Some emails may incorporate with files containing malicious script which when run on
your computer may lead to destroy your important data.

Phishing

Email phishing is an activity of sending emails to a user claiming to be a legitimate


enterprise. Its main purpose is to steal sensitive information such as usernames,
passwords, and credit card details.

Such emails contains link to websites that are infected with malware and direct the user
to enter details at a fake website whose look and feels are same to legitimate one.

E-mail Spamming and Junk Mails

Email spamming is an act of sending Unsolicited Bulk E-mails (UBI) which one has not
asked for. Email spams are the junk mails sent by commercial companies as an
advertisement of their products and services.

Spams may cause the following problems:

 It floods your e-mail account with unwanted e-mails, which may result in loss of
important e-mails if inbox is full.

 Time and energy is wasted in reviewing and deleting junk emails or spams.

 It consumes the bandwidth that slows the speed with which mails are delivered.

 Some unsolicited email may contain virus that can cause harm to your computer.

Blocking Spams

Following ways will help you to reduce spams:

 While posting letters to newsgroups or mailing list, use a separate e-mail address
than the one you used for your personal e-mails.

 Don’t give your email address on the websites as it can easily be spammed.

226
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Avoid replying to emails which you have received from unknown persons.

 Never buy anything in response to a spam that advertises a product.

E-mail Cleanup and Archiving

In order to have light weighted Inbox, it’s good to archive your inbox from time to time.
Here I will discuss the steps to clean up and archive your Outlook inbox.

 Select File tab on the mail pane.

 Select Cleanup Tools button on account information screen.

 Select Archive from cleanup tools drop down menu.

 Select Archive this folder and all subfolders option and then click on the folder
that you want to archive. Select the date from the Archive items older than: list.
Click Browse to create new .pst file name and location. Click OK.

The Data Encryption Standard (DES) is a symmetric-key block cipher published by the
National Institute of Standards and Technology (NIST).
Data Encryption Standard
DES is an implementation of a Feistel Cipher. It uses 16 round Feistel structure. The
block size is 64-bit. Though, key length is 64-bit, DES has an effective key length of 56
bits, since 8 of the 64 bits of the key are not used by the encryption algorithm (function
as check bits only). General Structure of DES is depicted in the following illustration −

227
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Since DES is based on the Feistel Cipher, all that is required to specify DES is −

 Round function

 Key schedule

 Any additional processing − Initial and final permutation


Initial and Final Permutation
The initial and final permutations are straight Permutation boxes (P-boxes) that are
inverses of each other. They have no cryptography significance in DES. The initial and
final permutations are shown as follows −

228
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Round Function
The heart of this cipher is the DES function, f. The DES function applies a 48-bit key to
the rightmost 32 bits to produce a 32-bit output.

 Expansion Permutation Box − Since right input is 32-bit and round key is a 48-
bit, we first need to expand right input to 48 bits. Permutation logic is graphically
depicted in the following illustration −

229
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 The graphically depicted permutation logic is generally described as table in DES


specification illustrated as shown −

 XOR (Whitener). − After the expansion permutation, DES does XOR operation
on the expanded right section and the round key. The round key is used only in
this operation.
 Substitution Boxes. − The S-boxes carry out the real mixing (confusion). DES
uses 8 S-boxes, each with a 6-bit input and a 4-bit output. Refer the following
illustration −

 The S-box rule is illustrated below −

230
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 There are a total of eight S-box tables. The output of all eight s-boxes is then
combined in to 32 bit section.
 Straight Permutation − The 32 bit output of S-boxes is then subjected to the
straight permutation with rule shown in the following illustration:

Public Key Cryptography

RSA Cryptosystem

This cryptosystem is one the initial system. It remains most employed cryptosystem
even today. The system was invented by three scholars Ron Rivest, Adi
Shamir, and Len Adleman and hence, it is termed as RSA cryptosystem.

231
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

We will see two aspects of the RSA cryptosystem, firstly generation of key pair and
secondly encryption-decryption algorithms.

Generation of RSA Key Pair

Each person or a party who desires to participate in communication using encryption


needs to generate a pair of keys, namely public key and private key. The process
followed in the generation of keys is described below −

 Generate the RSA modulus (n)

o Select two large primes, p and q.

o Calculate n=p*q. For strong unbreakable encryption, let n be a large


number, typically a minimum of 512 bits.

 Find Derived Number (e)

o Number e must be greater than 1 and less than (p − 1)(q − 1).

o There must be no common factor for e and (p − 1)(q − 1) except for 1. In


other words two numbers e and (p – 1)(q – 1) are coprime.

 Form the public key

o The pair of numbers (n, e) form the RSA public key and is made public.

o Interestingly, though n is part of the public key, difficulty in factorizing a


large prime number ensures that attacker cannot find in finite time the two
primes (p & q) used to obtain n. This is strength of RSA.

 Generate the private key

o Private Key d is calculated from p, q, and e. For given n and e, there is


unique number d.

o Number d is the inverse of e modulo (p - 1)(q – 1). This means that d is


the number less than (p - 1)(q - 1) such that when multiplied by e, it is
equal to 1 modulo (p - 1)(q - 1).

o This relationship is written mathematically as follows −

ed = 1 mod (p − 1)(q − 1)

232
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The Extended Euclidean Algorithm takes p, q, and e as input and gives d as output.

Example

An example of generating RSA Key pair is given below. (For ease of understanding, the
primes p & q taken here are small values. Practically, these values are very high).

 Let two primes be p = 7 and q = 13. Thus, modulus n = pq = 7 x 13 = 91.

 Select e = 5, which is a valid choice since there is no number that is common


factor of 5 and (p − 1)(q − 1) = 6 × 12 = 72, except for 1.

 The pair of numbers (n, e) = (91, 5) forms the public key and can be made
available to anyone whom we wish to be able to send us encrypted messages.

 Input p = 7, q = 13, and e = 5 to the Extended Euclidean Algorithm. The output


will be d = 29.

 Check that the d calculated is correct by computing −

de = 29 × 5 = 145 = 1 mod 72

 Hence, public key is (91, 5) and private keys is (91, 29).

Encryption and Decryption

Once the key pair has been generated, the process of encryption and decryption are
relatively straightforward and computationally easy.

Interestingly, RSA does not directly operate on strings of bits as in case of symmetric
key encryption. It operates on numbers modulo n. Hence, it is necessary to represent the
plaintext as a series of numbers less than n.

RSA Encryption

 Suppose the sender wish to send some text message to someone whose public key
is (n, e).

 The sender then represents the plaintext as a series of numbers less than n.

 To encrypt the first plaintext P, which is a number modulo n. The encryption


process is simple mathematical step as −

C = Pe mod n

233
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 In other words, the ciphertext C is equal to the plaintext P multiplied by itself e


times and then reduced modulo n. This means that C is also a number less than n.

 Returning to our Key Generation example with plaintext P = 10, we get


ciphertext C −

C = 105 mod 91
RSA Decryption

 The decryption process for RSA is also very straightforward. Suppose that the
receiver of public-key pair (n, e) has received a ciphertext C.

 Receiver raises C to the power of his private key d. The result modulo n will be
the plaintext P.

Plaintext = Cd mod n

 Returning again to our numerical example, the ciphertext C = 82 would get


decrypted to number 10 using private key 29 −

Plaintext = 8229 mod 91 = 10


RSA Analysis

The security of RSA depends on the strengths of two separate functions. The RSA
cryptosystem is most popular public-key cryptosystem strength of which is based on the
practical difficulty of factoring the very large numbers.

 Encryption Function − It is considered as a one-way function of converting


plaintext into ciphertext and it can be reversed only with the knowledge of private
key d.

 Key Generation − The difficulty of determining a private key from an RSA


public key is equivalent to factoring the modulus n. An attacker thus cannot use
knowledge of an RSA public key to determine an RSA private key unless he can
factor n. It is also a one way function, going from p & q values to modulus n is
easy but reverse is not possible.

If either of these two functions are proved non one-way, then RSA will be broken. In
fact, if a technique for factoring efficiently is developed then RSA will no longer be
safe.

234
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The strength of RSA encryption drastically goes down against attacks if the number p
and q are not large primes and/ or chosen public key e is a small number.

DNS

Domain Name System (or Service or Server), an Internet service that translates domain
names into IP addresses. Because domain names are alphabetic, they're easier to
remember. The Internet however, is really based on IP addresses. Every time you use a
domain name, therefore, a DNS service must translate the name into the corresponding IP
address. For example, the domain name [Link] might translate
to [Link].
Domain Namespace

The naming system on which DNS is based is a hierarchical and logical tree structure
called the domain namespace . Organizations can also create private networks that are not
visible on the Internet, using their own domain namespaces. Figure 1 shows part of the
Internet domain namespace, from the root domain and top-level Internet DNS domains,
to the fictional DNS domain named [Link] that contains a host (computer) named
Mfgserver.

Figure 1 Domain Name System

Each node in the DNS tree represents a DNS name. Some examples of DNS names are
DNS domains, computers, and services. A DNS domain is a branch under the node. For
example, in Figure 1, [Link] is a DNS domain. DNS domains can contain both hosts
(computers or services) and other domains (referred to as subdomains ). Each
organization is assigned authority for a portion of the domain namespace and is

235
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

responsible for administering, subdividing, and naming the DNS domains and computers
within that portion of the namespace.

Subdividing is an important concept in DNS. Creating subdivisions of the domain


namespace and private TCP/IP network DNS domains supports new growth on the
Internet and the ability to continually expand name and administrative groupings.
Subdivisions are generally based on departmental or geographic divisions.

For example, the [Link] DNS domain might include sites in North America and
Europe. A DNS administrator of the DNS domain [Link] can subdivide the domain to
create two subdomains that reflect these groupings: [Link]. and [Link].
Figure 2 shows an example of these subdomains.

Figure 2 Subdomains

Domain Name

Computers and DNS domains are named based on their position in the domain tree. For
example, because reskit is a subdomain of the .com domain, the domain name for reskit is
[Link].

Every node in the DNS domain tree can be identified by a fully qualified domain
name (FQDN). The FQDN is a DNS domain name that has been stated unambiguously so
as to indicate with absolute certainty its location relative to the root of the DNS domain
tree. This contrasts with a relative name, which is a name relative to some DNS domain
other than the root.

For example, the FQDN for the server in the [Link] DNS domain is constructed as
[Link] ., which is the concatenation of the host name (Mfgserver) with the
primary DNS suffix ([Link]), and the trailing dot (.). The trailing dot is a standard
separator between the top-level domain label and the empty string label corresponding to
the root.

In general, FQDNs have naming restrictions that allow only the use of characters a-z, A-
Z, 0-9, and the dash or minus sign (-). The use of the period (.) is allowed only between

236
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

domain name labels (for example, "[Link]") or at the end of a FQDN. Domain names
are not case-sensitive.

Internet Domain Namespace

The root (the top-most level) of the Internet domain namespace is managed by an Internet
name registration authority, which delegates administrative responsibility for portions of
the domain namespace to organizations that connect to the Internet.

Beneath the root DNS domain lie the top-level domains, also managed by the Internet
name registration authority. There are three types of top-level domains:

 Organizational domains . These are named by using a 3-character code that


indicates the primary function or activity of the organizations contained within the
DNS domain. Organizational domains are generally only for organizations within
the United States, and most organizations located in the United States are
contained within one of these organizational domains.

 Geographical domains . These are named by using the 2-character country/region


codes established by the International Standards Organization (ISO) 3166.

 Reverse domains . This is a special domain, named [Link], that is used for
IP address-to-name mappings (referred to as reverse lookup ). For more
information, see "Name Resolution" later in this chapter. There is also a special
domain, named [Link], used for IP version 6 reverse lookups.

The most commonly used top-level DNS name components for organizations in the
United States are described in the Table 1.

Table 1 Top-Level Name Component of the DNS Hierarchy

Top-Level
Example DNS
Name Description
Domain Name
Component

.com An Internet name authority delegates portions of [Link]


the domain namespace under this level to

237
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

commercial organizations, such as the Microsoft


Corporation.

.edu An Internet name authority delegates portions of [Link]


this domain namespace to educational
organizations, such as the Massachusetts
Institute of Technology (MIT).

.gov An Internet name authority delegates portions of [Link]


this domain namespace to governmental
organizations, such as the White House in
Washington, D.C.

.int An Internet name authority delegates portions of [Link]


this domain namespace to international
organizations, such as the North Atlantic Treaty
Organization (NATO).

.mil An Internet name authority delegates portions of [Link]


this domain namespace to military operations,
such as the Defense Date Network (DDN).

.net An Internet name authority delegates portions of [Link]


this domain namespace to networking
organizations, such as the National Science
Foundation (NSF).

.org An Internet name authority delegates portions of [Link]


this domain namespace to noncommercial
organizations, such as the Center for Networked
Information Discovery and Retrieval (CNIDR).

238
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

In addition to the top-level domains listed above, individual countries have their own top-
level domains. For example, .ca is the top-level domain for Canada.

Beneath the top-level domains, an Internet name authority delegates domains to


organizations that connect to the Internet. The organizations to which an Internet name
authority delegates a portion of the domain namespace are then responsible for naming
the computers and network devices within their assigned domain and its subdivisions.
These organizations use DNS servers to manage the name-to-IP address and IP address-
to-name mappings for host devices contained within their portion of the namespace.

Zones

A zone is a contiguous portion of the DNS namespace. It contains a series of records


stored on a DNS server. Each zone is anchored at a specific domain node. However,
zones are not domains. A DNS domain is a branch of the namespace, whereas a zone is a
portion of the DNS namespace generally stored in a file, and can contain multiple
domains. A domain can be subdivided into several partitions, and each partition, or zone,
can be controlled by a separate DNS server. Using the zone, the DNS server answers
queries about hosts in its zone, and is authoritative for that zone. Zones can be primary or
secondary. A primary zone is the copy of the zone to which the updates are made,
whereas a secondary zone is a copy of the zone that is replicated from a master server.

Zones can be stored in different ways. For example, they can be stored as zone files.
Some secondary servers store them in memory and perform a zone transfer whenever
they are restarted.

Figure 5.3 shows an example of a DNS domain that contains two primary zones. In this
example, the domain [Link] contains two subdomains: [Link]. and
[Link]. Authority for the [Link]. subdomain has been delegated to the
server [Link]. Thus, as Figure 5.3 shows, one server,
[Link], hosts the [Link] zone, and a second server,
[Link], hosts the [Link] zone that includes the [Link]
subdomain.

239
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Figure 3 Domains and Zones

Rather than delegating the [Link] zone to [Link], the


administrator can also configure reskitdc1 to host the zone for [Link].

Also, you cannot configure two different servers to manage the same primary zones; only
one server can manage the primary zone for each DNS domain.

You can configure a single DNS server to manage one zone or multiple zones, depending
on your needs. You can create multiple zones to distribute administrative tasks to
different groups and to provide efficient data distribution. You can also store the same
zone on multiple servers to provide load balancing and fault tolerance.

Name Server

A DNS (Domain Name System) server, also known as a name server, is a web server that
is specifically designed to connect with a massive database that stores all information
about domain names and their corresponding DNS records. These records include the
registrant of the domain, the web host, active nameservers and other information.

A domain name's DNS servers are listed in the WHOis database and the web hosting
control panel, and appear as [Link] and
[Link].

The Basics

There are thousands of DNS servers around the world that contain pieces of the database,
but there are only 13 root DNS servers that contain the entire database on each server.

240
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

There are two types of DNS servers – primary and secondary. It is important to note,
however, that any DNS server can be used as a primary or a secondary server, depending
on the preference of the sever administrator. It is even possible to have the same server
be a primary server for one zone and a secondary server for another.

If you're interested in learning more about primary and secondary DNS servers, then you
may want to consider the following information.

Primary Master DNS Servers

A primary master name server reads data for the domain zone from a file located on the
web server of the hosting account. This server usually also sends information to the
secondary server as well.

Zone data is the information specified by the server administrator that tells the server how
to behave and communicate with other servers. When a primary server communicates
with a secondary server, it is called a zone transfer because zone data is being transferred
from one DNS to another.

Two DNS servers are assigned to each domain to make administration easier and provide
more security than just a single server. Once zone data has been created for a primary
server, it does not need to be copied over to the secondary server because the two servers
automatically share zone data.

Secondary DNS Servers

A secondary DNS server, also called a slave server or simply a slave, receives zone data
from the primary server automatically after starting. In Microsoft's DNS manager
software, secondary DNS servers are referred to as secondaries. Every time a secondary
server functions, it requests information from its master server.

It is important to note that a secondary server does not need to pull data form a primary
server because another secondary server can be set up as the master server.

Secondary DNS servers are just as important as primary servers because they provide
security in the form of redundancy. They also lessen the load placed on the primary
server and ensure that there is always a server working to deliver data. By diversifying
the administrative structure of domain name servers, the security of web sites and the
internet in general is ensured.

DNS Lookup: How a Domain Name is Translated to an IP Address

Step 1: OS Recursive Query to DNS Resolver

241
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Since the operating system doesn’t know where “[Link]” is, it queries a DNS
resolver. The query the OS sends to the DNS Resolver has a special flag that tells it is a
“recursive query.” This means that the resolver must complete the recursion and the
response must be either an IP address or an error.

For most users, their DNS resolver is provided by their Internet Service Provider (ISP), or
they are using an open source alternative such as Google DNS ([Link]) or OpenDNS
([Link]). This can be viewed or changed in your network or router settings. At
this point, the resolver goes through a process called recursion to convert the domain
name into an IP address.

Step 2: DNS Resolver Iterative Query to the Root Server

The resolver starts by querying one of the root DNS servers for the IP of
“[Link].” This query does not have the recursive flag and therefore is an
“iterative query,” meaning its response must be an address, the location of an
authoritative name server, or an error. The root is represented in the hidden trailing “.” at
the end of the domain name. Typing this extra “.” is not necessary as your browser
automatically adds it.

There are 13 root server clusters named A-M with servers in over 380 locations. They are
managed by 12 different organizations that report to the Internet Assigned Numbers
Authority (IANA), such as Verisign, who controls the A and J clusters. All of the servers
are copies of one master server run by IANA.

Step 3: Root Server Response

These root servers hold the locations of all of the top level domains (TLDs) such as .com,
.de, .io, and newer generic TLDs such as .camera.

The root doesn’t have the IP info for “[Link],” but it knows that .com might
know, so it returns the location of the .com servers. The root responds with a list of the 13
locations of the .com gTLD servers, listed as NS or “name server” records.

Step 4: DNS Resolver Iterative Query to the TLD Server

Next the resolver queries one of the .com name servers for the location of [Link].
Like the Root Servers, each of the TLDs have 4-13 clustered name servers existing in
many locations. There are two types of TLDs: country codes (ccTLDs) run by
government organizations, and generic (gTLDs). Every gTLD has a different commercial
entity responsible for running these servers. In this case, we will be using the gTLD
servers controlled by Verisign, who run the .com, .net, .edu, and .gov among gTLDs.

Step 5: TLD Server Response

242
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Each TLD server holds a list of all of the authoritative name servers for each domain in
the TLD. For example, each of the 13 .com gTLD servers has a list with all of the name
servers for every single .com domain. The .com gTLD server does not have the IP
addresses for [Link], but it knows the location of [Link]’s name servers. The
.com gTLD server responds with a list of all of [Link]’s NS records. In this case
Google has four name servers, “[Link]” to “[Link].”

Step 6: DNS Resolver Iterative Query to the [Link] NS

Finally, the DNS resolver queries one of Google’s name server for the IP of
“[Link].”

Step 7: [Link] NS Response

This time the queried Name Server knows the IPs and responds with an A or AAAA
address record (depending on the query type) for IPv4 and IPv6, respectively.

Step 8: DNS Resolver Response to OS

At this point the resolver has finished the recursion process and is able to respond to the
end user’s operating system with an IP address.

243
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Step 9: Browser Starts TCP Handshake

At this point the operating system, now in possession of [Link]’s IP address,


provides the IP to the Application (browser), which initiates the TCP connection to start
loading the page. For more information of this process, we wrote a blog post on the
anatomy of HTTP.

As mentioned earlier, this is worst case scenario in terms of the length of time to
complete the resolution. In most cases, if the user has recently accessed URLs of the
same domain, or other users relying on the same DNS resolver have done such requests,
there will be no DNS resolution required, or it will be limited to the query on the local
DNS resolver. We will cover this in later articles.

In this DNS non-cached case, four sets of DNS servers were involved, hence a lot could
have gone wrong. The end user has no idea what is happening behind the scenes; they are
simply are waiting for the page to load and all of these DNS queries have to happen
before the browser can request the webpage.

This is why we stress the importance of fast DNS. You can have a fast and well-built site,
but if your DNS is slow, your webpage will still have poor response time.

E-mail

Short for electronic mail, e-mail or email is information stored on a computer that is
exchanged between two users over telecommunications. More plainly, e-mail is a
message that may contain text, files, images, or other attachments sent through a network
to a specified individual or group of individuals.
E-mail address breakdown

xyz@[Link]

 The first portion all e-mail addresses, the part before the @ symbol, contains
the alias, user, group, or department of a company. In our above
example support is the Technical Support department at Computer Hope.
 Next, the @ (at sign) is used as a divider in the e-mail address; it is required for
all SMTP e-mail addresses since the first message was sent by Ray Tomlinson.
 Finally, [Link] is the domain name to which the user belongs.
How to send and receive e-mail

E-mail Program

244
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

To send and receive e-mail messages, you can use an e-mail program, also known as
an e-mail client, such as Microsoft Outlook or Mozilla Thunderbird. When using an e-
mail client, you must have a server that stores and delivers your messages, which is
provided by your ISP or in some cases, another company. An e-mail client needs to
connect to a server to download new e-mail, whereas email stored online updates
automatically when you visit the site.
E-mail Online
An alternative way of sending and receiving e-mail (and the more popular solution for
most people) is an online e-mail service or webmail. Examples include Hotmail (now
[Link]), Gmail, and Yahoo Mail. Many of the online e-mail services, including the
ones we just mentioned, are free or have a free account option.
Writing an e-mail

When writing an e-mail message, it should look something like the example window
below. As you can see, several fields are required when sending an e-mail:
 The To field is where you type the e-mail address of the person who is the
recipient of your message.
 The From field should contain your e-mail address.
 If you are replying to a message, the To and From fields are automatically filled
out; if it's a new message, you'll need to enter them manually.
 The CC or Carbon Copy field allows you to send a copy of the message to another
e-mail address, but is not mandatory.
 The Subject Line, although not required, should consist of a few words
describing the e-mail's contents.
 Finally, the Message Body is the location you type your main message. It often
contains your signature at the bottom; similar to a hand-written letter.

What makes a valid e-mail address?

There are several rules that an e-mail address must follow to be valid:
 As mentioned earlier, an e-mail must have a username followed by an @ (at sign)
which is followed by the domain name with a domain suffix.
 The username cannot be longer than 64 characters long and the domain name
cannot be longer than 254 characters.
 There should be only one @ sign in an e-mail address.
 The space and special characters: ( ) , : ; < > \ [ ] are allowed. Occasionally,
a space, backslash, and quotation mark work but must be preceded with a forward
slash. Although valid, some e-mail providers do not allow these characters.
 The username and e-mail addresses as a whole cannot begin or end with a period.
 The e-mail must not have two or more consecutive periods.
Advantages of e-mail

There are a number of advantages of e-mail and the usage of e-mail versus postal mail.
Some of the main advantages are listed below.
 Free delivery - Sending an e-mail is virtually free, outside the cost of Internet
service. There is no need to buy a postage stamp to send a letter.

245
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Global delivery - E-mail can be sent to nearly anywhere around the world, to any
country.
 Instant delivery - An e-mail can be instantly sent and received by the recipient
over the Internet.
 File attachment - An e-mail can include one or more file attachments, allowing a
person to send documents, pictures, or other files with an e-mail.
 Long-term storage - E-mails are stored electronically, which allows for storage
and archival over long periods of time.
 Environmentally friendly - Sending an e-mail does not require paper, cardboard,
or packing tape, conserving paper resources.

Multipurpose Internet Mail Extensions (MIME)

Multipurpose Internet Mail Extensions (MIME) is an Internet standard that helps extend
the limited capabilities of email by allowing insertion of images, sounds and text in a
message.

MIME was designed to extend the format of email to support non-ASCII characters,
attachments other than text format, and message bodies which contain multiple parts.
MIME describes the message content type and the type of encoding used with the help of
headers. All manually composed and automated emails are transmitted through SMTP in
MIME format. The association of Internet email with SMTP and MIME standards is such
that the emails are sometimes referred to as SMTP/MIME email. The MIME standard
defines the content types which are of prime importance in communication protocols like
HTTP for the World Wide Web. The data are transmitted in the form of email messages
through HTTP even though the data are not an email.
The features offered by MIME to email services are as follows:

 Support for multiple attachments in a single message

 Support for non-ASCII characters

 Support for layouts, fonts and colors which are categorized as rich text.

 Support for attachments which may contain executables, audio, images and video
files, etc.

 Support for unlimited message length.

MIME is extensible because it defines a method to register new content types and other
MIME attribute values. The format of a message body is described by MIME using
special header directives. This is done so that the email can be represented correctly by
the client.

 MIME Version: The presence of MIME Version generally indicates whether the
message is MIME formatted. The value of the header is 1.0 and it is shown as

246
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

MIME-Version: 1.0. The idea behind this was to create more advanced versions of
MIME like 2.0 and so on.

 Content-Type: This describes the data’s Internet media type and the subtype. It
may consist of a ‘charset’ parameter separated by a semicolon specifying the
character set to be used. For example: Content-Type: Text/Plain.

 Content-Transfer-Encoding: It specifies the encoding used in the message body.

 Content-Description: Provides additional information about the content of the


message.

 Content-Disposition: Defines the name of the file and the attachment settings and
uses the attribute 'filename'

SMTP
Its primary function is different from the other two. SMTP or Simple Mail Transfer
Protocol is mostly used for sending out email from an email client (e.g. Microsoft
Outlook, Thunderbird or Apple Mail) to an email server. It's also used
for relaying or forwarding mail messages from one mail server to another. The ability to
relay messages from one server to another is necessary if the sender and recipient have
different email service providers.

SMTP, uses port 25 by default. It may also use port 587 and port 465. The latter, which
was introduced as the port of choice for secure SMTP (a.k.a. SMTPS), is supposed to be
deprecated. But in reality, it's still being used by several mail service providers.

247
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Now that you have a basic understanding of SMTP, it's time to turn our attention to the
two protocols for retrieving email from mail servers: IMAP and POP3. Let's start with
POP3.

POP3

As shown in the figure above, the Post Office Protocol or POP is used to retrieve email
messages from a mail server to a mail client. The latest version, which is what's widely
used, is version 3 - hence the term "POP3".

POP version 3, which is specified in RFC 1939, supports extensions and several
authentication mechanisms. Authentication features are necessary to prevent malicious
individuals from gaining unauthorized access to users' messages.

Generally speaking, a POP3 client retrieves email in the following manner:

1. Connects to the mail server on port 110

2. Retrieves email messages;

3. Deletes copies of the messages stored on the server; and

4. Disconnects from the server

Although POP clients may be configured to allow the server to continue storing copies of
the downloaded messages, the steps outlined above is the usual practice. Leaving them on
the server is a practice that's usually done via IMAP. Let's talk about it now.

248
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

IMAP

IMAP, especially the current version (IMAP4), is a more sophisticated protocol. It allows
users to group related messages and place them in folders, which can in turn be arranged
hierarchically. It's also equipped with message flags that indicate whether a message has
been read, deleted, or replied to. It even allows users to carry out searches against the
server mailboxes.

Here's how IMAP works in a nutshell:

1. Connects to the mail server on port 143 (or 993 for SSL/TLS connections);

2. Retrieves email messages;

3. Stays connected until the mail client app is closed and downloads messages on
demand.

Notice that messages aren't deleted on the server. This has major implications, which
we'll talk about shortly.

Considerations when choosing between IMAP and POP3

Since SMTP's main function is different altogether, the dilemma of choosing the better
protocol usually involves only IMAP and POP3. Here are some of the things you will
want to put into consideration:

Server storage space


A server with limited storage space is one major factor that may force you to favor POP3.
Since IMAP leaves messages on the server, it can consume storage space faster than
POP3.

Advantage: POP3

Anytime, anywhere access


There's one good reason why IMAP was designed to store messages on the server. It's
meant to enable retrieval of messages from multiple devices; sometimes, even
simultaneously. So if you have an iPhone, an Android tablet, a laptop, and a desktop, and
you want to read email from any or all of these devices, IMAP would be the better
choice.

249
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Advantage: IMAP

Synchronization
If you access email messages from multiple devices (who doesn't these days?), you'll
likely want all devices to reflect whatever action you performed on one device.

For instance, if you read messages, A, B, and C, then you'll want those messages to be
also marked as "read" on the other devices. If you deleted messages B and C, then you'll
want those same messages removed from your inbox on the other devices as well. If you
moved message A to another folder ... well, you know what I mean. All these
synchronizations can only be achieved if you're using IMAP.

Advantage: IMAP

Organization
Because IMAP allows users to arrange messages in a hierarchical fashion and place them
in folders, it's certainly better at helping users organize.

Advantage: IMAP

Computational overhead
Of course, all that IMAP functionality comes at a price. It's arguably more difficult to
implement and certainly consumes a lot more CPU and RAM, especially when it
performs those synchronizations. In fact, high CPU and memory usage can happen at
both the client and server side if there's a ton of messages to sync.

Advantage: POP3

Privacy
This is one concern that would weigh heavily on end users who frequently deal with
confidential information. These users would prefer to download all email messages and
leave no copies behind on the server.

Advantage: POP3

250
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Speed
Whereas POP3 downloads all mail messages upon connection, IMAP may optionally
download just the message headers or certain portions and leave, for example, the
attachments on the server. Only when the user decides the remaining portions are worth
downloading, will those portions be downloaded. In this regard, IMAP can be considered
faster.

However, if all messages on the server are supposed to be downloaded every single time,
then POP3 would now be faster.

Advantage: Depends on the situation

As you can see, each protocol has its own advantages and disadvantages. It's really up to
you to decide which functions/capabilities are more important to you.

SNMP

Simple Network Management Protocol (SNMP) is an application-layer protocol used to


manage and monitor network devices and their functions. SNMP provides a common
language for network devices to relay management information within single- and
multivendor environments in a local area network (LAN) or wide area network (WAN).
The most recent iteration of SNMP, version 3, includes security enhancements that
authenticate and encrypt SNMP messages as well as protect packets during transit.

One of the most widely used protocols, SNMP is supported on an extensive range of
hardware -- from conventional network equipment like routers,
switches and wireless access points to endpoints like printers, scanners and internet of
things (IoT) devices. In addition to hardware, SNMP can be used to monitor services
such as Dynamic Host Configuration Protocol (DHCP). Software agents on these devices
and services communicate with a network management system (NMS), also referred to as
an SNMP manager, via SNMP to relay status information and configuration changes.

While SNMP can be used in a network of any size, its greatest value is evident in large
networks. Manually and individually logging into hundreds or thousands of nodes would
be extremely time-consuming and resource-intensive. In comparison, using SNMP with
an NMS enables a network administrator to manage and monitor all of those nodes from
a single interface, which can typically support batch commands and automatic alerts.

251
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

SNMP is described in the Internet Engineering Task Force (IETF) Request for Comment
(RFC) 1157 and in a number of other related RFCs.

A computer network system that uses SNMP for network management consists of the
three fundamental components :

1. The SNMP manager : It is a software that usually runs on the machine of network
administrator or any human manager managing the computer network.
2. The SNMP agent : It is a software that usually runs on the network node that is to
be monitored. This node could be a printer, router etc.
3. The SNMP MIB : MIB stands for Management information base. This component
makes sure that the data exchange between the manager and the agent remains
structured.

The SNMP MIB

Suppose a mobile company server sends a poll question to all the company’s subscribers
through SMS. Being that company’s subscriber, you get that message on your phone and
you reply to it. Simple enough. Now, assume a situation where in a next poll the same
company sends MMS this time. But, this time your phone is not able to comprehend that
SMS due to some of its technology limitations (or any other problem). So, in this case
you won’t be able to receive and hence reply to the MMS.

So we see that the problem above happened because of lack of some MMS capabilities
on your phone. So, in a nutshell your phone was not able to comprehend the incoming
message successfully.

One could assume that same is the case with SNMP manager and an SNMP agent. The
network protocol used between them is of-course SNMP but there has to be a protocol for
composing and comprehending the information being queried. The information being
queried could be anything like the disk usage of the network node that has agent running
on it. So the crux is that there should be a standard structure in which the the query
should be formed by the SNMP manager and the query should be understood by the
SNMP agent.

The very basic component of the structure used in case of SNMP is an object. Every
information that can be queried through SNMP is looked in terms of an object. For
example the a system’s up time is an object known as ‘sysUpTime’. Every object is has
an associated ID known as Object ID or OID which is unique for every object. A group of
objects form a [Link] example, if you take a look at the following image :

252
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

You will see that the whole information system in SNMP is in a form of tree where
individual information nodes are objects having unique OIDs. For example the unique
OID for the object sysUpTime is .[Link].[Link].0 . Looking at the figure above, you can
easily deduce this OID. The ‘0’ at the last of OID signifies that this object is a scalar and
not a table.

There is also a textual description of the numeric OID. For example, the textual
description of sysUpTime OID (presented above) is [Link]-
[Link].

SNMP Messages

SNMP communication between manager and agent takes place in form of messages.
Following are the basic messages used for communication :

 Get: A Get message is sent by a manager to an agent to request the value of a


specific OID. This request is answered with a Response message that is sent back
to the manager with the data.

 GetNext: A GetNext message allows a manager to request the next sequential


object in the MIB. This is a way that you can traverse the structure of the MIB
without worrying about what OIDs to query.

 Set: A Set message is sent by a manager to an agent in order to change the value
held by a variable on the agent. This can be used to control configuration
information or otherwise modify the state of remote hosts. This is the only write
operation defined by the protocol.

 GetBulk: This manager to agent request functions as if multiple GetNext requests


were made. The reply back to the manager will contain as much data as possible
(within the constraints set by the request) as the packet allows.

253
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

 Response: This message, sent by an agent, is used to send any requested


information back to the manager. It serves as both a transport for the data
requested, as well as an acknowledgement of receipt of the request. If the
requested data cannot be returned, the response contains error fields that can be
set with further information. A response message must be returned for any of the
above requests, as well as Inform messages.

 Trap: A trap message is generally sent by an agent to a manager. Traps are


asynchronous notifications in that they are unsolicited by the manager receiving
them. They are mainly used by agents to inform managers of events that are
happening on their managed devices.

 Inform: To confirm the receipt of a trap, a manager sends an Inform message


back to the agent. If the agent does not receive this message, it may continue to
resend the trap message.

With these seven data unit types, SNMP is capable of querying for and sending
information about your networked devices.

USENET

It is a location where millions of different users have access to millions of different


articles written about various topics. There are over 14,000 forums (also
called newsgroups) on Usenet, and it is still used today to communicate and share files.

How does Usenet work?

Usenet is run across hundreds of different servers around the world that each mirror each
others content (newsgroups and files). You can connect to these servers to read the
newsgroups and grab files by using a Usenet news grabber which each cost a small
monthly fee.

Message Format
The primary consideration in choosing a message format is that it fit in with existing
tools as well as possible. Existing tools include implementations of both mail and news.
A standard format for mail messages has existed for many years on the Internet, and this
format meets most of the needs of USENET. Since the Internet format is extensible,
extensions to meet the additional needs of USENET are easily made within the Internet
standard. Therefore, the rule is adopted that all USENET news messages must be
formatted as valid Internet mail messages, according to the Internet standard RFC-822.
The USENET News standard is more restrictive than the Internet standard, placing

254
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

additional requirements on each message and forbidding use of certain Internet features.
However, it should always be possible to use a tool expecting an Internet message to
process a news message.
Here is an example USENET message to illustrate the fields.

From: jerry@[Link] (Jerry Schwarz)


Path: cbosgd!mhuxj!mhuxt!eagle!jerry
Newsgroups: [Link]
Subject: Usenet Etiquette -- Please Read
Message-ID: <642@[Link]>
Date: Fri, 19 Nov 82 [Link] GMT
Followup-To: [Link]
Expires: Sat, 1 Jan 83 [Link] -0500
Organization: AT&T Bell Laboratories, Murray Hill

The body of the message comes here, after a blank line.

Here is an example of a message in the old format (before the existence of this standard).
It is recommended that implementations also accept messages in this format to ease
upward conversion.
From: cbosgd!mhuxj!mhuxt!eagle!jerry (Jerry Schwarz)
Newsgroups: [Link]
Title: Usenet Etiquette -- Please Read
Article-I.D.: eagle.642
Posted: Fri Nov 19 [Link] 1982
Received: Fri Nov 19 [Link] 1982
Expires: Mon Jan 1 [Link] 1990

The body of the message comes here, after a blank line.

Some news systems transmit news in the A format, which looks like this:
Aeagle.642
[Link]
cbosgd!mhuxj!mhuxt!eagle!jerry
Fri Nov 19 [Link] 1982
Usenet Etiquette - Please Read
The body of the message comes here, with no blank line.

A standard USENET message consists of several header lines, followed by a blank line,
followed by the body of the message. Each header line consists of a keyword, a colon, a
blank, and some additional information. This is a subset of the Internet standard,
simplified to allow simpler software to handle it. The "From" line may optionally include
a full name, in the format above, or use the Internet angle bracket syntax. To keep the
implementations simple, other formats (for example, with part of the machine address
after the close parenthesis) are not allowed. The Internet convention of continuation
header lines (beginning with a blank or tab) is allowed.

255
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Certain headers are required, and certain other headers are optional. Any unrecognized
headers are allowed, and will be passed through unchanged. The required header lines are
"From", "Date", "Newsgroups", "Subject", "Message-ID", and "Path". The optional
header lines are "Followup-To", "Expires", "Reply-To", "Sender", "References",
"Control", "Distribution", "Keywords", "Summary", "Approved", "Lines", "Xref", and
"Organization". Each of these header lines will be described below.

2 Required Header lines

From
The "From" line contains the electronic mailing address of the person who sent the
message, in the Internet syntax. It may optionally also contain the full name of the
person, in parentheses, after the electronic address. The electronic address is the same as
the entity responsible for originating the message, unless the "Sender" header is present,
in which case the "From" header might not be verified. Note that in all host and domain
names, upper and lower case are considered the same, thus "mark@[Link]",
"mark@[Link]", and "mark@[Link]" are all equivalent. User names
may or may not be case sensitive, for example, "Billy@[Link]" might be
different from "BillY@[Link]". Programs should avoid changing the case of
electronic addresses when forwarding news or mail.
Date
The "Date" line is the date that the message was originally posted to the network. Its
format must be acceptable both in RFC-822 and to the getdate(3) routine that is provided
with the Usenet software. This date remains unchanged as the message is propagated
throughout the network. One format that is acceptable to both is:
Wdy, DD Mon YY HH:MM:SS TIMEZONE

Several examples of valid dates appear in the sample message above. Note in particular
that ctime(3) format:
Wdy Mon DD HH:MM:SS YYYY

is not acceptable because it is not a valid RFC-822 date. However, since older software
still generates this format, news implementations are encouraged to accept this format
and translate it into an acceptable format.
Newsgroups
The "Newsgroups" line specifies the newsgroup or newsgroups in which the message
belongs. Multiple newsgroups may be specified, separated by a comma. Newsgroups
specified must all be the names of existing newsgroups, as no new newsgroups will be
created by simply posting to them.
Wildcards (e.g., the word "all") are never allowed in a "News- groups" line. For example,
a newsgroup [Link] is illegal, although a newsgroup [Link] is permitted.

256
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

Subject
The "Subject" line (formerly "Title") tells what the message is about. It should be
suggestive enough of the contents of the message to enable a reader to make a decision
whether to read the message based on the subject alone. If the message is submitted in
response to another message (e.g., is a follow-up) the default subject should begin with
the four characters "Re:", and the "References" line is required. For follow-ups, the use of
the "Summary" line is encouraged.
Message-ID
The "Message-ID" line gives the message a unique identifier. The Message-ID may not
be reused during the lifetime of any previous message with the same Message-ID. (It is
recommended that no Message-ID be reused for at least two years.) Message-ID's have
the syntax:
<string not containing blank or ">">

In order to conform to RFC-822, the Message-ID must have the format:


<unique@full_domain_name>

where full_domain_name is the full name of the host at which the message entered the
network, including a domain that host is in, and unique is any string of printing ASCII
characters, not including "<" (left angle bracket), ">" (right angle bracket), or "@" (at
sign).
Path
This line shows the path the message took to reach the current system. When a system
forwards the message, it should add its own name to the list of systems in the "Path" line.
The names may be separated by any punctuation character or characters (except "." which
is considered part of the hostname). Thus, the following are valid entries:
cbosgd!mhuxj!mhuxt
cbosgd, mhuxj, mhuxt
@[Link],@[Link],@[Link]
teklabs, zehntel, sri-unix@cca!decvax

2. Optional Headers

Reply-To
This line has the same format as "From". If present, mailed replies to the author should be
sent to the name given here. Otherwise, replies are mailed to the name on the "From"
line. (This does not prevent additional copies from being sent to recipients named by the
replier, or on "To" or "Cc" lines.) The full name may be optionally given, in parentheses,
as in the "From" line.
Sender
This field is present only if the submitter manually enters a "From" line. It is intended to
record the entity responsible for submitting the message to the network. It should be
verified by the software at the submitting host.

257
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

For example, if John Smith is visiting CCA and wishes to post a message to the network,
using friend Sarah Jones' account, the message might read:

From: smith@[Link] (John Smith)


Sender: jones@[Link] (Sarah Jones)

If a gateway program enters a mail message into the network at host [Link], the
lines might read:
From: [Link]@[Link]
Sender: network@[Link]

The primary purpose of this field is to be able to track down messages to determine how
they were entered into the network. The full name may be optionally given, in
parentheses, as in the "From" line.
Followup-To
This line has the same format as "Newsgroups". If present, follow- up messages are to be
posted to the newsgroup or newsgroups listed here. If this line is not present, follow-ups
are posted to the newsgroup or newsgroups listed in the "Newsgroups" line.
If the keyword poster is present, follow-up messages are not permitted. The message
should be mailed to the submitter of the message via mail.
Expires
This line, if present, is in a legal USENET date format. It specifies a suggested expiration
date for the message. If not present, the local default expiration date is used. This field is
intended to be used to clean up messages with a limited usefulness, or to keep important
messages around for longer than usual. For example, a message announcing an upcoming
seminar could have an expiration date the day after the seminar, since the message is not
useful after the seminar is over. Since local hosts have local policies for expiration of
news (depending on available disk space, for instance), users are discouraged from
providing expiration dates for messages unless there is a natural expiration date
associated with the topic. System software should almost never provide a default
"Expires" line. Leave it out and allow local policies to be used unless there is a good
reason not to.
References
This field lists the Message-ID's of any messages prompting the submission of this
message. It is required for all follow-up messages, and forbidden when a new subject is
raised. Implementations should provide a follow-up command, which allows a user to
post a follow-up message. This command should generate a "Subject" line which is the
same as the original message, except that if the original subject does not begin with "Re:"
or "re:", the four characters "Re:" are inserted before the subject. If there is no
"References" line on the original header, the "References" line should contain the
Message-ID of the original message (including the angle brackets). If the original
message does have a "References" line, the follow-up message should have a
"References" line containing the text of the original "References" line, a blank, and the
Message-ID of the original message.

258
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The purpose of the "References" header is to allow messages to be grouped into


conversations by the user interface program. This allows conversations within a
newsgroup to be kept together, and potentially users might shut off entire conversations
without unsubscribing to a newsgroup. User interfaces need not make use of this header,
but all automatically generated follow-ups should generate the "References" line for the
benefit of systems that do use it, and manually generated follow-ups (e.g., typed in well
after the original message has been printed by the machine) should be encouraged to
include them as well.

It is permissible to not include the entire previous "References" line if it is too long. An
attempt should be made to include a reasonable number of backwards references.

Control
If a message contains a "Control" line, the message is a control message. Control
messages are used for communication among USENET host machines, not to be read by
users. Control messages are distributed by the same newsgroup mechanism as ordinary
messages. The body of the "Control" header line is the message to the host.
For upward compatibility, messages that match the newsgroup pattern "[Link]" should
also be interpreted as control messages. If no "Control" header is present on such
messages, the subject is used as the control message. However, messages on newsgroups
matching this pattern do not conform to this standard.

Also for upward compatibility, if the first 4 characters of the "Subject:" line are "cmsg",
the rest of the "Subject:" line should be interpreted as a control message

[Link] Messages
This section lists the control messages currently defined. The body of the "Control"
header line is the control message. Messages are a sequence of zero or more words,
separated by white space (blanks or tabs). The first word is the name of the control
message, remaining words are parameters to the message. The remainder of the header
and the body of the message are also potential parameters; for example, the "From" line
might suggest an address to which a response is to be mailed.
Implementors and administrators may choose to allow control messages to be carried out
automatically, or to queue them for annual processing. However, manually processed
messages should be dealt with promptly.

Failed control messages should NOT be mailed to the originator of the message, but to
the local "usenet" account.

Cancel

cancel <Message-ID>

259
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

If a message with the given Message-ID is present on the local system, the message is
cancelled. This mechanism allows a user to cancel a message after the message has been
distributed over the network.
Ihave/Sendme

ihave <Message-ID list> [<remotesys>]


sendme <Message-ID list> [<remotesys>]

This message is part of the ihave/sendme protocol, which allows one host (say A) to tell
another host (B) that a particular message has been received on A. Suppose that host A
receives message "<1234@[Link]>", and wishes to transmit the message
to host B.
Newgroup

newgroup <groupname> [moderated]


This control message creates a new newsgroup with the given name. Since no messages
may be posted or forwarded until a newsgroup is created, this message is required before
a newsgroup can be used. The body of the message is expected to be a short paragraph
describing the intended use of the newsgroup.
Rmgroup

rmgroup <groupname>

This message removes a newsgroup with the given name. Since the newsgroup is
removed from every host on the network, this command should be used carefully by a
responsible administrator. The rmgroup message should be ignored unless there is an
"Approved:" line in the same message header.
Sendsys

sendsys (no arguments)


The sys file, listing all neighbors and the newsgroups to be sent to each neighbor, will be
mailed to the author of the control message ("Reply-To", if present, otherwise "From").
This information is considered public information, and it is a requirement of membership
in USENET that this information be provided on request, either automatically in response
to this control message, or manually, by mailing the requested information to the author
of the message. This information is used to keep the map of USENET up to date, and to
determine where netnews is sent.

4. Transmission Methods
USENET is not a physical network, but rather a logical network resting on top of several
existing physical networks. These networks include, but are not limited to, UUCP, the
Internet, an Ethernet, the BLICN network, an NSC Hyperchannel, and a BERKNET.
What is important is that two neighboring systems on USENET have some method to get
a new message, in the format listed here, from one system to the other, and once on the
receiving system, processed by the netnews software on that system. (On UNIX systems,

260
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

this usually means the rnews program being run with the message on the standard input.
<1>)
It is not a requirement that USENET hosts have mail systems capable of understanding
the Internet mail syntax, but it is strongly recommended. Since "From", "Reply-To", and
"Sender" lines use the Internet syntax, replies will be difficult or impossible without an
Internet mailer. A host without an Internet mailer can attempt to use the "Path" header
line for replies, but this field is not guaranteed to be a working path for replies. In any
event, any host generating or forwarding news messages must have an Internet address
that allows them to receive mail from hosts with Internet mailers, and they must include
their Internet address on their From line.

Remote Execution

Some networks permit direct remote command execution. On these networks, news may
be forwarded by spooling the rnews command with the message on the standard [Link]
is important that the message be sent via a reliable mechanism, normally involving the
possibility of spooling, rather than direct real-time remote execution. This is because, if
the remote system is down, a direct execution command will fail, and the message will
never be delivered. If the message is spooled, it will eventually be delivered when both
systems are up.
Transfer by Mail

On some systems, direct remote spooled execution is not possible. However, most
systems support electronic mail, and a news message can be sent as mail. One approach
is to send a mail message which is identical to the news message: the mail headers are the
news headers, and the mail body is the news body. By convention, this mail is sent to the
user newsmail on the remote machine.
One problem with this method is that it may not be possible to convince the mail system
that the "From" line of the message is valid, since the mail message was generated by a
program on a system different from the source of the news message. Another problem is
that error messages caused by the mail transmission would be sent to the originator of the
news message, who has no control over news transmission between two cooperating
hosts and does not know whom to contact. Transmission error messages should be
directed to a responsible contact person on the sending machine.

A solution to this problem is to encapsulate the news message into a mail message, such
that the entire message (headers and body) are part of the body of the mail message. The
convention here is that such mail is sent to user rnews on the remote system. A mail
message body is generated by prepending the letter N to each line of the news message,
and then attaching whatever mail headers are convenient to generate. The N's are attached
to prevent any special lines in the news message from interfering with mail transmission,
and to prevent any extra lines inserted by the mailer (headers, blank lines, etc.) from
becoming part of the news message. A program on the receiving machine receives mail to

261
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

rnews, extracting the message itself and invoking the rnews program. An example in this
format might look like this:

Date: Mon, 3 Jan 83 [Link] MST


From: news@[Link]
Subject: network news message
To: rnews@[Link]

NPath: cbosgd!mhuxj!harpo!utah-cs!sask!derek
NFrom: derek@[Link] (Derek Andrew)
NNewsgroups: [Link]
NSubject: necessary test
NMessage-ID: <176@[Link]>
NDate: Mon, 3 Jan 83 [Link] MST
N
NThis really is a test. If anyone out there more than 6
Nhops away would kindly confirm this note I would
Nappreciate it. We suspect that our news postings
Nare not getting out into the world.
N

Using mail solves the spooling problem, since mail must always be spooled if the
destination host is down. However, it adds more overhead to the transmission process (to
encapsulate and extract the message) and makes it harder for software to give different
priorities to news and mail.
Batching

Since news articles are usually short, and since a large number of
messages are often sent between two sites in a day, it may make sense
to batch news articles. Several articles can be combined into one large
article, using conventions agreed upon in advance by the two sites. One
such batching scheme is described here; its use is still considered

5. The News Propagation Algorithm


This section describes the overall scheme of USENET and the algorithm followed by
hosts in propagating news to the entire logical network. Since all hosts are affected by
incorrectly formatted messages and by propagation errors, it is important for the method
to be standardized.
USENET is a directed graph. Each node in the graph is a host computer, and each arc in
the graph is a transmission path from one host to another host. Each arc is labeled with a
newsgroup pattern, specifying which newsgroup classes are forwarded along that link.
Most arcs are bidirectional, that is, if host A sends a class of newsgroups to host B, then
host B usually sends the same class of newsgroups to host A. This bidirectionality is not,
however, required.

262
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

USENET is made up of many subnetworks. Each subnet has a name, such as comp or btl.
Each subnet is a connected graph, that is, a path exists from every node to every other
node in the subnet. In addition, the entire graph is (theoretically) connected. (In practice,
some political considerations have caused some hosts to be unable to post messages
reaching the rest of the network.)

A message is posted on one machine to a list of newsgroups. That machine accepts it


locally, then forwards it to all its neighbors that are interested in at least one of the
newsgroups of the message. (Site A deems host B to be "interested" in a newsgroup if the
newsgroup matches the pattern on the arc from A to B. This pattern is stored in a file on
the A machine.) The hosts receiving the incoming message examine it to make sure they
really want the message, accept it locally, and then in turn forward the message to all
their interested neighbors. This process continues until the entire network has seen the
message.

An important part of the algorithm is the prevention of loops. The above process would
cause a message to loop along a cycle forever. In particular, when host A sends a message
to host B, host B will send it back to host A, which will send it to host B, and so on. One
solution to this is the history mechanism. Each host keeps track of all messages it has
seen (by their Message-ID) and whenever a message comes in that it has already seen, the
incoming message is discarded immediately. This solution is sufficient to prevent loops,
but additional optimizations can be made to avoid sending messages to hosts that will
simply throw them away.

One optimization is that a message should never be sent to a machine listed in the "Path"
line of the header. When a machine name is in the "Path" line, the message is known to
have passed through the machine. Another optimization is that, if the message originated
on host A, then host A has already seen the message. Thus, if a message is posted to
newsgroup [Link], it will match the pattern [Link] (where all is a metasymbol that
matches any string), and will be forwarded to all hosts that subscribe to [Link] (as
determined by what their neighbors send them). These hosts make up the misc
subnetwork. A message posted to [Link] will reach all hosts receiving [Link], but will
not reach hosts that do not get [Link]. In effect, the messages reaches the btl subnetwork.
A messages posted to newsgroups [Link],[Link] will reach all hosts subscribing
to either of the two classes.

World Wide Web

The World Wide Web (WWW) is combination of all resources and users on the Internet
that are using the Hypertext Transfer Protocol (HTTP).

263
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The Web, as it's commonly known, is often confused with the internet. Although the two
are intricately connected, they are different things. The internet is, as its name implies, a
network -- a vast, global network that incorporates a multitude of lesser networks. As
such, the internet consists of supporting infrastructure and other technologies. In contrast,
the Web is a communications model that, through HTTP, enables the exchange of
information over the internet.

Tim Berners-Lee is the inventor of the Web and the director of the W3C, the organization
that oversees its development. Berners-Lee developed hypertext, the method of instant
cross-referencing that supports communications on the Web, making it easy
to link content on one web page to content located elsewhere. The introduction of
hypertext revolutionized the way people used the internet.

In 1989, Berners-Lee began work on the first World Wide Web server at CERN. He
called the server "httpd” and dubbed the first client "WWW.” Originally, WWW was just
a WYSIWYG hypertext browser/editor that ran in the NeXTStep environment.

Architecture of WWW

• WWW is basically a distributed client-server service. It this, a client can access the
services from a server using a browser.

• These services are usually distributed over many locations called sites or websites.

• From the user's point of view web consists of a vast worldwide collection of documents
called web pages. These web pages reside on different sites or machines all over the
world.

• Each web page can contain link to other pages any where in the world. By clicking on
such link user can access another web page.

• This kind of link can be in form of string of text or picture, sound, movie clip etc.

• Such a text or image that enables the user to link to another web page is called
hyperlink.

264
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• The string of text that points to another web page is called hypertext. The difference
between the normal text and hypertext is that, when you take the mouse pointer over it, it
changes into a hand shaped cursor. Such a text is sometime, underlined and blue is colour.

• Hypermedia is enhanced form of a hyperlink which not only links to the other pages or
other sections within the same page but can also link with various medium like sound,
animation, movie clip etc, Hypermedia is grouping of different media like sound,
graphics, animations and text in a single file.

• These hyperlinks are created with the help of specialized language called Hypertext
Mark up Language (HTML).

• In order to access these web pages on different sites, each of these pages has a specific
address called Uniform Resource Locator (URL).

• Web pages are viewed with a program called a browser.

URL

A URL (Uniform Resource Locator) is a form of URI and is a standardized naming


convention for addressing documents accessible over the Internet and Intranet.

Overview of a URL

265
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

[Link] [Link]/jargon/u/[Link]

Below is additional information about each of the sections of the http URL for this page.

http:// or https://

The "http" stands for HyperText Transfer Protocol and is what enables the browser to
know what protocol it is going to use to access the information specified in the domain.
An "https" protocol is short for "Hypertext Transfer Protocol Secure" and indicates that
information transmitted over HTTP is encrypted and secure. After the http or https is
the colon ( : ) and two forward slashes ( // ) that separate the protocol from the remainder
of the URL.

www.

Next, "www" stands for World Wide Web and is used to distinguish the content. This
portion of the URL is not required and many times can be left out. For example, typing
"[Link] would still get you to the xyz web page. This portion of the address can
also be substituted for an important sub page known as a sub domain.

[Link]

Next, "[Link]" is the domain name for the website. The last portion of the domain is
known as the domain suffix, or TLD, and is used to identify the type or location of the
website. For example, ".com" is short for commercial, ".org" is short for an organization,
and ".[Link]" is the United Kingdom. There are dozens of other domain suffixes available.
To get a domain, you would register the name through a domain registrar.

/jargon/u/

Next, the "jargon" and "u" portions of the above URL are the directories of where on the
server the web page is located. In this example, the web page is two directories deep, so if
you were trying to find the file on the server, it would be in
the /public_html/jargon/udirectory. With most servers, the public_html directory is the
default directory containing the HTML files.

[Link]

Finally, [Link] is the actual web page on the domain you're viewing. The trailing .htm is
the file extension of the web page that indicates the file is an HTML file. Other common
file extensions on the Internet include .html, .php, .asp, .cgi, .xml, .jpg, and .gif. Each of
these file extensions performs a different function, just like all the different types of files
on your computer.

266
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

WWW Operation
WWW works on client- server approach. Following steps explains how the web works:
1. User enters the URL of the web page in the address bar of web browser.
2. Then browser requests the Domain Name Server for the IP address corresponding
to [Link].
3. After receiving IP address, browser sends the request for web page to the web
server using HTTP protocol which specifies the way the browser and web server
communicates.
4. Then web server receives request using HTTP protocol and checks its search for
the requested web page. If found it returns it back to the web browser and close
the HTTP connection.
5. Now the web browser receives the web page, It interprets it and display the
contents of web page in web browser’s window.

Static Web Documents

A static web page (sometimes called a flat page/stationary page) is a web page that is
delivered to the user exactly as stored, in contrast to dynamic web pages which are
generated by a web application.

Consequently, a static web page displays the same information for all users, from all
contexts, subject to modern capabilities of a web server to negotiate content-type or
language of the document where such versions are available and the server is configured
to do so.

Dynamic Web Documents

A server-side dynamic web page is a web page whose construction is controlled by


an application server processing server-side scripts. In server-side
scripting, parameters determine how the assembly of every new web page proceeds,
including the setting up of more client-side processing.

267
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

A client-side dynamic web page processes the web page using HTML scripting running
in the browser as it loads. JavaScript and other scripting languages determine the way the
HTML in the received page is parsed into the Document Object Model, or DOM, that
represents the loaded web page. The same client-side techniques can then dynamically
update or change the DOM in the same way.

HTTP

The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed,


collaborative, and hypermedia information systems. HTTP is the foundation of data
communication for the World Wide Web.

Hypertext is structured text that uses logical links (hyperlinks) between nodes containing
text. HTTP is the protocol to exchange or transfer hypertext.

HTTP Methods
GET-The GET method requests a representation of the specified resource. Requests
using GET should only retrieve data and should have no other effect.
HEAD-The HEAD method asks for a response identical to that of a GET request, but
without the response body. This is useful for retrieving meta-information written in
response headers, without having to transport the entire content.
POST-The POST method requests that the server accept the entity enclosed in the request
as a new subordinate of the web resource identified by the URI. The data POSTed might
be, for example, an annotation for existing resources; a message for a bulletin board,
newsgroup, mailing list, or comment thread; a block of data that is the result of
submitting a web form to a data-handling process; or an item to add to a database.
PUT-The PUT method requests that the enclosed entity be stored under the supplied URI.
If the URI refers to an already existing resource, it is modified; if the URI does not point
to an existing resource, then the server can create the resource with that URI.
DELETE-The DELETE method deletes the specified resource.
TRACE-The TRACE method echoes the received request so that a client can see what (if
any) changes or additions have been made by intermediate servers.
OPTIONS-The OPTIONS method returns the HTTP methods that the server supports for
the specified URL. This can be used to check the functionality of a web server by
requesting '*' instead of a specific resource.
CONNECT-The CONNECT method converts the request connection to a
transparent TCP/IP tunnel, usually to facilitate SSL-encrypted communication (HTTPS)
through an unencrypted HTTP proxy.

Multimedia

Information which is stored in different forms could be combined and used in


different combinations. Multimedia can be recorded and played, displayed, dynamic,
interacted with or accessed by information processing devices, such as computerized
and electronic devices Multimedia devices are electronic media devices used to store
and experience multimedia content. This process has given rise to the term ‘Multi-

268
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

media’. This combination of different media for communication has influenced and
changed all aspects of our life, including the teacher and the learner. Multimedia has
become an inevitable part of any presentation. We have seen that it has found a
variety of applications right from entertainment to education. The evolution of
internet has also increased the demand for multimedia content. Multimedia is a term
used to describe how multiple means of media like text, audio, graphics, animation,
video, and interactivity are used to communicate information . It is also often used to
describe any computer media. This helps us to understand information at a faster
rate.

Elements of Multimedia

The different building blocks of Multimedia are Text, Images and graphics, Audio, Video,
and Animation. Any multimedia application consists any or all of them. Let us learn
about each one of them

• Text - ASCII/Unicode, HTML, Postscript, PDF


• Audio – Sound, music, speech, structured audio (e.g. MIDI)
• Still Image - Facsimile, photo, scanned image, photographs, drawings, maps and slides
• Video (Moving Images) – Movie, a sequence of pictures
• Graphics – Computer produced image
• Animation – A sequence of graphics images

1. Text: Text and symbols are very important for communication in any medium. Using
text in online training has many advantages: text files are small so they perform well at
low bandwidth, the user can search for specific words or phrases, and text can be easily
updated.

2. Images and Graphics: Images play a very important role in a multimedia. It is


expressed in the form of still picture, painting or a photograph taken through a digital
camera. The points at which an image is sampled are known as picture elements,
commonly abbreviated as pixels. The pixel values of intensity images are called
grayscale levels.

These images can be edited with the help of few of the software like general drawing
programs, Corel Photo Paint, Macromedia Fireworks , Corel Draw , and Open Office

Most Web browsers can display GIF and JPEG graphics files.

3. Audio: Audio can enhance learning concepts and reinforce ideas presented as text or
graphics on the screen. Using audio may be essential to the teaching of topics such as a
foreign language or music appreciation. There are three types of audio assets that are
commonly used in e-learning: Music,Narration (voice-overs),Sound effects

269
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

4. Video: Although video requires lots of bandwidth to download, it is very useful for
conveying certain information. Using video in e-learning helps realistically demonstrate
equipment and processes among other things.
5. Animation: Animation illustrates concepts with movement, shows processes, or draws
attention to a region or elements of a screen. Since animations usually involve graphics,
they are highly dependent upon the size and file type of the graphics that are being
animated. Animation Formats: There are many ways you can create animations. Author
ware, Dreamweaver, Director and Flash can all create animations.

ISDN

Telephone and mobile growth has increased through out the world. To provide better
quality and to combine digital telephony with data transport services ISDN was
introduced in 1979 along with ITU-T. ISDN is the set of protocols which helps digitize
existing telephone network so that video,voice and text can be transmitted over these
telephone lines. It is referred as Integrated Digital Services Network.

ISDN services are categorized into bearer services,teleservices and supplementary


services.

• Bearer services in which network does not manipulate user information. Voice,data and
video utilize this service. It operates on OSI layer 1 to layer 3. These services are
provided with the help of circuit switched,packet switched , cell switched and frame
switched networks.

• Teleservices in which network change the information contents. It operates on layer 4


to layer 7 of the OSI model. Telex,telephone and teleconferencing utilize this service.

• Supplementary services utilize features of both bearer and teleservices. The


applications are call waiting,message handling and reverse charging.

270
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

ISDN Architecture

There are three main types of channels used in the ISDN network viz. bearer(B), data(D)
and hybrid(H) channels. Different data rates can be obtained by the user with
combinations of these channels. One bearer channel supports 64 kbps, one data channel
supports between 16 to 64 kbps. One hybrid channel supports 384 or 1536 or 1920 kbps
data rates. There are two main types of digital subscriber loops supported in ISDN to
fulfill user requirements.

Basic Rate Interface(BRI): Supports two B channels and 1 D channel. Hence supports
about 192 kbps with 64 kbps B channel, 16 kbps D channel and 48 overhead.

Primary Rate Interface(BRI):Supports 23 B channels and 1 D channel. Hence supports


about 1.544 Mbps with 64 kbps B channel, 64 kbps D channel and 8 overhead.
Refer ISDN BRI vs ISDN PRI➤ interface types.

As shown in the figure,TE1,TE2,TA,NT1 and NT2 are components used in a typical


ISDN network with functions as described below.

• Terminal Equipment-1 or TE1 is used to interface ISDN terminal with the network.

271
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• Terminal Equipment-2 or TE2 is used to interface Non-ISDN terminal with the


network such as Plain Old Telephony.

• Terminal Adapter or TA Allows non ISDN devices to be interfaced with ISDN


network.

• Network Termination-1 or NT1 is physical layer device which separates user premises
from phone company.

• Network Termination-2 or NT2 functions as per OSI layers 2 to 3. PBX and LAN are
considered as NT-2 devices.

• Reference points are used to identify interfaces between two ISDN elements.

15 digits are used in ISDN addressing as defined in E.164.

ISDN is the short form of Integrated Services Digital Network. As the name suggests, it
is used to replace old analog local loop connection provided to the subscriber. It allows
PCs to directly use the digital line connections without the need of modem.

It uses same twisted pair cable used earlier for digital data transmission. The main
application of ISDN is high speed internet.

ISDN BRI-Basic Rate Interface

• This ISDN interface type uses single twisted pair for signal transmission.
• ISDN BRI interface uses time multiplexing of 2 bearer channels ('B') for voice and 1
channel for Data control ('D').
• Each B channels have capacity of 64 Kbps while D channel has capacity of 16 Kbps.
• B-channel carry all types of data including voice while D-channel carry signalling and
control functions e.g. busy signal, dial tones etc.
• In ISDN BRI, one B channel is normally used as transmission line and the other B-
channel is used as receiving line.
• It is mainly used to provide single connection to home premises.

272
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

ISDN PRI-Primary Rate Interface

• The ISDN PRI interface uses 23 numbers of B channel and 1 number D channel.
• Each B channel has capacity of 64 Kbps while D channel has capacity of 64 Kbps. This
leads to total capacity of 1.536 Mbps on ISDN PRI interface.
• ISDN PRI is mainly used to provide connection to larger office premises. It creates
small PBX in the large company.
• It is T1 compliant interface.

ATM

ATM Cell Structure

The cell is formed of exactly 53 bytes, comprising 5 bytes of header and 48 bytes of data.

The data area contains a fragment of a user packet, generally a fragment of an IP packet.
Of the 48 bytes from the upper layer, up to 4 bytes can relate supervision, that is to say,
the packet fragmentation is carried out in 44-byte block. The 4 bytes of supervision are
detailed somewhat further, in the section devoted to the upper layer or AAL (ATM
adaption layer).

273
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The 5-byte ATM frame's supervision forming the header is shown in Figure.

The header

In the header, the bit GFC (Generic Flow Control) is used for access control and flow
control at the terminal portion, between the user and the network. When multiple users
want to enter the ATM network through a single point of entry, it must order their
requests. This control is simultaneously an access technique, such as LANs, and a flow
control on what goes into the network. Unfortunately for the ATM world, this area has
never been standardized, which is a strong handicap for user interfaces. In the absence of
standard terminal interfaces, it was not possible to compete with ATM IP interface, which
eventually prevailed in all terminal machines.

In the control field, 3 bits PT (Payload Type) define the type of information transported
into the cell, including the management and control of the network. The eight options for
this field are:

• 000: User data cell, no congestion; indication of an ATM network the user level to
another user of the ATM network = 0;

• 001: User data cell, no congestion; indication of an ATM network the user level to
another user of the ATM network = 1;

274
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

• 010: User data cell, congestion; indicating a level of the user ATM network to another
user of the ATM network = 0;

• 011: User data cell, congestion; indicating a level of the user ATM network to another
user of the ATM network = 1;

• 100: management unit for the OAM F5 segment;

• 101: management unit for the OAM F5 end to end;

• 110: cell for resource management;

• 111: reserved for future functions.

Then comes the CLP (Cell Loss Priority), which indicates whether the cell can be lost
(CLP = 1) or, conversely, if it is large (CLP = 0). This bit's function assist in flow control.
Before transmitting a cell in the network, it should be respect a Fed rate negotiated at the
time of the opening of the virtual circuit. He is always possible to enter cells redundant,
but we must provide them with a indicator to identify compared to baseline. The operator
of ATM network can lose data redundant to enable information inputs as part of the
control flow to pass smoothly.

The last part of the control area, the HEC (Header Error Control), is for the protection of
the header. This field allows to detect and correct an error in standard mode. When an
error in the header is detected and a correction is not possible, the cell is destroyed. We
return to this point a little further to describe the procedure and demonstrate the use of
this field to edit the timing when it is lost.

As explained two interfaces were defined in ATM: the input UNI and the network output
and the NNI between two nodes within the network. The ATM cell structure is not
exactly the same on both interfaces. The ATM cell structure on the UNI is illustrated in
Figure on one and the NNI in Figure.

The GFC field is used to control the flow of cells entering the network, the multiplexing
and reduce congestion periods of the end user network, called CPN (Customer Premise
Network). GFC provides the performance required by the user, as the bandwidth
allocated or negotiated traffic rates. The ITU-T has defined in recommendation I.361 two
sets of procedures for GFC, transmission procedures controlled and uncontrolled ones.
For non-controlled transmission procedures, 0000 is placed in the GFC field. In this case,
the GFC has no role.

275
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

In summary, the two main functions performed by the GFC are:

• The short-term flow control;

• The control of the quality of service within the end user system.

The GFC field only exists on the UNI. The four bits of the GFC field are replaced within
the network on the NNI interfaces by four other bits, which are expanding the reference.
When a user positions the four GFC bits on its interface, these four bits are cleared in the
network to be replaced by additional reference number and therefore never reach the
recipient. In other words, these four bits can be used for transmission of information from
end to end but only locally on the input interface in the network.

ATM Layered Architecture


ATM protocol layers include AAL layer, ATM layer and ATM Physical layer.

276
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The figure-1 depicts ATM protocol layers at end host points and at ATM switch. As
shown end systems i.e. host-A and host-B consists of PHY layer, ATM layer, AAL layer
and upper layers. ATM switch consists of only two layers i.e. ATM layer and physical
layer.

277
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

The figure-2 depicts ATM protocol stack which consits of ATM physical layer (similar to
OSI layer-1), ATM layer and AAL layer. Upper layers reside above AAL layer. Let us
understand functions of all the ATM protocol layers including sublayers (if any).

The functionalities of all the ATM protocol layers are categorized into control plane, user
plane and management plane.
➨User plane layers handle user information transfer and required associated controls e.g.
error control and flow control.
➨Control plane takes care of call and connection related control signals.
➨Management plane is divided into plane and layer management. Plane management
manages whole system functionality. Layer management takes care of managemement of
all resources and parameters of the protocol entities.

AAL-ATM Adaptation Layer

AAL layer in ATM protocol stack consists of two sublayers viz. convergence sublayer
and SAR (Segmentation and Reassembly) sublayer. ATM AAL layer does following
functions:

• AAL does encapsulation of user data generated by upper layers.

• It does segmentation of data into small size ATM cells of size 48 bytes at transmit host.
It does re-assembly of segmented data at the receive host.

ATM Layer

Following are the functions performed by ATM layer in ATM protocol layers:

• This layer incorporates header (of size 5 bytes) to segmented cells of size 48 bytes each.

278
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network

ATM layer does this header generation at transmit end and header extraction at receive
end.

• It is responsible for generic flow control.

• It does VPI vs VCI translation.

• It takes care of cell multiplexing and demultiplexing i.e. multiplexing of logical


channels to one physical channel and viceversa.

• ATM layer provides variety of services for ATM cells from ATM virtual connection.

ATM Physical Layer

ATM physical layer in protocol stack consists of Transmission Convergence sublayer and
Physical Medium Dependent Sublayer. It performs following functions:

• Transmission convergence sublayer takes care of following:


-HEC header sequence generation as well as verification
-Cell Delineation
-Transmit frame generation and recovery

• Physical Medium Dependent sublayer takes care of following:


-Bit timing
-Physical medium related encoding and decoding of bits

Related Questions:-
Q1. Write short note on NNI Cell of ATM and VNI Cell of ATM.
[Link] the following with brief explanation:
a) USENET d)Multimedia e)Email f)ISDN g)DNS

Q3. What is working of SNMP?


Q4. Briefly explain network security and Attacks
Q5. Explain one public key algorithm used for encryption of data.

279

You might also like