Network Topology and Data Security Insights
Network Topology and Data Security Insights
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.
And in case, if there were no nodes, then there would be no network at all.
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
dedicated server
non-dedicated server
Non-dedicated Server
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.
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).
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.
3
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
Home Applications
Computer Network is used in the mobile device like telephone, Smartphone, tablets, etc
for communication, the internet, file sharing, etc.
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.
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
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.
1. It is cost effective.
6
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
4. It is easy to understand.
2. If network traffic is heavy or nodes are more the performance of the network
decreases.
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.
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.
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.
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.
8
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
3. Easy to troubleshoot.
5. Only that node is affected which has failed, rest of the nodes can work smoothly.
2. Expensive to use.
3. If the hub fails then the whole network is stopped because all the nodes depend on
the hub.
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.
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.
1. Fully connected.
2. Robust.
3. Not flexible.
2. It is robust.
10
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
11
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
1. Heavily cabled.
2. Costly.
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
2. Effective.
4. Flexible.
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
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.
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.
Sharing common resources like printers etc are some common applications of
LAN.
Advantages of LAN
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.
Covers Limited Area: Local Area Network covers a small area like one office,
one building or a group of nearby buildings.
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
Communication medium used for MAN are optical fibers, cables etc.
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.
Disadvantages of MAN
More cable required for a MAN connection from one place to another.
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
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.
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).
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
1. System interconnection
2. Wireless LANs
3. Wireless WANs
System Interconnection
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 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
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.
21
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
These are the two services given by the layers to layers above them. These services are :
2. Connectionless Services
1. Connection is established
2. Information is sent
3. Connection is released
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.
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.
22
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
Service Primitives
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
FACILITY, Primitive for enquiring about the performance of the network, like
REPORT delivery statistics.
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.
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
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.
26
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
The OSI reference model has 7 layers. The principles that were applied to arrive at the
seven layers can be briefly summarized as follows:
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.
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.
29
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
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.
1. It routes the signal through different channels from one node to other.
4. It divides the outgoing messages into packets and assembles the incoming packets
into messages for higher levels.
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
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.
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.
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.
1. OSI model distinguishes well between the services, interfaces and protocols.
31
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
32
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
2. Protocol is used to connect to the host, so that the packets can be sent over it.
33
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
4. Order in which packets are received is different from the way they are sent.
o Delivering IP packets
o Performing routing
o Avoiding congestion
5. Transport layer breaks the message (data) into small units so that they are handled
more efficiently by the network 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. It operated independently.
2. It is scalable.
3. Client/server architecture.
Demerits of TCP/IP
35
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
Following are some similarities between 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.
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.
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
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.
37
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
39
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
Topics Covered:
1. Theoretical Coverage of Basis of Data Communication
2. Transmission Media
3. Types of Transmission
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.
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.
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
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.
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 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.
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:
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:
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.
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.
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
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.
Channel Capacity or Maximum Data rate – the maximum rate (in bps)
at which data can be transmitted over a given communication link, or
channel.
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.
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.
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.
50
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
(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
Thus to summarize the relationship between bandwidth, data rate and channel
capacity,
But transmission system & receiver’s capability limit the bandwidth that
can be transmitted
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
4. Distances
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.
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:
52
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
Advantages
Installation is easy
Flexible
Cheap
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
53
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
Eliminates crosstalk
Disadvantages
Difficult to manufacture
Heavy
Applications
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
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.
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
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
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.
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.
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.
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.
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
58
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
Higher bandwidth
Light weight
Disadvantages
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.
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.
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.
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
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.
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.
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
Transmitting station can receive back its own transmission and check whether the
satellite has transmitted information correctly.
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.
It is Very costly
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).
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
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.
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
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.
By limiting the coverage area to within the boundary of the cell, the channel
groups may be reused to cover different cells.
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.
Square
A square cell has four neighbors at distance d and four at distance Root 2 d
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 −
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.
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.
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
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.
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
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
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.
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.
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.
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.
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
Topics Covered
[Link] Channel Allocation Problem
[Link] Methods
[Link] Access Protocols
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.
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.
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.
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.
79
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
Explanation:
80
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
• 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.
• 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.
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.
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
• 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:
2. With probability q = 1 - p, the station waits for the beginning of the next time slot and
checks the line again.
2. If the line is busy, it acts as though a collision has occurred and uses the back off
procedure.
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 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:
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.
• 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.
90
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
• 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:-
92
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer 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
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.
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.
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
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.
95
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
6-Byte Address - Every Ethernet card with globally unique address
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 :
transmission time for frame > 2*propagation time between two farthest
nodes
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.
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
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.
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.
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 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.
100
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
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
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.
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
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.
105
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
107
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
108
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
109
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
Distributed Queues
110
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
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.
112
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer 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.
113
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
Frame control - indicates the size of the address fields and whether the
frame contains asynchronous or synchronous data, together with other
control information
Source Address - contains a 6-byte address that identifies the sending station
End delimiter - a bit pattern that indicates the end of the frame
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
Topics Covered
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.
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:
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.
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:
Data is transmitted.
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.
116
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
118
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
119
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
Error detection - The sender and receiver, either both or any, must ascertain that
there is some error in the transit.
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
Useful Terms:
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:
3. Delayed Acknowledgement:
This is resolved by introducing sequence number for acknowledgement also.
122
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
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.
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 makes the sender wait for some sort of an acknowledgment (ACK) before
continuing to send more data.
Flow control refers to a set of procedures used to restrict the amount of data
the sender can send before waiting for acknowledgement.
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.
126
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
The sender can send as many frames as would fit into a window.
127
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
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.
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
There are generally 3 types of errors occur in data transmission from transmitter to
receiver. They are
• Burst 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.
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,
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
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 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.
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.
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.
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
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
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.
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.
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
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.
Ex:
134
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
Step 1
Let P = 2, then
2P = 22 = 4 and n + P + 1 = 4 + 2 + 1 = 7.
2P = 23 = 8 and n + P + 1 = 4 + 3 + 1 = 8
Step 2
Step 3
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”.
1. Parity Checking
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.
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”.
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.
• 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.
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
• 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.
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
Sender:
Receiver:
Problems :
144
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
1. Lost Data
2. Lost Acknowledgement:
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).
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
147
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
• 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
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.
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 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.
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
Topics Covered
The network layer has been designed with the following goals:
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.
Communication protocols
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.
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:
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.
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.
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.
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.
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.
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.
165
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
Another approach is to have gateways fragment packets, while hosts perform reassemble
(if needed). However, now every host must be prepared to do reassemble.
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.
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
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.
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.
171
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
Anycast Support
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.
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.
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.
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
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.
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 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 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.
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.
182
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
183
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
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
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.
186
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
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.
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.
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.
3. A sequence number;
188
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
There is no hop count limit. (For an IP datagram, the maximum time to live
ensures that loops are avoided.)
Updates are faster and convergence times are reduced. Higher CPU and
memory requirements to maintain link-state databases.
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
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.
Exponential back off protocols that use algorithm feedback to decrease data packet
throughput to acceptable rates
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
1. Open loop
2. Closed loop
• In this method, policies are used to prevent the congestion before it happens.
• 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 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.
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
• 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.
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
• 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
• 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.
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
• 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.
• 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
• 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.
• 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:-
197
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
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.
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
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
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 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.
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.
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.
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.
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.
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
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.
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
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
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.
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.
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.
210
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
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.
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
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
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.
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.
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.
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 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.
Web filtering
E-mail filtering
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
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.
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.
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.
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.
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
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.
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
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.
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.
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.
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
223
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
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.
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
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
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.
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.
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
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.
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 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
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
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 −
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:
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.
o The pair of numbers (n, e) form the RSA public key and is made public.
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).
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.
de = 29 × 5 = 145 = 1 mod 72
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.
C = Pe mod n
233
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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
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.
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.
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.
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.
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:
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.
Top-Level
Example DNS
Name Description
Domain Name
Component
237
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
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.
Zones
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
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.
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.
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.
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.
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.
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.
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.
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].”
Finally, the DNS resolver queries one of Google’s name server for the IP of
“[Link].”
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.
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
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.
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.
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) 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 layouts, fonts and colors which are categorized as rich text.
Support for attachments which may contain executables, audio, images and video
files, etc.
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-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.
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.
1. Connects to the mail server on port 143 (or 993 for SSL/TLS connections);
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.
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:
Advantage: POP3
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.
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
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.
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 :
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.
253
INTERNATIONAL INSTITUTE OF MANAGEMENT, MEDIA & IT
Notes on Computer Network
With these seven data unit types, SNMP is capable of querying for and sending
information about your networked devices.
USENET
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.
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
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.
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 ">">
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:
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
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
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
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
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:
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
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.)
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.
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).
URL
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.
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.
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
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
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
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.
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.
• 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.
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.
• 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
• 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.
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.
• 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
• 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
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;
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
• 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.
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 layer in ATM protocol stack consists of two sublayers viz. convergence sublayer
and SAR (Segmentation and Reassembly) sublayer. ATM AAL layer does following
functions:
• 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.
• ATM layer provides variety of services for ATM cells from ATM virtual connection.
ATM physical layer in protocol stack consists of Transmission Convergence sublayer and
Physical Medium Dependent Sublayer. It performs following functions:
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
279