Data Comm and Comp Networking Lecture Note
Data Comm and Comp Networking Lecture Note
COMPUTER NETWORKING
(COSC2 032)
Lecture Note
Transmission Media............................................................................................................................................... 7
Modes Transmission............................................................................................................................................. 7
COMPUTER NETWORKING................................................................................................................14
Network Applications......................................................................................................................................... 15
Features .............................................................................................................................................................. 37
Multiplexing ....................................................................................................................................................... 41
Network Routing.......................................................................................................................................46
Broadcast routing............................................................................................................................................... 47
Unicast RoutingProtocols....................................................................................................................................... 48
Internetworking .........................................................................................................................................50
Tunneling ........................................................................................................................................................... 50
PHYSICAL LAYER................................................................................................................................55
Signals................................................................................................................................................................. 55
To get some flavor for the focus of data communication, Figure 1.2 provides a new perspective on the
communications model of Figure 1.1a. We trace the details of this figure using electronic mail as an
example. Suppose that the input device and transmitter are components of a personal computer. The
user of the PC wishes to send a message m to another user. The user activates the electronic mail
package on the PC and enters the message via the keyboard (input device). The character string is
briefly buffered in main memory. We can view it as a sequence of bits (g) in memory. The personal
computer is connected to some transmission medium, such as a local network or a telephone line, by
an I/O device (transmitter), such as a local network transceiver or a modem. The input data are
transferred to the transmitter as a sequence of voltage shifts [g(t)] representing bits on some
communications bus or cable. The transmitter is connected directly to the medium and converts the
incoming stream [g(t)] into a signal [s(t)] suitable for transmission; specific alternatives will be
described later on coming sections.
The transmitted signal s(t) presented to the medium is subject to a number of impairments, discussed
in later section, before it reaches the receiver. Thus, the received signal r(t) may differ from s(t). The
receiver will attempt to estimate the original s(t), based on r(t) and its knowledge of the medium,
producing a sequence of bits These bits are sent to the output personal computer, where they are briefly
buffered in memory as a block of bits In many cases, the destination system will attempt to determine
if an error has occurred and, if so, cooperate with the source system to eventually obtain a complete,
error-free block of data. These data are then presented to the user via an output device, such as a printer
or screen. The message as viewed by the user will usually be an exact copy of the original message
(m).
Now consider a telephone conversation. In this case the input to the telephone is a message (m) in the
form of sound waves. The sound waves are converted by the telephone into electrical signals of the
same frequency. These signals are transmitted without modification over the telephone line. Hence the
input signal g(t) and the transmitted signal s(t) are identical. The signals (t) will suffer some distortion
over the medium, so that r(t) will not be identical to s(t). Nevertheless, the signal r(t) is converted back
into a sound wave with no attempt at correction or improvement of signal quality. Thus, is not an exact
replica of m. However, the received sound message is generally comprehensible to the listener. The
discussion so far does not touch on other key aspects of data communications, including data link
control techniques for controlling the flow of data and detecting and correcting errors, and multiplexing
techniques for transmission efficiency
Transmission Terminology
Data transmission occurs between transmitter and receiver over some transmission medium.
Transmission media may be classified as guided or unguided. In both cases, communication is in the
form of electromagnetic waves. With guided media, the waves are guided along a physical path;
examples of guided media are twisted pair, coaxial cable, and optical fiber. Unguided media, also
called wireless, provide a means for transmitting electromagnetic waves but do not guide them;
examples are propagation through air, vacuum, and seawater.
The term direct link is used to refer to the transmission path between two devices in which signals
propagate directly from transmitter to receiver with no intermediate devices, other than amplifiers or
repeaters used to increase signal strength. Note that this term can apply to both guided and unguided
media.
A guided transmission medium is point to point if it provides a direct link between two devices and
those are the only two devices sharing the medium. In a multipoint guided configuration, more than
two devices share the same medium.
A transmission may be simplex, half duplex, or full duplex. In simplex transmission, signals are
transmitted in only one direction; one station is transmitter and the other is receiver. In half-duplex
operation, both stations may transmit, but only one at a time. In full-duplex operation, both stations
may transmit simultaneously. In the latter case, the medium is carrying signals in both directions at the
same time. How this can be is explained in due course. We should note that the definitions just given
are the ones in common use in the United States (ANSI definitions). Elsewhere (ITU-T definitions)
Transmission Media
In a data transmission system, the transmission medium is the physical path between transmitter and
receiver. For guided media, electromagnetic waves are guided along a solid medium, such as copper
twisted pair, copper coaxial cable, and optical fiber. For unguided media, wireless transmission occurs
through the atmosphere, outer space, or water.
The characteristics and quality of a data transmission are determined both by the characteristics of the
medium and the characteristics of the signal. In the case of guided media, the medium itself is more
important in determining the limitations of transmission.
For unguided media, the bandwidth of the signal produced by the transmitting antenna is more
important than the medium in determining transmission characteristics. One key property of signals
transmitted by antenna is directionality. In general, signals at lower frequencies are omnidirectional;
that is, the signal propagates in all directions from the antenna. At higher frequencies, it is possible to
focus the signal into a directional beam.
In considering the design of data transmission systems, key concerns are data rate and distance: the
greater the data rate and distance the better. A number of design factors relating to the transmission
medium and the signal determine the data rate and distance:
• Bandwidth: All other factors remaining constant, the greater the bandwidth of a signal, the
higher the data rate that can be achieved.
• Transmission impairments: Impairments, such as attenuation, limit the distance. For guided
media, twisted pair generally suffers more impairment than coaxial cable, which in turn suffers
more than optical fiber.
• Interference: Interference from competing signals in overlapping frequency bands can distort
or wipe out a signal. Interference is of particular concern for unguided media, but is also a
problem with guided media. For guided media, interference can be caused by emanations from
nearby cables. For example, twisted pairs are often bundled together and conduits often carry
multiple cables. Interference can also be experienced from unguided transmissions. Proper
shielding of a guided medium can minimize this problem.
• Number of receivers: A guided medium can be used to construct a point-to-point link or a
shared link with multiple attachments. In the latter case, each attachment introduces some
attenuation and distortion on the line, limiting distance and/or data rate.
Modes Transmission
The transmission mode decides how data is transmitted between two computers. The binary data in the
form of 1s and 0s can be sent in two different modes: Parallel and Serial.
Parallel Transmission
The binary bits are organized into groups of fixed length. Both sender and receiver are connected in
parallel with the equal number of data lines. Both computers distinguish between high order and low
order data lines. The sender sends all the bits at once on all lines. Because the data lines are equal to
the number of bits in a group or data frame, a complete group of bits (data frame) is sent in one go.
Advantage of Parallel transmission is high speed and disadvantage is the cost of wires, as it is equal
to the number of bits sent in parallel. Serial Transmission In serial transmission, bits are sent one after
another in a queue manner. Serial transmission requires only one communication channel.
It is clear that there must be a high degree of cooperation between the two computer systems. Instead
of implementing the logic for this as a single module, the task is
broken up into subtasks, each of which is implemented separately. In a protocol architecture, the
modules are arranged in a vertical stack. Each layer in the stack performs a related subset of the
functions required to communicate with another system. It relies on the next lower layer to perform
more primitive functions and to conceal the details of those functions. It provides services to the next
higher layer. Ideally, layers should be defined so that changes in one layer do not require changes in
other layers.
Of course, it takes two to communicate, so the same set of layered functions must exist in two systems.
Communication is achieved by having the corresponding, or peer, layers in two systems communicate.
The peer layers communicate by means of formatted blocks of data that obey a set of rules or
conventions known as a protocol. The key features of a protocol are as follows:
• Syntax: Concerns the format of the data blocks
• Semantics: Includes control information for coordination and error handling
• Timing: Includes speed matching and sequencing
In a switched communication network, data entering the network from a station are routed to the
destination by being switched from node to node. For example, in Figure 1.4, data from station A
intended for station F are sent to node 4. They may then be routed via nodes 5 and 6 or nodes 7 and 6
to the destination. Several observations are in order:
1. Some nodes connect only to other nodes (e.g., 5 and 7). Their sole task is the internal (to the
network) switching of data. Other nodes have one or more stations attached as well; in addition
to their switching functions, such nodes accept data from and deliver data to the attached
stations.
2. Node-station links are generally dedicated point-to-point links. Node-node links are usually
multiplexed, using either frequency division multiplexing (FDM) or time division multiplexing
(TDM).
3. Usually, the network is not fully connected; that is, there is not a direct link between every
possible pair of nodes. However, it is always desirable to have more than one possible path
through the network for each pair of stations. This enhances the reliability of the network.
Figure 1.4 Simple Switching Network
Two different technologies are used in wide area switched networks: circuit switching and packet
switching. These two technologies differ in the way the nodes switch information from one link to
another on the way from source to destination.
Circuit switching was developed to handle voice traffic but is now also used for data traffic. The best-
known example of a circuit-switching network is the public telephone network. A public
telecommunications network can be described using four generic architectural components:
• Subscribers: The devices that attach to the network. It is still the case that most subscriber
devices to public telecommunications networks are telephones, but the percentage of data
traffic increases year by year.
• Subscriber line: The link between the subscriber and the network, also referred to as the
subscriber loop or local loop. Almost all local loop connections use twisted-pair wire. The
length of a local loop is typically in a range from a few kilometers to a few tens of kilometers.
• Exchanges: The switching centers in the network. A switching center that directly supports
subscribers is known as an end office. Typically, an end office will support many thousands of
subscribers in a localized area. There are over 19,000 end offices in the United States, so it is
clearly impractical for each end office to have a direct link to each of the other end offices; this
would require on the order of links. Rather, intermediate switching nodes are used.
• Trunks: The branches between exchanges. Trunks carry multiple voice frequency circuits using
either FDM or synchronous TDM.
Packet Switching
The long-haul circuit-switching telecommunications network was originally designed to handle voice
traffic, and the majority of traffic on these networks continues to be voice. A key characteristic of
circuit-switching networks is that resources within the network are dedicated to a particular call. For
voice connections, the resulting circuit will enjoy a high percentage of utilization because, most of the
time, one party or the other is talking. However, as the circuit-switching network began to be used
increasingly for data connections, two shortcomings became apparent:
• In a typical user/host data connection (e.g., personal computer user logged on to a database
server), much of the time the line is idle. Thus, with data connections, a circuit-switching
approach is inefficient.
• In a circuit-switching network, the connection provides for transmission at a constant data rate.
Thus, each of the two devices that are connected must transmit and receive at the same data
rate as the other. This limits the utility of the network in interconnecting a variety of host
computers and workstations.
To understand how packet switching addresses these problems, let us briefly summarize packet-
switching operation. Data are transmitted in short packets. A typical upper bound on packet length is
1000 octets (bytes). If a source has a longer message to send, the message is broken up into a series of
packets in figure 1.5 . Each packet contains a portion (or all for a short message) of the user’s data plus
some control information. The control information, at a minimum, includes the information that the
network requires to be able to route the packet through the network and deliver it to the intended
destination. At each node in route, the packet is received, stored briefly, and passed on to the next node.
Let us return to Figure 1.4, simple packet switching, but now assume that it depicts a simple packet
switching network. Consider a packet to be sent from station A to station E. The packet includes control
information that indicates that the intended destination is E. The packet is sent from A to node 4. Node
4 stores the packet, determines the next leg of the route (say 5), and queues the packet to go out on that
link (the 4–5 link). When the link is available, the packet is transmitted to node 5, which forwards the
packet to node 6, and finally to E. This approach has a number of advantages over circuit switching:
• Line efficiency is greater, because a single node-to-node link can be dynamically shared by
many packets over time. The packets are queued up and transmitted as rapidly as possible over
the link. By contrast, with circuit switching, time on a node-to-node link is pre-allocated using
synchronous time division multiplexing. Much of the time, such a link may be idle because a
portion of its time is dedicated to a connection that is idle.
• A packet-switching network can perform data-rate conversion. Two stations of different data
rates can exchange packets because each connects to its node at its proper data rate.
• When traffic becomes heavy on a circuit-switching network, some calls are blocked; that is, the
network refuses to accept additional connection requests until the load on the network
decreases. On a packet-switching network, packets are still accepted, but delivery delay
increases.
• Priorities can be used. If a node has a number of packets queued for transmission, it can transmit
the higher-priority packets first. These packets will therefore experience less delay than lower-
priority packets.
Switching Technique
If a station has a message to send through a packet-switching network that is of length greater than the
maximum packet size, it breaks the message up into packets and sends these packets, one at a time, to
the network. A question arises as to how the network will handle this stream of packets as it attempts
to route them through the network and deliver them to the intended destination. Two approaches are
used in contemporary networks: datagram and virtual circuit.
In the datagram approach, each packet is treated independently, with no reference to packets that have
gone before.
Each node chooses the next node on a packet’s path, taking into account information received from
neighboring nodes on traffic, line failures, and so on. So the packets, each with the same destination
address, do not all follow the same route, and they may arrive out of sequence at the exit point. In this
example, the exit node restores the packets to their original order before delivering them to the
destination. In some datagram networks, it is up to the destination rather than the exit node to do the
reordering. Also, it is possible for a packet to be destroyed in the network. For example, if a packet-
switching node crashes momentarily, all of its queued packets may be lost. Again, it is up to either the
exit node or the destination to detect the loss of a packet and decide how to recover it. In this technique,
each packet, treated independently, is referred to as a datagram.
In the virtual circuit approach, a preplanned route is established before any packets are sent. Once the
route is established, all the packets between a pair of communicating parties follow this same route
through the network. somewhat similar to a circuit in a circuit-switching network and is referred to as
a virtual circuit. Each packet contains a virtual circuit identifier as well as data. Each node on the
preestablished route knows where to direct such packets; no routing decisions are required. At any
time, each station can have more than one virtual circuit to any other station and can have virtual
circuits to more than one station. So the main characteristic of the virtual circuit technique is that a
route between stations is set up prior to data transfer. Note that this does not mean that this is a dedicated
path, as in circuit switching. A transmitted packet is buffered at each node, and queued for output over
a line, while other packets on other virtual circuits may share the use of the line. The difference from
the datagram approach is that, with virtual circuits, the node need not make a routing decision for each
packet. It is made only once for all packets using that virtual circuit.
If two stations wish to exchange data over an extended period of time, there are certain advantages to
virtual circuits. First, the network may provide services related to the virtual circuit, including
sequencing and error control. Sequencing refers to the fact that, because all packets follow the same
route, they arrive in the original order. Error control is a service that assures not only that packets arrive
in proper sequence, but also that all packets arrive correctly. For example, if a packet in a sequence
from node 4 to node 6 fails to arrive at node 6, or arrives with an error, node 6 can request a
retransmission of that packet from node 4. Another advantage is that packets should transit the network
more rapidly with a virtual circuit; it is not necessary to make a routing decision for each packet at each
node
COMPUTER NETWORKING
A system of interconnected computers and computerized peripherals such as printers is called computer
network. This interconnection among computers facilitates information sharing among them.
Computers may connect to each other by either wired or wireless media.
Geographical Span
Geographically a network can be seen in one of the following categories:
• It may be spanned across your table, among Bluetooth enabled devices, Ranging not more than
few meters.
• It may be spanned across a whole building, including intermediate devices to connect all floors.
• It may be spanned across a whole city.
• It may be spanned across multiple cities or provinces.
• It may be one network covering whole world.
Inter-Connectivity
Components of a network can be connected to each other differently in some fashion. By
connectedness we mean either logically, physically, or both ways.
• Every single device can be connected to every other device on network, making the
network mesh.
• All devices can be connected to a single medium but geographically disconnected,
created bus-like structure.
• Each device is connected to its left and right peers only, creating linear structure.
• All devices connected together with a single device, creating star-like structure.
• All devices connected arbitrarily using all previous ways to connect each other, resulting
in a hybrid structure.
Administration
From an administrator’s point of view, a network can be private network which belongs a single
autonomous system and cannot be accessed outside its physical or logical domain. A network can be
public, which is accessed by all.
Network Architecture
Computer networks can be discriminated into various types such as Client-Server, peer-to-peer or
hybrid, depending upon its architecture.
• There can be one or more systems acting as Server. Other being Client, requests the Server to
serve requests. Server takes and processes request on behalf of Clients.
• Two systems can be connected Point-to-Point, or in back-to-back fashion. They both reside at the
same level and called peers.
• There can be hybrid network which involves network architecture of both the above types.
Network Applications
Computer systems and peripherals are connected to form a network. They provide numerous
advantages:
• Resource sharing such as printers and storage devices
• Exchange of information by means of e-Mails and FTP
• Information sharing by using Web or Internet
• Interaction with other users using dynamic web pages
• IP phones
• Video conferences
• Parallel computing
• Instant messaging
Types of Computer Networks based on Geographical Span
Generally, networks are distinguished based on their geographical span. A network can be as small as
distance between your mobile phone and its Bluetooth headphone and as large as the internet itself,
covering the whole geographical world.
Personal AreaNetwork
A Personal Area Network (PAN) is smallest network which is very personal to a user. This may include
Bluetooth enabled devices or infra-red enabled devices. PAN has connectivity range up to 10 meters.
PAN may include wireless computer keyboard and mouse, Bluetooth enabled headphones, wireless
printers, and TV remotes.
For example, Piconet is Bluetooth-enabled Personal Area Network which may contain up to 8
devices connected together in a master-slave fashion.
LocalArea Network
A computer network spanned inside a building and operated under single administrative system
is generally termed as Local Area Network (LAN). Usually, LAN covers an organization offices,
schools, colleges or universities. Number of systems connected in LAN may vary from as least
as two to as much as 16 million. LAN provides a useful way of sharing the resources between
end users. The resources such as printers, file servers, scanners, and internet are easily sharable
among computers.
LANs are composed of inexpensive networking and routing equipment. It may contains local servers
serving file storage and other locally shared applications. It mostly operates on private IP addresses
and does not involve heavy routing. LAN works under its own local domain and controlled centrally.
LAN uses either Ethernet or Token-ring technology. Ethernet is most widely employed LAN technology
and uses Star topology, while Token-ring is rarely seen. LAN can be wired, wireless, or in both forms
at once.
Metropolitan AreaNetwork
The Metropolitan Area Network (MAN) generally expands throughout a city such as cable TV
network. It can be in the form of Ethernet, Token-ring, ATM, or Fiber Distributed Data Interface
(FDDI).
Metro Ethernet is a service which is provided by ISPs. This service enables its users to expand their
Local Area Networks. For example, MAN can help an organization to connect all of its offices in a
city.
Backbone of MAN is high-capacity and high-speed fiber optics. MAN works in between Local Area
Network and Wide Area Network. MAN provides uplink for LANs to WANs or internet.
Wide AreaNetwork
As the name suggests, the Wide Area Network (WAN) covers a wide area which may span across
provinces and even a whole country. Generally, telecommunication networks are Wide Area Network.
These networks provide connectivity to MANs and LANs. Since they are equipped with very high
speed backbone, WANs use very expensive network equipment.
WAN may use advanced technologies such as Asynchronous Transfer Mode (ATM), Frame Relay,
and Synchronous Optical Network (SONET). WAN may be managed by multiple administration.
• Peer-to-peer: Both remote processes are executing at same level and they exchange data using
some shared resource.
• Client-Server: One remote process acts as a Client and requests some resource from another
application process acting as Server.
In client-server model, any process can act as Server or Client. Itis not the type of machine, size of the
machine, or its computing power which makes it server; it is the ability of serving request that makes a
machine a server.
A system can act as Server and Client simultaneously. That is, one process is acting as Server and
another is acting as a client. This may also happen that both client and server processes reside on the
same machine.
Communication
Two processes in client-server model can interact in various ways:
• Sockets
• Remote Procedure Calls (RPC)
Sockets
In this paradigm, the process acting as Server opens a socket using a well-known (or known by client)
port and waits until some client request comes. The second process acting as a Client also opens a socket;
but instead of waiting for an incoming request, the client processes ‘requests first’.
When the request is reached to server, it is served. It can either be an information sharing or resource
request.
Remote Procedure Call
This is a mechanism where one process interacts with another by means of procedure calls. One process
(client) calls the procedure lying on remote host. The process on remote host is said to be Server. Both
processes are allocated stubs. This communication happens in the following way:
• The client process calls the client stub. It passes all the parameters pertaining to program local
to it.
• All parameters are then packed (marshalled) and a system call is made to send them to other side
of the network.
• Kernel sends the data over the network and the other end receives it.
• The remote host passes data to the server stub where it is unmarshalled.
• The parameters are passed to the procedure and the procedure is then executed.
• The result is sent back to the client in the same manner.
NETWORK COMPONENTS
Transceivers
A transceiver is a networking device that converts from one cabling technology to another. For
example, a transceiver may act as an interface between a network based on coaxial cable and one using
fibre-optic cable.
Repeater
In a bus topology, signal loss can occur if the segments are too long. A repeater is a
device that connects two network segments and broadcasts data between them. It
amplifies the signal, thereby extending the usable length of the bus.
Hub
One network component that has become standard equipment in networks is the hub. A hub acts as the
central component in a star topology, and typically contains 4, 8, 16 or even more different ports for
connecting to computers or other hubs. It is similar in operation to a repeater, except that it broadcasts
data received by any of the ports to all other ports on the hub. Hubs can be active, passive or hybrid.
Most hubs are active; that is, they regenerate and retransmit signals in the same way as a repeater does.
Because hubs usually have eight to twelve ports for network computers to connect to, they are
sometimes called multiport repeaters. Active hubs require electrical power to run. Some types of hubs
are passive. They act as connection points and do not amplify or regenerate the signal; the signal passes
through the hub. Passive hubs do not require electrical power to run. Advanced hubs that will
accommodate several different types of cables are called hybrid hubs.
A switch is similar to a bridge, except that it has multiple ports. A switch can also be seen as a more
intelligent hub – whereas a hub passes on all data to every port, a switch will only pass data on to the
port that it is intended for.
A router is also used for connecting networks together. However, unlike a bridge, a router can be used
to connect networks that use different network technologies. Routers are very commonly found in the
hardware infrastructure that forms the basis of the Internet.
The topic of routing in computer networking is a crucial one and has been the subject of much research.
We will return to this important topic in Handout 4 (Network Architecture).
Wireless networking
Although most networks use physical connections between the network components, recently wireless
networking has been increasing in popularity. Wireless networks can use infrared light, line-of-sight
lasers, or radio waves to transmit data between nodes without the need for physical cabling. They
eliminate the need to install physical cabling and offer a lot of flexibility for users using the network.
However, they are currently more expensive and slower than cable-based networks. As costs drop and
performance increases, wireless networks are sure to be increasingly popular in the future.
There are two main types of hardware associated with wireless communication in
computing: Bluetooth and 802.11. Bluetooth only allows very short-range transmission
(typically less than 10m) and is intended primarily for cable-free peripherals, such as
mouses and keyboards. 802.11, or wireless Ethernet, is the standard for wireless
networking of computers, and will be discussed in more detail in Handout 4 (Network
Architecture
A Network Topology is the arrangement with which computer systems or network devices are
connected to each other. Topologies may define both physical and logical aspect of the network. Both
logical and physical topologies could be same or different in a same network.
Point-to-Point
Point-to-point networks contains exactly two hosts such as computer, switches, routers, or servers
connected back to back using a single piece of cable. Often, the receiving end of one host is connected
to sending end of the other and vice versa
If the hosts are connected point-to-point logically, then may have multiple intermediate devices. But
the end hosts are unaware of underlying network and see each other as if they are connected directly.
Bus Topology
In case of Bus topology, all devices share single communication line or cable. Bus topology may have
problem while multiple hosts sending data at the same time. Therefore, Bus topology either uses
CSMA/CD technology or recognizes one host as Bus Master to solve the issue. It is one of the simple
forms of networking where a failure of a device does not affect the other devices. But failure of the
shared communication line can make all other devices stop functioning.
Both ends of the shared channel have line terminator. The data is sent in only one direction and as soon
as it reaches the extreme end, the terminator removes the data from the line.
Star Topology
All hosts in Star topology are connected to a central device, known as hub device, using a point-to-
point connection. That is, there exists a point to point connection between hosts and hub. The hub
device can be any of the following:
• Layer-1 device such as hub or repeater
• Layer-2 device such as switch or bridge
• Layer-3 device such as router or gateway
As in Bus topology, hub acts as single point of failure. If hub fails, connectivity of all hosts to all other
hosts fails. Every communication between hosts takes place through only the hub. Star topology is not
expensive as to connect one more host, only one cable is required and configuration is simple
.Ring Topology
In ring topology, each host machine connects to exactly two other machines, creating a circular network
structure. When one host tries to communicate or send message to a host which is not adjacent to it,
the data travels through all intermediate hosts. To connect one more host in the existing structure, the
administrator may need only one more extra cable.
Failure of any host results in failure of the whole ring. Thus, every connection in the ring is a point of
failure. There are methods which employ one more backup ring.
Mesh Topology
In this type of topology, a host is connected to one or multiple hosts. This topology has hosts in point-
to-point connection with every other host or may also have hosts which are in point-to-point connection
with few hosts only.
Hosts in Mesh topology also work as relay for other hosts which do not have direct point-to-point links.
Mesh technology comes into two types:
• Full Mesh: All hosts have a point-to-point connection to every other host in the
network. Thus, for every new host n(n-1)/2 connections are required. It provides the
most reliable network structure among all network topologies.
• Partially Mesh: Not all hosts have point-to-point connection to every other host. Hosts
connect to each other in some arbitrarily fashion. This topology exists where we need
to provide reliability to some hosts out of all.
Tree Topology
Also known as Hierarchical Topology, this is the most common form of network topology in use
presently. This topology imitates as extended Star topology and inherits properties of Bus topology.
This topology divides the network into multiple levels/layers of network. Mainly in LANs, a network
is bifurcated into three types of network devices. The lowermost is access-layer where computers are
attached. The middle layer is known as distribution layer, which works as mediator between upper layer
and lower layer. The highest layer is known as core layer, and is central point of the network, i.e. root
of the tree from which all nodes fork.
All neighboring hosts have point-to-point connection between them. Similar to the Bus topology, if the
root goes down, then the entire network suffers even though it is not the single point of failure. Every
connection serves as point of failure, failing of which divides the network into unreachable segment.
Hybrid Topology
A network structure whose design contains more than one topology is said to be hybrid topology.
Hybrid topology inherits merits and demerits of all the incorporating topologies.
The above picture represents an arbitrarily hybrid topology. The combining topologies may contain
attributes of Star, Ring, Bus, and Daisy-chain topologies. Most WANs are connected by means of Dual-
Ring topology and networks connected to them are mostly Star topology networks. Internet is the best
example of largest Hybrid topology.
In layered architecture of Network Model, one whole network process is divided into small tasks. Each
small task is then assigned to a particular layer which works dedicatedly to process the task only. Every
layer does only specific work.
as you can see in layered communication system, one layer of a host deals with the task done by or to
be done by its peer layer at the same level on the remote host. The task is either initiated by layer at the
lowest level or at the top most level. If the task is initiated by the topmost layer, it is passed on to the
layer below it for further processing. The lower layer does the same thing, it processes the task and
passes on to lower layer. If the task is initiated by lowermost layer, then the reverse path is taken.
Every layer clubs together all procedures, protocols, and methods which it requires to execute its piece
of task. All layers identify their counterparts by means of encapsulation header and tail.
OSI Model
Open System Interconnect is an open standard for all communication systems. OSI model is
established by International Standard Organization (ISO). This model has seven layers:
Application Layer: This layer is responsible for providing interface to the application user. This layer
encompasses protocols which directly interact with the user.
Presentation Layer: This layer defines how data in the native format of remote host should be
presented in the native format of host.
Session Layer: This layer maintains sessions between remote hosts. For example, once user/password
authentication is done, the remote host maintains this session for a while and does not ask for
authentication again in that time span.
Transport Layer: This layer is responsible for end-to-end delivery between hosts.
Network Layer: This layer is responsible for address assignment and uniquely addressing hosts in a
network.
Data Link Layer: This layer is responsible for reading and writing data from and onto the line. Link
errors are detected at this layer.
Physical Layer: This layer defines the hardware, cabling, wiring, power output, pulse rate etc.
TRANSMISSION MEDIA
Guided Media
The transmission media is nothing but the physical media over which communication takes place in
computer networks.
Magnetic Media
One of the most convenient way to transfer data from one computer to another, even before the birth of
networking, was to save it on some storage media and transfer physical from one station to another.
Though it may seem old-fashion way in today’s world of high speed internet, but when the size of data
is huge, the magnetic media comes into play. For example, a bank has to handle and transfer huge data
of its customer, which stores a backup of it at some geographically far-away place for security reasons
and to keep it from uncertain calamities. If the bank needs to store its huge backup data, then its transfer
through internet is not feasible. The WAN links may not support such high speed. Even if they do; the
cost is too high to afford.
In these cases, data backup is stored onto magnetic tapes or magnetic discs, and then shifted physically
at remote places.
Twisted PairCable
A twisted pair cable is made of two plastic insulated copper wires twisted together to form a single
media. Out of these two wires, only one carries actual signal and another is used for ground reference.
The twists between wires are helpful in reducing noise (electro-magnetic interference) and crosstalk.
Coaxial Cable
Coaxial cable has two wires of copper. The core wire lies in the center and it is made of solid conductor.
The core is enclosed in an insulating sheath. The second wire is wrapped around over the sheath and
that too in turn encased by insulator sheath. This all is covered by plastic cover.
Because of its structure, the coax cable is capable of carrying high frequency signals than that of twisted
pair cable. The wrapped structure provides it a good shield against noise and cross talk. Coaxial cables
provide high bandwidth rates of up to 450 mbps.
There are three categories of coax cables namely, RG-59 (Cable TV), RG-58 (Thin Ethernet), and RG-
11 (Thick Ethernet). RG stands for Radio Government. Cables are connected using BNC connector
and BNC-T. BNC terminator is used to terminate the wire at the far ends.
Fiber Optics
Fiber Optic works on the properties of light. When light ray hits at critical angle, it tends to refracts at
90 degree. This property has been used in fiber optic. The core of fiber optic cable is made of high
quality glass or plastic. From one end of it light is emitted, it travels through it and at the other end light
detector detects light stream and converts it to electric data.
Fiber Optic provides the highest mode of speed. It comes in two modes, one is single mode fiber and
second is multimode fiber. Single mode fiber can carry a single ray of light whereas multimode is
capable of carrying multiple beams of light.
Fiber Optic also comes in unidirectional and bidirectional capabilities. To connect and access
fiber optic special type of connectors are used. These can be Subscriber Channel (SC), Straight
Tip (ST), or MT-RJ.
Unguided Media
Wireless transmission is a form of unguided media. Wireless communication involves no physical link
established between two or more devices, communicating wirelessly. Wireless signals are spread over
in the air and are received and interpreted by appropriate antennas.
When an antenna is attached to electrical circuit of a computer or wireless device, it converts the digital
data into wireless signals and spread all over within its frequency range. The receptor on the other end
receives these signals and converts them back to digital data.
A little part of electromagnetic spectrum can be used for wireless transmission.
Radio Transmission
Radio frequency is easier to generate and because of its large wavelength it can penetrate through walls
and structures alike. Radio waves can have wavelength from 1mm – 100,000km and have frequency
ranging from 3Hz (Extremely Low Frequency) to 300 GHz (Extremely High Frequency). Radio
frequencies are sub-divided into six bands.
Radio waves at lower frequencies can travel through walls whereas higher RF can travel in straight line
and bounce back. The power of low frequency waves decreases sharply as they cover long distance.
High frequency radio waves have more power.
Lower frequencies such as VLF, LF, MF bands can travel on the ground up to 1000 kilometers, over
the earth’s surface.
Radio waves of high frequencies are prone to be absorbed by rain and other obstacles. They use
Ionosphere of earth atmosphere. High frequency radio waves such as HF and VHF bands are spread
upwards. When they reach Ionosphere, they are refracted back to the earth.
Microwave Transmission
Electromagnetic waves above 100MHz tend to travel in a straight line and signals over them can be
sent by beaming those waves towards one particular station. Because Microwaves travels in straight
lines, both sender and receiver must be aligned to be strictly in line-of-sight.
Microwaves can have wavelength ranging from 1mm – 1meter and frequency ranging from 300MHz to
300GHz.
Microwave antennas concentrate the waves making a beam of it. As shown in picture above, multiple
antennas can be aligned to reach farther. Microwaves have higher frequencies and do not penetrate
wall like obstacles.
Microwave transmission depends highly upon the weather conditions and the frequency it is using.
Infrared Transmission
Infrared wave lies in between visible light spectrum and microwaves. It has wavelength of 700nm to
1mm and frequency ranges from 300GHz to 430THz.
Infrared wave is used for very short range communication purposes such as television and its remote.
Infrared travels in a straight line hence it is directional by nature. Because of high frequency range,
Infrared cannot cross wall-like obstacles.
Light Transmission
Highest most electromagnetic spectrum which can be used for data transmission is light or optical
signaling. This is achieved by means of LASER.
Because of frequency light uses, it tends to travel strictly in straight line. Hence the sender and receiver
must be in the line-of-sight. Because laser transmission is unidirectional, at both ends of communication
the laser and the photo-detector needs to be installed. Laser beam is generally 1mm wide hence it is a
work of precision to align two far receptors each pointing to lasers source.
Laser works as Tx (transmitter) and photo-detectors works as Rx (receiver).
Lasers cannot penetrate obstacles such as walls, rain, and thick fog. Additionally, laser beam is distorted
by wind, atmosphere temperature, or variation in temperature in the path.
Laser is safe for data transmission as it is very difficult to tap 1mm wide laser without interrupting the
communication channel.
LAYER S
Application layer is the topmost layer in OSI and TCP/IP layered model. This layer exists in both
layered Models because of its significance, of interacting with user and user applications. This layer is
for applications which are involved in communication system.
A user may or may not directly interacts with the applications. Application layer is where the actual
communication is initiated and reflects. Because this layer is on the top of the layer stack, it does not
serve any other layers. Application layer takes the help of Transport and all layers below it to
communicate or transfer its data to the remote host.
When an application layer protocol wants to communicate with its peer application layer protocol on
remote host, it hands over the data or information to the Transport layer. The transport layer does the
rest with the help of all the layers below it.
There is an ambiguity in understanding Application Layer and its protocol. Not every user application
can be put into Application Layer except those applications which interact with the communication
system. For example, designing software or text- editor cannot be considered as application layer
programs.
On the other hand, when we use a Web Browser, which is actually using Hyper Text Transfer Protocol
(HTTP) to interact with the network, HTTP is Application Layer protocol. Another example is File
Transfer Protocol, which helps a user to transfer text based or binary files across the network. A user
can use this protocol in either GUI based software like FileZilla or Cute FTP and the same user can use
FTP in Command Line mode.
Hence, irrespective of which software you use, it is the protocol which is considered at Application
Layer used by that software. DNS is a protocol which helps user application protocols such as HTTP
to accomplish its work.
Application Layer
There are several protocols which work for users in Application Layer. Application layer protocols
can be broadly divided into two categories:
• Protocols which are used by users. For example, eMail.
• Protocols which help and support protocols used by users. For example, DNS. Few of
Application layer protocols are described below:
Domain NameSystem
The Domain Name System (DNS) works on Client Server model. It uses UDP protocol for transport
layer communication. DNS uses hierarchical domain based naming scheme. The DNS server is
configured with Fully Qualified Domain Names (FQDN) and email addresses mapped with their
respective Internet Protocol addresses. A DNS server is requested with FQDN and it responds back
with the IP address mapped with it. DNS uses UDP port 53.
File TransferProtocol
The File Transfer Protocol (FTP) is the most widely used protocol for file transfer over the network.
FTP uses TCP/IP for communication and it works on TCP port 21. FTP works on Client/Server Model
where a client requests file from Server and server sends requested resource back to the client.
FTP uses out-of-band controlling i.e. FTP uses TCP port 20 for exchanging controlling information and
the actual data is sent over TCP port 21.
The client requests the server for a file. When the server receives a request for a file, it opens a TCP
connection for the client and transfers the file. After the transfer is complete, the server closes the
connection. For a second file, client requests again and the server reopens a new TCP connection.
Post Office Protocol (POP)
The Post Office Protocol version 3 (POP3) is a simple mail retrieval protocol used by User Agents
(client email software) to retrieve mails from mail server.
When a client needs to retrieve mails from server, it opens a connection with the server on TCP port
110. User can then access his mails and download them to the local computer. POP3 works in two
modes. The most common mode, the delete mode, is to delete the emails from remote server after they
are downloaded to local machines. The second mode, the keep mode, does not delete the email from
mail server and gives the user an option to access mails later on mail server.
• HTTP 1.0 uses non persistent HTTP. At most one object can be sent over a single TCP
connection.
• HTTP 1.1 uses persistent HTTP. In this version, multiple objects can be sent over a single TCP
connection.
Session Layer
The Session layer performs the following functions:
• Manages the messages and synchronizes conversations between two different applications.
• It controls logging on and off, user identification, billing and session management.
Activities of Session layer
Functions at this layer create and maintain dialogs between source and destination
applications
Authentication
Permissions
Session Restoration (Checkpoint or recovery)
Session Layer Services
◦ Session establishment, maintenance and termination (Deciding who sends, and when.)
◦ Session support (security, name recognition, logging )
Presentation Layer
The Presentation layer performs the following functions:
• Data format and representation/conversion. For example,
• This layer makes it sure that the information is delivered in such a form that the
receiving system will understand and use it.
Activities of Presentation layer
Coding and conversion of Application layer data to ensure that data from the source device
can be interpreted by the appropriate application on the destination device.
Compression of the data in a manner that can be decompressed by the destination device.
Encryption of the data for transmission and the decryption of data upon receipt by the
destination.
This is the layer at which application programmers consider data structure and presentation
Examples: GIF, JPEG, TIFF, etc.
Sometimes n distinction is made between the presentation and application layers. For example
http/https. HTTP is generally regarded as an application layer protocol although it has
Presentation layer aspects such as the ability t identify character encoding for roper
conversion
End-to-End Communication
A process on one host identifies its peer host on remote network by means of TSAPs, also known as
Port numbers. TSAPs are very well defined and a process which is trying to communicate with its peer
knows this in advance.
For example, when a DHCP client wants to communicate with remote DHCP server, it always
requests on port number 67. When a DNS client wants to communicate with remote DNS server,
it always requests on port number 53 (UDP).
The two main Transport layer protocols are:
1. Transmission Control Protocol
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 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.
• Flags (1-bit each):
o NS: Nonce Sum bit is used by Explicit Congestion Notification signaling process.
o CWR: When a host receives packet with ECE bit set, it sets Congestion Windows Reduced to
acknowledge that ECE received.
o ECE: It has two meanings:
• If SYN bit is clear to 0, then ECE means that the IP packet has its CE (congestion experience)
bit set.
• If SYN bit is set to 1, ECE means that the device is ECT capable.
o URG: It indicates that Urgent Pointer field has significant data and should be processed.
ACK: It indicates that Acknowledgement field has significance. If ACK is cleared to 0, it indicates
that packet does not contain any acknowledgement
o PSH: When set, it is a request to the receiving station to PUSH data as soon as it comes to the
receiving application without buffering it.
o RST: Reset flag has the following features:
• It is used to refuse an incoming connection.
• It is used to reject a segment.
• It is used to restart a connection.
o SYN: This flag is used to set up a connection between hosts.
o FIN: This flag is used to release a connection and no more data is exchanged thereafter.
Because packets with SYN and FIN flags have sequence numbers, they are processed in correct
order.
• Windows Size: This field is used for flow control between two stations and indicates the
amount of buffer (in bytes) the receiver has allocated for a segment, i.e. how much data is the
receiver expecting.
• Checksum: This field contains the checksum of Header, Data, and Pseudo Headers.
• Urgent Pointer: It points to the urgent data byte if URG flag is set to 1.
• Options: It facilitates additional options which are not covered by the regular header. Option
field is always described in 32-bit words. If this field contains data less than 32-bit, padding is
used to cover the remaining bits to reach 32- bit boundary.
Addressing
TCP communication between two remote hosts is done by means of port numbers (TSAPs).
Ports numbers can range from 0 – 65535 which are divided as:
• System Ports (0 – 1023)
User Ports ( 1024 – 49151)
• Private/Dynamic Ports (49152 – 65535)
Connection Management
TCP communication works in Server/Client model. The client initiates the connection and the
server either accepts or rejects it. Three-way handshaking is used for connection management.
Establishment
Client initiates the connection and sends the segment with a Sequence number. Server acknowledges
it back with its own Sequence number and ACK of client’s segment which is one more than client’s
Sequence number. Client after receiving ACK of its segment sends an acknowledgement of Server’s
response.
Release
Either of server and client can send TCP segment with FIN flag set to 1. When the receiving end
responds it back by Acknowledging FIN, that direction of TCP communication is closed and
connection is released.
Bandwidth Management
TCP uses the concept of window size to accommodate the need of Bandwidth management. Window
size tells the sender at the remote end the number of data byte segments the receiver at this end can
receive. TCP uses slow start phase by using window size 1 and increases the window size exponentially
after each successful communication.
For example, the client uses windows size 2 and sends 2 bytes of data. When the acknowledgement of
this segment received the windows size is doubled to 4 and next
the segment sent will be 4 data bytes long. When the acknowledgement of 4-byte data segment is
received, the client sets windows size to 8 and so on.
If an acknowledgement is missed, i.e. data lost in transit network or it received NACK, then the window
size is reduced to half and slow start phase starts again.
Error Control and Flow Control
TCP uses port numbers to know what application process it needs to handover the data segment. Along
with that, it uses sequence numbers to synchronize itself with the remote host. All data segments are
sent and received with sequence numbers. The Sender knows which last data segment was received by
the Receiver when it gets ACK. The Receiver knows about the last segment sent by the Sender by
referring to the sequence number of recently received packet.
If the sequence number of a segment recently received does not match with the sequence number the
receiver was expecting, then it is discarded and NACK is sent back. If two segments arrive with the
same sequence number, the TCP timestamp value is compared to make a decision.
Multiplexing
The technique to combine two or more data streams in one session is called Multiplexing. When a TCP
client initializes a connection with Server, it always refers to a well-defined port number which indicates
the application process. The client itself uses a randomly generated port number from private port
number pools.
Using TCP Multiplexing, a client can communicate with a number of different application process in
a single session. For example, a client requests a web page which in turn contains different types of
data (HTTP, SMTP, FTP etc.) the TCP session timeout is increased and the session is kept open for
longer time so that the three- way handshake overhead can be avoided.
This enables the client system to receive multiple connection over single virtual connection. These
virtual connections are not good for Servers if the timeout is too long.
Congestion Control
When large amount of data is fed to system which is not capable of handling it, congestion occurs.
TCP controls congestion by means of Window mechanism. TCP sets a window size telling the other
end how much data segment to send. TCP may use three algorithms for congestion control:
• Additive increase, Multiplicative Decrease
• Slow Start
• Timeout React
Timer Management
TCP uses different types of timers to control and management various tasks:
Keep-alive timer:
• This timer is used to check the integrity and validity of a connection.
• When keep-alive time expires, the host sends a probe to check if the connection still exists.
Retransmission timer:
• This timer maintains stateful session of data sent.
• If the acknowledgement of sent data does not receive within the Retransmission time, the data
segment is sent again.
Persist timer:
• TCP session can be paused by either host by sending Window Size 0.
• To resume the session a host needs to send Window Size with some larger value.
• If this segment never reaches the other end, both ends may wait for each other for infinite time.
• When the Persist timer expires, the host resends its window size to let the other end know.
• Persist Timer helps avoid deadlocks in communication.
Timed-Wait:
• After releasing a connection, either of the hosts waits for a Timed-Wait time to terminate the
connection completely.
• This is in order to make sure that the other end has received the acknowledgement of its
connection termination request.
• Timed-out can be a maximum of 240 seconds (4 minutes).
Crash Recovery
TCP is very reliable protocol. It provides sequence number to each of byte sent in segment. It provides
the feedback mechanism i.e. when a host receives a packet, it is bound to ACK that packet having the
next sequence number expected (if it is not the last segment).
When a TCP Server crashes mid-way communication and re-starts its process, it sends TPDU broadcast
to all its hosts. The hosts can then send the last data segment which was never unacknowledged and
carry onwards.
Requirement of UDP
A question may arise, why do we need an unreliable protocol to transport the data? We deploy UDP
where the acknowledgement packets share significant amount of bandwidth along with the actual data.
For example, in case of video streaming, thousands of packets are forwarded towards its users.
Acknowledging all the packets is troublesome and may contain huge amount of bandwidth wastage.
The best delivery mechanism of underlying IP protocol ensures best efforts to deliver its packets, but
even if some packets in video streaming get lost, the impact is not calamitous and can be ignored easily.
Loss of few packets in video and voice traffic sometimes goes unnoticed.
Features
• UDP is used when acknowledgement of data does not hold any significance.
• UDP is good protocol for data flowing in one direction.
• UDP is simple and suitable for query based communications.
• UDP is not connection oriented.
• UDP does not provide congestion control mechanism.
• UDP does not guarantee ordered delivery of data.
• UDP is stateless.
• UDP is suitable protocol for streaming applications such as VoIP, multimedia streaming.
UDP Header
UDP header is as simple as its function.
UDP application
Here are few applications where UDP is used to transmit data:
• Domain Name Services
• Simple Network Management Protocol
• Trivial File Transfer Protocol
• Routing Information Protocol
• Kerberos
Network Layer Addressing and Routing
Layer-3 in the OSI model is called Network layer. Network layer manages options pertaining to host
and network addressing, managing sub-networks, and internetworking.
Network layer takes the responsibility for routing packets from source to destination within or outside
a subnet. Two different subnet may have different addressing schemes or non-compatible addressing
types. Same with protocols, two different subnet may be operating on different protocols which are not
compatible with each other. Network layer has the responsibility to route the packets from source to
destination, mapping different addressing schemes and protocols.
Layer-3 Functionalities
Devices which work on Network Layer mainly focus on routing. Routing may include various tasks
aimed to achieve a single goal. These can be:
• Addressing devices and networks.
• Populating routing tables or static routes.
• Queuing incoming and outgoing data and then forwarding them according to quality of service
constraints set for those packets.
• Internetworking between two different subnets.
• Delivering packets to destination with best efforts.
• Provides connection oriented and connection less mechanism.
Internet protocol is widely respected and deployed Network Layer protocol which helps to
communicate end to end devices over the internet. It comes in two flavors. IPv4 which has ruled the
world for decades but now is running out of address space. IPv6 is created to replace IPv4 and hopefully
mitigates limitations of IPv4 too.
Network Addressing
Layer 3 network addressing is one of the major tasks of Network Layer. Network Addresses are always
logical i.e. these are software based addresses which can be changed by appropriate configurations.
A network address always points to host / node / server or it can represent a whole network. Network
address is always configured on network interface card and is generally mapped by system with the
MAC address (hardware address or layer-2 address) of the machine for Layer-2 communication.
There are different kinds of network addresses in existence:
• IP
• IPX
• AppleTalk
We are discussing IP here as it is the only one, we use in practice these days.
IP addressing provides mechanism to differentiate between hosts and network. Because IP addresses
are assigned in hierarchical manner, a host always resides under a specific network. The host which
needs to communicate outside its subnet, needs to know destination network address, where the
packet/data is to be sent.
Hosts in different subnet need a mechanism to locate each other. This task can be done by DNS. DNS
is a server which provides Layer-3 address of remote host mapped with its domain name or FQDN. When
a host acquires the Layer-3 Address (IP Address) of the remote host, it forwards all its packet to its
gateway. A gateway is a router equipped with all the information which leads to route packets to the
destination host.
Routers take help of routing tables, which has the following information:
• Address of destination network
• Method to reach the network
Routers upon receiving a forwarding request, forwards packet to its next hop (adjacent router) towards
the destination.
The next router on the path follows the same thing and eventually the data packet reaches its
destination.
Network address can be of one of the following:
• Unicast (destined to one host)
• Multicast (destined to group)
• Broadcast (destined to all)
• Anycast (destined to nearest one)
A router never forwards broadcast traffic by default. Multicast traffic uses special treatment as it is
most a video stream or audio with highest priority. Anycast is just similar to unicast, except that the
packets are delivered to the nearest destination when multiple destinations are available.
Network Routing
When a device has multiple paths to reach a destination, it always selects one path by preferring it over
others. This selection process is termed as Routing. Routing is done by special network devices called
routers or it can be done by means of software processes. The software-based routers have limited
functionality and limited scope.
A router is always configured with some default route. A default route tells the router where to forward
a packet if there is no route found for specific destination. In case there are multiple paths existing to
reach the same destination, router can make decision based on the following information:
• Hop Count
• Bandwidth
• Metric
• Prefix-length
• Delay
Routes can be statically configured or dynamically learnt. One route can be configured to be preferred
over others.
Unicast routing
Most of the traffic on the internet and intranets known as unicast data or unicast traffic is sent with
specified destination. Routing unicast data over the internet is called unicast routing. It is the simplest
form of routing because the destination is already known. Hence the router just has to look up the
routing table and forward the packet to next hop.
Broadcast routing
By default, the broadcast packets are not routed and forwarded by the routers on any network. Routers
create broadcast domains. But it can be configured to forward broadcasts in some special cases. A
broadcast message is destined to all network devices. Broadcast routing can be done in two ways
(algorithm):
A router creates a data packet and then sends it to each host one by one. In this case, the router creates
multiple copies of single data packet with different destination addresses. All packets are sent as unicast
but because they are sent to all, it simulates as if router is broadcasting.
• This method consumes lots of bandwidth and router must destination address of each node.
• Secondly, when router receives a packet that is to be broadcasted, it simply floods those packets
out of all interfaces. All routers are configured in the same way.
• This method is easy on router’s CPU but may cause the problem of duplicate packets received
from peer routers.
• Reverse path forwarding is a technique, in which router knows in advance about its predecessor
from where it should receive broadcast. This technique is used to detect and discard duplicates.
Multicast Routing
Multicast routing is special case of broadcast routing with significance difference and challenges. In
broadcast routing, packets are sent to all nodes even if they do not want it. But in Multicast routing, the
data is sent to only nodes which wants to receive the packets.
The router must know that there are nodes, which wish to receive multicast packets (or stream)
then only it should forward. Multicast routing works spanning tree protocol to avoid looping.
Multicast routing also uses reverse path Forwarding technique, to detect and discard duplicates
and loops.
Anycast Routing
Anycast packet forwarding is a mechanism where multiple hosts can have same logical address.
When a packet destined to this logical address is received, it is sent to the host which is nearest
in routing topology.
Anycast routing is done with help of DNS server. Whenever an Anycast packet is received it is
enquired with DNS to where to send it. DNS provides the IP address which is the nearest IP
configured on it.
Unicast RoutingProtocols
There are two kinds of routing protocols available to route unicast packets:
Distance Vector Routing Protocol
Distance Vector is simple routing protocol which takes routing decision on the number of hops between
source and destination. A route with less number of hops is considered as the best route. Every router
advertises its set best routes to other routers. Ultimately, all routers build up their network topology
based on the advertisements of their peer routers, for example, Routing Information Protocol (RIP).
Routing protocols which are used within an organization or administration are called Interior Gateway
Protocols or IGP. RIP, OSPF are examples of IGP. Routing between different organizations or
administrations may have Exterior Gateway Protocol, and there is only one EGP i.e. Border Gateway
Protocol.
Tunneling
If they are two geographically separate networks, which want to communicate with each other, they
may deploy a dedicated line between or they have to pass their data through intermediate networks.
Tunneling is a mechanism by which two or more same networks communicate with each other, by
passing intermediate networking complexities. Tunneling is configured at both ends.
When the data enters from one end of Tunnel, it is tagged. This tagged data is then routed inside the
intermediate or transit network to reach the other end of Tunnel. When data exists the Tunnel its tag is
removed and delivered to the other part of the network.
Both ends seem as if they are directly connected and tagging makes data travel through transit network
without any modifications.
Packet Fragmentation
Most Ethernet segments have their maximum transmission unit (MTU) fixed to 1500 bytes. A data
packet can have more or less packet length depending upon the application. Devices in the transit path
also have their hardware and software capabilities which tell what amount of data that device can
handle and what size of packet it can process.
If the data packet size is less than or equal to the size of packet the transit network can handle, it is
processed neutrally. If the packet is larger, it is broken into smaller pieces and then forwarded. This is
called packet fragmentation. Each fragment contains the same destination and source address and
routed through transit path easily. At the receiving end it is assembled again.
If a packet with DF (do not fragment) bit set to 1 comes to a router which cannot handle the packet
because of its length, the packet is dropped. When a packet is received by a router has its MF (more
fragments) bit set to 1, the router then knows that it is a fragmented packet and parts of the original
packet is on the way. If packet is fragmented too small, the overhead is increases. If the packet is
fragmented too large, intermediate router may not be able to process it and it might get dropped.
IPv4 also has well-defined address spaces to be used as private addresses (not routable on internet),
and public addresses (provided by ISPs and are routable on internet).
Though IP is not reliable one; it provides ‘Best-Effort-Delivery’ mechanism.
Internet Protocol Version 6 (IPv6)
Exhaustion of IPv4 addresses gave birth to a next generation Internet Protocol version 6. IPv6 addresses
its nodes with 128-bit wide address providing plenty of address space for future to be used on entire
planet or beyond.
IPv6 has introduced Anycast addressing but has removed the concept of broadcasting. IPv6 enables
devices to self-acquire an IPv6 address and communicate within that subnet. This auto-configuration
removes the dependability of Dynamic Host Configuration Protocol (DHCP) servers. This way, even
if the DHCP server on that subnet is down, the hosts can communicate with each other.
IPv6 provides new feature of IPv6 mobility. Mobile IPv6-equipped machines can roam around without
the need of changing their IP addresses.
IPv6 is still in transition phase and is expected to replace IPv4 completely in coming years. At present,
there are few networks which are running on IPv6. There are some transition mechanisms available for
IPv6-enabled networks to speak and roam around different networks easily on IPv4. These are:
• Dual stack implementation
• Tunneling
• NAT-PT
Network Services
Computer systems and computerized systems help human beings to work efficiently and explore the
unthinkable. When these devices are connected together to form a network, the capabilities are
enhanced multiple times. Some basic services computer network can offer are:
Directory Services
These services are mapping between name and its value, which can be variable value or fixed. This
software system helps to store the information, organize it, and provides various means of accessing it.
Accounting
In an organization, a number of users have their user names and passwords mapped to them. Directory
Services provide means of storing this information in cryptic form and make available when requested.
Authentication and Authorization
User credentials are checked to authenticate a user at the time of login and/or periodically. User
accounts can be set into hierarchical structure and their access to resources can be controlled using
authorization schemes.
Domain Name Services
DNS is widely used and one of the essential services on which internet works. This system maps IP
addresses to domain names, which are easier to remember and recall than IP addresses. Because network
operates with the help of IP addresses and humans tend to remember website names, the DNS provides
website’s IP address which is mapped to its name from the back-end on the request of a website name
from the user.
File Services
File services include sharing and transferring files over the network.
File Sharing
One of the reason which gave birth to networking was file sharing. File sharing enables its users to
share their data with other users. User can upload the file to a specific server, which is accessible by
all intended users. As an alternative, user can make its file shared on its own computer and provides
access to intended users.
File Transfer
This is an activity to copy or move file from one computer to another computer or to multiple
computers, with help of underlying network. Network enables its user to locate other users in the
network and transfers files.
Communication Services
Email
Electronic mail is a communication method and something a computer user cannot work without. This
is the basis of today’s internet features. Email system has one or more email servers. All its users are
provided with unique IDs. When a user sends email to other user, it is actually transferred between users
with help of email server.
Social Networking
Recent technologies have made technical life social. The computer savvy peoples, can find other
known peoples or friends, can connect with them, and can share thoughts, pictures, and videos.
Internet Chat
Internet chat provides instant text transfer services between two hosts. Two or more people can
communicate with each other using text based Internet Relay Chat services. These days, voice chat and
video chat are very common.
Discussion Boards
Discussion boards provide a mechanism to connect multiple peoples with same interests. It enables the
users to put queries, questions, suggestions etc. which can be seen by all other users. Other may respond
as well.
Remote Access
This service enables user to access the data residing on the remote computer. This feature is known as
Remote desktop. This can be done via some remote device, e.g. mobile phone or home computer.
Application Services
These are nothing but providing network based services to the users such as web services, database
managing, and resource sharing.
Resource Sharing
To use resources efficiently and economically, network provides a mean to share them. This may
include Servers, Printers, and Storage Media etc.
Databases
This application service is one of the most important services. It stores data and information, processes
it, and enables the users to retrieve it efficiently by using queries. Databases help organizations to make
decisions based on statistics.
Web Services
World Wide Web has become the synonym for internet. It is used to connect to the internet, and access
files and information services provided by the internet servers.
Signals
When data is sent over physical medium, it needs to be first converted into electromagnetic signals.
Data itself can be analog such as human voice, or digital such as file on the disk. Both analog and
digital data can be represented in digital or analog signals.
Digital Signals
Digital signals are discrete in nature and represent sequence of voltage pulses. Digital signals are used
within the circuitry of a computer system.
Analog Signals
Analog signals are in continuous wave form in nature and represented by continuous electromagnetic
waves.
Transmission Impairment
When signals travel through the medium, they tend to deteriorate. This may have many reasons as
given:
Attenuation
For the receiver to interpret the data accurately, the signal must be sufficiently strong. When the signal
passes through the medium, it tends to get weaker. As it covers distance, it loses strength.
Dispersion
As signal travels through the media, it tends to spread and overlaps. The amount of dispersion depends
upon the frequency used.
Delay distortion
Signals are sent over media with pre-defined speed and frequency. If the signal speed and frequency do
not match, there are possibilities that signal reaches destination in arbitrary fashion. In digital media,
this is very critical that some bits reach earlier than the previously sent ones.
Noise
Random disturbance or fluctuation in analog or digital signal is said to be Noise in signal, which may
distort the actual information being carried. Noise can be characterized in one of the following class:
Thermal Noise
Heat agitates the electronic conductors of a medium which may introduce noise in the media. Up to a
certain level, thermal noise is unavoidable.
Intermodulation
When multiple frequencies share a medium, their interference can cause noise in the medium.
Intermodulation noise occurs if two different frequencies are sharing a medium and one of them has
excessive strength or the component itself is not functioning properly, then the resultant frequency may
not be delivered as expected.
Crosstalk
This sort of noise happens when a foreign signal enters into the media. This is because signal in one
medium affects the signal of second medium.
Impulse
This noise is introduced because of irregular disturbances such as lightening, electricity, short-circuit,
or faulty components. Digital data is mostly affected by this sort of noise.
Transmission Media
The media over which the information between two computer systems is sent, called transmission
media. Transmission media comes in two forms.
Guided Media
All communication wires/cables are guided media, such as UTP, coaxial cables, and fiber Optics. In
this media, the sender and receiver are directly connected and the information is send (guided) through
it.
Unguided Media
Wireless or open air space is said to be unguided media, because there is no connectivity between the
sender and receiver. Information is spread over the air, and anyone including the actual recipient may
collect the information.
Channel Capacity
The speed of transmission of information is said to be the channel capacity. We count it as data rate in
digital world. It depends on numerous factors such as:
Bandwidth: The physical limitation of underlying media.
• Error-rate: Incorrect reception of information because of noise.
• Encoding: The number of levels used for signaling.
Multiplexing
Multiplexing is a technique to mix and send multiple data streams over a single medium. This
technique requires system hardware called multiplexer (MUX) for multiplexing the streams and
sending them on a medium, and de-multiplexer (DMUX) which takes information from the medium
and distributes to different destinations.
Data link layer works between two hosts which are directly connected in some sense. This direct
connection could be point to point or broadcast. Systems on broadcast network are said to be on same
link. The work of data link layer tends to get more complex when it is dealing with multiple hosts on
single collision domain.
Data link layer is responsible for converting data stream to signals bit by bit and to send that over the
underlying hardware. At the receiving end, Data link layer picks up data from hardware which are in
the form of electrical signals, assembles them in a recognizable frame format, and hands over to upper
layer.
Framing
Data-link layer takes packets from Network Layer and encapsulates them into Frames. Then, it sends
each frame bit-by-bit on the hardware. At receiver end, data link layer picks up signals from hardware
and assembles them into frames.
Addressing
Data-link layer provides layer-2 hardware addressing mechanism. Hardware address is assumed to be
unique on the link. It is encoded into hardware at the time of manufacturing.
Synchronization
When data frames are sent on the link, both machines must be synchronized in order to transfer to take
place.
Error Control
Sometimes signals may have encountered problem in transition and the bits are flipped. These errors
are detected and attempted to recover actual data bits. It also provides error reporting mechanism to
the sender.
Flow Control
Stations on same link may have different speed or capacity. Data-link layer ensures flow control that
enables both machine to exchange data on same speed.
Multi-Access
When host on the shared link tries to transfer the data, it has a high probability of collision. Data-link
layer provides mechanism such as CSMA/CD to equip capability of accessing a shared media among
multiple Systems.
Types of Errors
There may be three types of errors:
Burst error
Frame contains more than1 consecutive bits corrupted. Error control mechanism may involve two
possible ways:
• Error detection
• Error correction
Error Detection
Errors in the received frames are detected by means of Parity Check and Cyclic Redundancy Check
(CRC). In both cases, few extra bits are sent along with actual data to confirm that bits received at other
end are same as they were sent. If the counter-check at receiver end fails, the bits are considered
corrupted.
Parity Check
One extra bit is sent along with the original bits to make number of 1s either even in case of even parity,
or odd in case of odd parity.
The sender while creating a frame counts the number of 1s in it. For example, if even parity is used and
number of 1s is even then one bit with value 0 is added. This way number of 1s remains even. If the
number of 1s is odd, to make it even a bit with value 1 is added.
The receiver simply counts the number of 1s in a frame. If the count of 1s is even and even parity is
used, the frame is considered to be not-corrupted and is accepted. If the count of 1s is odd and odd parity
is used, the frame is still not corrupted.
If a single bit flips in transit, the receiver can detect it by counting the number of 1s. But when more
than one bits are erroneous, then it is very hard for the receiver to detect the error.
At the other end, the receiver performs division operation on codewords using the same CRC divisor.
If the remainder contains all zeros the data bits are accepted, otherwise it is considered as there is some
data corruption occurred in transit.
Error Correction
In the digital world, error correction can be done in two ways:
Backward Error Correction
When the receiver detects an error in the data received, it requests back the sender to retransmit the
data unit.
Forward Error Correction
When the receiver detects some error in the data received, it executes error- correcting code, which
helps it to auto-recover and to correct some kinds of errors.
The first one, Backward Error Correction, is simple and can only be efficiently used where
retransmitting is not expensive. For example, fiber optics. But in case of wireless transmission
retransmitting may cost too much. In the latter case, Forward Error Correction is used.
To correct the error in data frame, the receiver must know exactly which bit in the frame is corrupted.
To locate the bit in error, redundant bits are used as parity bits for error detection.
Go-Back-N ARQ
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.
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.
In Selective-Repeat ARQ, the receiver while keeping track of sequence numbers, buffers the
frames in memory and sends NACK for only frame which is missing or damaged. The sender
in this case, sends only packet for which NACK is received.