Introduction To Networks

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

MODULE 1

INTRODUCTION TO NETWORKS

Introduction to Computer Network


Computer Network consists of a set of devices which are connected via communication media
links. The devices can be computers, printers, laptops, or any other communication devices
capable of sending /receiving data generated by other device on the network. Computers are
interconnected with single technology in which each of them can exchange information. The
communication media can be wired or wireless .Wired media can be of copper wire, coaxial
cable, optical fibre and wireless media will be using microwaves ,infrared links and radio
links. Networks can be of different sizes and structure.
Uses of Computer Networks
The importance of connecting computers is resource sharing. Broadly the uses of computer
networks can be classified into four categories namely Business Applications, Home
applications, mobile users and social users.
Network Criteria
A network must be able to meet a certain number of criteria. The most important of these
are performance, reliability, and security.
Performance: Performance can be measured in many ways, including transit time and
response time. Transit time is the amount of time required for a message to travel from one
device to another. Response time is the elapsed time between an inquiry and a response. The
performance of a network depends on the number of users, the type of transmission medium,
the capabilities of the connected hardware, and the efficiency of the software. Performance
is often evaluated by two networking metrics: throughput and delay.
Reliability: In addition to accuracy of delivery, network reliability is measured by the
frequency of failure, the time it takes a link to recover from a failure, and the network’s
robustness in a catastrophe.
Security: Network security issues include protecting data from unauthorized access,
protecting data from damage and development, and implementing policies and procedures
for recovery from breaches and data losses.

NETWORK HARDWARE
The computer network has two criteria for classifying networks: (i)Transmission Technology
(ii) Scale.

Transmission technology is broadly classified into two types: broadcast links and point-to-
point links.

ASHWINI K.G,ASST.PROF,CSBS,CEC 1
MODULE 1

Point-to-point links: Point-to-point links connect individual pairs of machines. They provide
communication link from one source to one destination. Here, packets(short messages) have
to visit one or more intermediate machines to reach the destination. Point-to-point
transmission with exactly one sender and exactly one receiver is sometimes called unicasting.

Broadcast networks, have a single communication channel that is shared by all the computers
on the network. Packets sent by any machine are received by all the others on the network.
An address field within each 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. A wireless network is a common example of a broadcast link, with communication
shared over a coverage region that depends on the wireless channel and the transmitting
machine.

Broadcast systems usually also allow the possibility of addressing a packet to all destinations
by using a special code in the address field. When a packet with this code is transmitted, it is
received and processed by every machine on the network. This mode of operation is called
broadcasting.

If the packets are sent to only a subset or group of machines on the network, it is known as
multicasting.If n bit address field ,one bit is used to indicate multicasting. The remaining n-1
nodes address bits hold the group number. Each machine in the network can become the
member of a group or member of all machines. When packet is certain to a group, it is sent
to all machines in that group.

An alternative criterion for classifying networks is by scale. Distance is important as a


classification metric because different technologies are used at different scales. In Fig. 1.1 ,we
classify multiple processor systems by their rough physical size. At the top are the personal
area networks, networks that are meant for one person. Beyond these come longer-range
networks. These can be divided into local, metropolitan, and wide area networks, each with
increasing scale. Finally, the connection of two or more networks is called an internetwork.
The worldwide Internet is certainly the best-known example of an internetwork.

ASHWINI K.G,ASST.PROF,CSBS,CEC 2
MODULE 1

Personal Area Networks

PANs, as the name suggests, are mostly restricted to individual usage. A good example of
PANs may be connected wireless headphones, wireless speakers, laptops, smartphones,
wireless keyboards, wireless mouse, and printers within a house. Generally, PANs are wireless
networks, which make use of low-range and low-power technologies such as Bluetooth. The
reachability of PANs lies in the range of a few centimeters to a few meters. Bluetooth
networks use the master-slave paradigm of Fig. 1.2. The system unit (the PC) is normally the
master, talking to the mouse, keyboard, etc., as slaves. The master tells the slaves what
addresses to use, when they can broadcast, how long they can transmit, what frequencies
they can use, and so on. Bluetooth can be used in other settings, too. It is often used to
connect a headset to a mobile phone without cords and it can allow your digital music player
to connect to your car merely being brought within range. A completely different kind of PAN
is formed when an embedded medical device such as a pacemaker, insulin pump, or hearing
aid talks to a user-operated remote control. PANs can also be built with other technologies
that communicate over short ranges, such as RFID on smartcards and library books.

Local Area Networks(LAN)

A LAN is a privately owned network that operates over a size of few kilometers.LAN’s are
formed in a single building like a home, office or factory. LANs are widely used to connect
personal computers and consumer electronics to let them share resources (e.g., printers) and
exchange information. When LANs are used by companies, they are called enterprise
networks.

Wireless LANs are very popular these days, especially in homes, older office buildings,
cafeterias, and other places where it is too much trouble to install cables. In these systems,
every computer has a radio modem and an antenna that it uses to communicate with other
computers.

ASHWINI K.G,ASST.PROF,CSBS,CEC 3
MODULE 1

In most cases, each computer talks to a device in the ceiling as shown in Fig. 1.3(a). This
device, called an AP (Access Point), wireless router, or base station, relays packets between
the wireless computers and between them and the Internet. If other computers are close
enough, they can communicate directly with one another in a peer-to-peer configuration.
There is a standard for wireless LANs called IEEE 802.11, popularly known as WiFi, which has
become very widespread. It runs at speeds anywhere from 11 to hundreds of Mbps.

Wired LANs use a range of different transmission technologies. Most of them use copper
wires, but some use optical fiber. LANs are restricted in size, which means that the worst-case
transmission time is bounded and known in advance.

Typically, wired LANs run at speeds of 100 Mbps to 1 Gbps, have low delay (microseconds or
nanoseconds), and make very few errors. Newer LANs can operate at up to 10 Gbps.
Compared to wireless networks, wired LANs exceed them in all dimensions of performance.
It is just easier to send signals over a wire or through a fiber than through the air. The topology
of many wired LANs is built from point-to-point links. IEEE 802.3, popularly called Ethernet,
is, by far, the most common type of wired LAN.

Fig. 1.3(b) shows a sample topology of switched Ethernet. Each computer speaks the
Ethernet protocol and connects to a box called a switch with a point-to-point link. Hence the
name. A switch has multiple ports, each of which can connect to one computer. The job of
the switch is to relay packets between computers that are attached to it, using the address in
each packet to determine which computer to send it to.
It is also possible to divide one large physical LAN into two smaller logical LANs. There are
other wired LAN topologies too. A switched Ethernet is a modern version of the original
Ethernet design that broadcast all the packets over a single linear cable. At most one machine
could successfully transmit at a time, and a distributed arbitration mechanism was used to
resolve conflicts. It used a simple algorithm: computers could transmit whenever the cable
was idle.
Both wireless and wired broadcast networks can be divided into static and dynamic designs,
depending on how the channel is allocated. A typical static allocation would be to divide time
into discrete intervals and use a round-robin algorithm, allowing each machine to broadcast

ASHWINI K.G,ASST.PROF,CSBS,CEC 4
MODULE 1

only when its time slot comes up. Static allocation wastes channel capacity when a machine
has nothing to say during its allocated slot, so most systems attempt to allocate the channel
dynamically (i.e., on demand).

Dynamic allocation methods for a common channel are either centralized or decentralized. In
the centralized channel allocation method, there is a single entity, for example, the base
station in cellular networks, which determines who goes next. It might do this by accepting
multiple packets and prioritizing them according to some internal algorithm. In the
decentralized channel allocation method, there is no central entity; each machine must decide
for itself whether to transmit.

Metropolitan Area Networks

A MAN (Metropolitan Area Network) covers a city. The best-known examples of MANs are
the cable television networks available in many cities. These systems grew from earlier
community antenna systems used in areas with poor over-the-air television reception. In
those early systems, a large antenna was placed on top of a nearby hill and a signal was then
piped to the subscribers’ houses. At first, these were locally designed, ad hoc systems. Then
companies began jumping into the business, getting contracts from local governments to wire
up entire cities. The next step was television programming and even entire channels designed
for cable only. When the Internet began attracting a mass audience, the cable TV network
operators began to realize that with some changes to the system, they could provide two-
way Internet service in unused parts of the spectrum. At that point, the cable TV system began
to morph from simply a way to distribute television to a metropolitan area network.

To a first approximation, a MAN might look something like the system shown in Fig. 1.4. In
this figure we see both television signals and Internet being fed into the centralized cable
headend for subsequent distribution to people’s homes. Cable television is not the only MAN,

ASHWINI K.G,ASST.PROF,CSBS,CEC 5
MODULE 1

though. Recent developments in highspeed wireless Internet access have resulted in another
MAN, which has been standardized as IEEE 802.16 and is popularly known as WiMAX.

Wide Area Networks

WAN’s are bigger than MAN’s and LAN’s.WAN span over a large geographical are alike country
or continent. A collection of MAN’s and LAN’s can form a WAN intended or used for running
user programs. Machines which are used for running user programs are called as hosts. Hosts
are connected by communication subnet (collection of communication devices other than
hosts).Hosts are owned by customers and subnet is owned, operated and maintained by a
telephone company or internet service provider.
WAN consists of two components: Transmission lines and switching elements.

Transmission lines are responsible for moving bits between machines and they are made up
of copper wire or coaxial cable or optical fibre or radio frequency (wireless links).

Switching elements are small and specialized computers that connect three or more
transmission lines. When data arrive on incoming line the switching element must choose
appropriate outgoing line. The best example for switching elements are routers.

Fig 1.5 WAN with host on LAN’s and the subnet

In figure 1.5 each host has connected to its LAN on which router is present. The collection of
transmission lines and routers form a subnet. Subnet is responsible for moving packets from
one end of the host to destination host.
A subnet is organised to route the packet from one source to another via one or more
intermediate routers. The packet is stored in intermediate router until the required output
line is free and then packet is forwarded. This principle is known as store and forward or
packet switched subnet.
Almost all WAN’s have store and forward subnet when the packets are small and of same size,
they are called as cells. The message on WAN’s are transmitted from one host to another in
the form of packets. The message to be sent on other host is divided into packets. Each

ASHWINI K.G,ASST.PROF,CSBS,CEC 6
MODULE 1

packets has sequence number and packets are then injected into the network one at a time
in quick session. These packets are reassembled or collected on the other end to get the
original message.

NETWORK SOFTWARE

Protocol Hierarchies

To reduce the design complexity, most networks are organized as a stack of layers or levels,
each one built upon the one below it. The number of layers, the name of each layer, the
contents of each layer, and the function of each layer differ from network to network. The
purpose of each layer is to offer certain services to the higher layers while shielding those
layers from the details of how the offered services are actually implemented. In a sense, each
layer is a kind of virtual machine, offering certain services to the layer above it. The
fundamental idea is that a particular piece of software (or hardware) provides a service to its
users but keeps the details of its internal state and algorithms hidden from them.

When layer n on one machine carries on a conversation with layer n on another machine, the
rules and conventions used in this conversation are collectively known as the layer n protocol.
Basically, a protocol is an agreement between the communicating parties on how
communication is to proceed.

A five-layer network is illustrated in Fig. 1-6.

Fig 1.6

ASHWINI K.G,ASST.PROF,CSBS,CEC 7
MODULE 1

The entities comprising the corresponding layers on different machines are called peers. The
peers may be software processes, hardware devices, or even human beings. In other words,
it is the peers that communicate by using the protocol to talk to each other.

In reality, no data are directly transferred from layer n on one machine to layer n on another
machine. Instead, each layer passes data and control information to the layer immediately
below it, until the lowest layer is reached. Below layer 1 is the physical medium through which
actual communication occurs. In Fig. 1-6, virtual communication is shown by dotted lines and
physical communication by solid lines.
Between each pair of adjacent layers is an interface. The interface defines which primitive
operations and services the lower layer makes available to the upper one. When network
designers decide how many layers to include in a network and what each one should do, one
of the most important considerations is defining clean interfaces between the layers.In order
to accomplish this, each layer must carry out a particular set of well-known tasks. In addition
to minimizing the amount of information that must be passed between layers, clearcut
interfaces also make it simpler to replace one layer with a completely different protocol or
implementation (e.g., replacing all the telephone lines by satellite channels) because all that
is required of the new protocol or implementation is that it offer exactly the same set of
services to its upstairs neighbor as the old one did. It is common that different hosts use
different implementations of the same protocol. In fact, the protocol itself can change in some
layer without the layers above and below it even noticing.

A set of layers and protocols is called a network architecture. The specification of an


architecture must contain enough information to allow an implementer to write the program
or build the hardware for each layer so that it will correctly obey the appropriate protocol.
Neither the details of the implementation nor the specification of the interfaces is part of the
architecture because these are hidden away inside the machines and not visible from the
outside.A list of the protocols used by a certain system, one protocol per layer, is called a
protocol stack.

ASHWINI K.G,ASST.PROF,CSBS,CEC 8
MODULE 1

Consider communication to the top layer of the five-layer network in Fig. 1.7.A message, M,
is produced by an application process running in layer and given to layer 4 for transmission.
Layer 4 puts a header in front of the message to identify the message and passes the result
to layer 3. The header includes control information, such as addresses, to allow layer 4 on the
destination machine to deliver the message. Other examples of control information used in
some layers are sequence numbers, sizes, and times. In many networks, no limit is placed on
the size of messages transmitted in the layer 4 protocol but there is nearly always a limit
imposed by the layer 3 protocol. Consequently, layer 3 must break up the incoming messages
into smaller units, packets, prepending a layer 3 header to each packet. In this example, M is
split into two parts, M1 and M2, that will be transmitted separately. Layer 3 decides which of
the outgoing lines to use and passes the packets to layer 2. Layer 2 adds to each piece not
only a header but also a trailer, and gives the resulting unit to layer 1 for physical transmission.
At the receiving machine the message moves upward, from layer to layer, with headers being
stripped off as it progresses. None of the headers for layers below n are passed up to layer
n.The peer processes in layer 4, for example, conceptually think of their communication as
being ‘‘horizontal,’’ using the layer 4 protocol. Each one is likely to have procedures called
something like Send To Other Side and Get From- Other Side, even though these procedures
actually communicate with lower layers across the 3/4 interface, and not with the other side.
The peer process abstraction is crucial to all network design.

Design Issues for the Layers

A number of design issues exist for the layer to layer approach of computer networks. Some
of the main design issues are as follows –

ASHWINI K.G,ASST.PROF,CSBS,CEC 9
MODULE 1

Reliability
Network channels and components may be unreliable, resulting in loss of bits while data
transfer. So, an important design issue is to make sure that the information transferred is not
distorted.

Scalability
Networks are continuously evolving. The sizes are continually increasing leading to
congestion. Also, when new technologies are applied to the added components, it may lead
to incompatibility issues. Hence, the design should be done so that the networks are scalable
and can accommodate such additions and alterations.

Addressing
At a particular time, innumerable messages are being transferred between large numbers of
computers. So, a naming or addressing system should exist so that each layer can identify the
sender and receivers of each message.

Error Control
Unreliable channels introduce a number of errors in the data streams that are communicated.
So, the layers need to agree upon common error detection and error correction methods so
as to protect data packets while they are transferred.

Flow Control
If the rate at which data is produced by the sender is higher than the rate at which data is
received by the receiver, there are chances of overflowing the receiver. So, a proper flow
control mechanism needs to be implemented.

Resource Allocation
Computer networks provide services in the form of network resources to the end users. The
main design issue is to allocate and deallocate resources to processes. The
allocation/deallocation should occur so that minimal interference among the hosts occurs
and there is optimal usage of the resources.

Statistical Multiplexing
It is not feasible to allocate a dedicated path for each message while it is being transferred
from the source to the destination. So, the data channel needs to be multiplexed, so as to
allocate a fraction of the bandwidth or time to each host.

Routing
There may be multiple paths from the source to the destination. Routing involves choosing
an optimal path among all possible paths, in terms of cost and time. There are several routing
algorithms that are used in network systems.

ASHWINI K.G,ASST.PROF,CSBS,CEC 10
MODULE 1

Security
A major factor of data communication is to defend it against threats like eavesdropping and
surreptitious alteration of messages. So, there should be adequate mechanisms to prevent
unauthorized access to data through authentication and cryptography.

Connection-Oriented Versus Connectionless Service

Connection-oriented service involves the creation and termination of the connection for
sending the data between two or more devices. In contrast, connectionless service does not
require establishing any connection and termination process for transferring the data over a
network.

Connection-Oriented Service

A connection-oriented service is a network service that was designed and developed after the
telephone system. A connection-oriented service is used to create an end to end connection
between the sender and the receiver before transmitting the data over the same or different
networks. In connection-oriented service, packets are transmitted to the receiver in the same
order the sender has sent them. It uses a handshake method that creates a connection
between the user and sender for transmitting the data over the network. Hence it is also
known as a reliable network service.

Suppose, a sender wants to send data to the receiver. Then, first, the sender sends a request
packet to a receiver in the form of an SYN packet. After that, the receiver responds to the
sender's request with an (SYN-ACK) signal/packets. That represents the confirmation is
received by the receiver to start the communication between the sender and the receiver.
Now a sender can send the message or data to the receiver.

Similarly, a receiver can respond or send the data to the sender in the form of packets. After
successfully exchanging or transmitting data, a sender can terminate the connection by
sending a signal to the receiver. In this way, we can say that it is a reliable network service.

TCP (Transmission Control Protocol) is a connection-oriented protocol that allows


communication between two or more computer devices by establishing connections in the
same or different networks. It is the most important protocol that uses internet protocol to
transfer the data from one end to another. Hence, it is sometimes referred to as TCP/IP. It
ensures that the connection is established and maintained until the data packet is transferring
between the sender and receiver is complete.

Connectionless Service

A connection is similar to a postal system, in which each letter takes along different route
paths from the source to the destination address. Connectionless service is used in the
network system to transfer data from one end to another end without creating any
connection. So it does not require establishing a connection before sending the data from the

ASHWINI K.G,ASST.PROF,CSBS,CEC 11
MODULE 1

sender to the receiver. It is not a reliable network service because it does not guarantee the
transfer of data packets to the receiver, and data packets can be received in any order to the
receiver. Therefore we can say that the data packet does not follow a defined path. In
connectionless service, the transmitted data packet is not received by the receiver due to
network congestion, and the data may be lost.

For example, a sender can directly send any data to the receiver without establishing any
connection because it is a connectionless service. Data sent by the sender will be in the packet
or data streams containing the receiver's address. In connectionless service, the data can be
travelled and received in any order. However, it does not guarantee to transfer of the packets
to the right destination.

The UDP (User Datagram Protocol) is a connectionless protocol that allows communication
between two or more devices without establishing any connection. In this protocol, a sender
sends the data packets to the receiver that holds the destination address. A UDP does not
ensure to deliver the data packets to the correct destination, and it does not generate any
acknowledgment about the sender's data. Similarly, it does not acknowledge the receiver
about the data. Hence, it is an unreliable protocol.

Difference: Connection oriented and Connectionless service

1. In connection oriented service authentication is needed, while connectionless service


does not need any authentication.
2. Connection oriented protocol makes a connection and checks whether message is
received or not and sends again if an error occurs, while connectionless service
protocol does not guarantees a message delivery.
3. Connection oriented service is more reliable than connectionless service.
4. Connection oriented service interface is stream based and connectionless is message
based.

Service Primitives

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


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

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


LISTEN primitive. It blocks waiting for an incoming connection.
2. CONNECT : It connects the server by establishing a connection. Response is awaited.
3. RECIEVE: Then the RECIEVE call blocks the server.

ASHWINI K.G,ASST.PROF,CSBS,CEC 12
MODULE 1

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.

Connection Oriented Service Primitives


There are 5 types of primitives for Connection Oriented Service :

LISTEN Block waiting for an incoming connection

CONNECT Establish a connection with a waiting peer

ACCEPT Accept an incoming connection from a peer

RECEIVE Block waiting for an incoming message

SEND Sending a message to the peer

DISCONNECT Terminate a connection

The Relationship of Services to Protocols

A service is a set of primitives (operations) that a layer provides to the layer above it. The
service defines what operations the layer is prepared to perform on behalf of its users, but it
says nothing at all about how these operations are implemented. A service relates to an
interface between two layers, with the lower layer being the service provider and the upper
layer being the service user.

A protocol, in contrast, is a set of rules governing the format and meaning of the packets, or
messages that are exchanged by the peer entities within a layer. Entities use protocols to
implement their service definitions. They are free to change their protocols at will, provided
they do not change the service visible to their users.

ASHWINI K.G,ASST.PROF,CSBS,CEC 13
MODULE 1

In contrast, protocols relate to the packets sent between peer entities on different
machines.An analogy with programming languages is worth making. A service is like an
abstract data type or an object in an object-oriented language. It defines operations that can
be performed on an object but does not specify how these operations are implemented. In
contrast, a protocol relates to the implementation of the service and as such is not visible to
the user of the service. Many older protocols did not distinguish the service from the protocol.
In effect, a typical layer might have had a service primitive SEND PACKET with the user
providing a pointer to a fully assembled packet. This arrangement meant that all changes to
the protocol were immediately visible to the users.

REFERENCE MODELS

There are two important network architectures: the OSI reference model and the TCP/IP
reference model. The OSI model itself is still quite general and valid, and the features stated
at each layer are still highly significant, even though the protocols linked with it are no longer
in use. In contrast, the TCP/IP paradigm's protocols are widely utilized, whereas the model
itself is not very useful.

The OSI Reference Model

OSI Model stands for Open System interconnection model. OSI Model defines how data is
transferred from one computer to another computer. The OSI model (minus the physical
medium) is shown in Fig. 1-10. This model is based on a proposal developed by the
International Standards Organization (ISO) as a first step toward international standardization
of the protocols used in the various layers. The model is called the ISO OSI Reference Model
because it deals with connecting open systems—that is, systems that are open for
communication with other systems.
The OSI model has seven layers. The principles that were applied to arrive at the seven layers
is as follows:
1. A layer should be created where a different abstraction is needed.
2. Each layer should perform a well-defined function.
3. The function of each layer should be chosen with an eye toward defining
internationally standardized protocols.

ASHWINI K.G,ASST.PROF,CSBS,CEC 14
MODULE 1

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 and small enough that the
architecture does not become unwieldy.

The seven layers of OSI model are:

1. Application layer
2. Presentation Layer
3. Session layer
4. Transport layer
5. Network Layer
6. DataLink layer
7. Physical layer

ASHWINI K.G,ASST.PROF,CSBS,CEC 15
MODULE 1

The Physical Layer

The physical layer is concerned with transmitting raw bits over a communication channel.
The design issues have to do with making sure that when one side sends a 1 bit it is received
by the other side as a 1 bit, not as a 0 bit.
This is a media layer and is also referred to as layer 1 of the OSI model. The physical layer is
responsible for taking care of the electrical and mechanical operations of the host at the
actual physical level. These operations include or deal with issues relating to signal
generation, signal transfer, voltages, the layout of cables, physical port layout, line
impedances, and signal loss. This layer is responsible for the topological layout of the network
(star, mesh, bus, or ring), communication mode (simplex, duplex, full duplex), and bit rate
control operations. The protocol data unit associated with this layer is referred to as a symbol.

The Data Link Layer


Data link layer receives the data from network layer. This is a media layer and layer 2 of the
OSI model. The data link layer is mainly concerned with the establishment and termination of
the connection between two hosts, and the detection and correction of errors during
communication between two or more connected hosts.

There are two types of addressing done to the packets transfers from one computer to
another computer.

Logical addressing: Logical addressing is assigning sender and receiver IP addresses to data
packets. This is done at the network layer.

Physical addressing: Physical addressing is done at data link layer where MAC addresses of
sender and receiver are assigned to each data packets.

Data unit in the data link layer is called frame. A frame is transferred from one computer to
another computer and transmission is done through a transmission media such as wire, cable
etc. Both sender and receiver computer has NIC that helps in sending and receiving frame.
These NICs presents at sender and receiver provides a physical link between sender and
receiver.

Main functions of data link layer:


Access the Media: Allows upper layers of OSI model to use the media using a technique called
framing.

Media Access control: How data is placed and received from the media.

Error Detection: Tail of the each frame transferred contains certain bits to check whether the
data received on the side is corrupted or not.

ASHWINI K.G,ASST.PROF,CSBS,CEC 16
MODULE 1

The Network Layer

This layer is a media layer and layer 3 of the OSI model.It provides a means of routing data to
various hosts connected to different networks through logical paths called virtual circuits.The
main purpose of network layer is to receive the data segments from transport layer and
transfer them from one computer to another computer on different network. The protocol
data unit associated with this layer is referred to as a packet.

The network layer controls the operation of the subnet. A key design issue is determining
how packets are routed from source to destination. Routes can be based on static tables that
are ‘‘wired into’’ the network and rarely changed, or more often they can be updated
automatically to avoid failed components. They can also be determined at the start of each
conversation, for example, a terminal session, such as a login to a remote machine. Finally,
they can be highly dynamic, being determined a new for each packet to reflect the current
network load. If too many packets are present in the subnet at the same time, they will get in
one another’s way, forming bottlenecks. Handling congestion is also a responsibility of the
network layer, in conjunction with higher layers that adapt the load they place on the
network.

When a packet has to travel from one network to another to get to its destination,many
problems can arise. The addressing used by the second network may be different from that
used by the first one. The second one may not accept the packet at all because it is too large.
The protocols may differ, and so on. It is up to the network layer to overcome all these
problems to allow heterogeneous networks to be interconnected. In broadcast networks, the
routing problem is simple, so the network layer is often thin or even non-existent.

The main functions of network layer:

Logical Addressing: Every computer on a network has a unique IP address. Network layer
assigns the sender and receiver IP address to the data packets before transmitting them so
that the data packet reach the correct destination.

Routing: It is a method of transferring data packets from source to destination. It uses the
combination of Mask and IP address to transfer the data to correct destination. Each data
packets contains three addition components mask, sender IP, receiver IP. The Mask
determines the computer network to which the data needs to be delivered and then the IP
address determines which computer on that particular network needs to receive the data
packet.

Path determination: A computer can be connected to another computer in number of ways.


Network layer determines the optimal path for data transmission so that the data can be
transmitted faster to the receiver. OSPF, BGP, IS-IS protocols are used to determine best
possible path for data delivery.

ASHWINI K.G,ASST.PROF,CSBS,CEC 17
MODULE 1

The Transport Layer

The main role of transport layer is to check the reliability of data communication. This is layer
4 of the OSI model and is a host layer.

The main functions of transport layer are:


Segmentation: Data received from session layer is divided into small data units called
segments. Each segment contains the sender and receiver port number along with the
sequence number. Port number helps to direct the data segments to the correct application
and the sequence number helps to reassemble the data from data segments in correct order.

Flow control: It controls the flow of data. It checks the capability of the receiver device
receiving capability before transmitting data. For example a sender server can send the data
at a rate of 200Mbps but a receiving data can only receive data at a rate of 10 Mbps then it
controls the flow of data to 10Mbps so that the data doesn’t get lost during transmission.

Error control: Transport layer also performs error control using Automatic Repeat Request, if
a data is lost during transmission, it is send again using automatic repeat request. Transport
layer also adds a group of bits called checksum with each segment to check whether the data
received at receiver side is not corrupt.

Connection oriented transmission: Connection oriented transmission is done using


transmission control protocol (TCP). TCP is considerably slower than UDP because it provides
the feedback that the data is received or not, thus a data can be sent again if it is not received.

Connectionless transmission: Connectionless transmission is done using User Datagram


protocol (UDP). UDP is faster than TCP because it doesn’t provide the feedback that the data
is actually received at the receiver side or not.

The Session Layer

This is the OSI model’s layer 5 and is a host layer. It is responsible for establishing, controlling,
and terminating of communication between networked hosts. The session layer sees full
utilization during operations such as remote procedure calls and remote sessions. The
protocol data unit associated with this layer is referred to as data.
Main functions of session layer:
Authentication: Before a computer can be connected to a server, the computer has to
provide user name and password for the authentication. The function of authentication and
setting up a connection after authentication is performed by session layer.
Authorization: Once a connection is established, session layer checks whether the connected
computer is authorised to access the data, this function of authorisation checking is also
performed by session layer.
Session management: Session layer also checks that the data which is received from the
server in form of data packets belongs to which application for example when you access
Facebook profile through your browser, the data transferred from the Facebook server is

ASHWINI K.G,ASST.PROF,CSBS,CEC 18
MODULE 1

transferred to your web browser application, thus the session layer helps in session
management.

The Presentation Layer


This layer is a host layer and layer 6 of the OSI model. It is mainly responsible for data format
conversions and encryption tasks such that the syntactic compatibility of the data is
maintained across the network, for which it is also referred to as the syntax layer. The
protocol data unit associated with this layer is referred to as data.

ASHWINI K.G,ASST.PROF,CSBS,CEC 19
MODULE 1

Functions of Presentation layer: Translation: The data received from application layer is in
form of characters and numbers such as 1234, ERFF etc. The presentation layer converts these
characters and numbers into machine understandable format which is known as binary
format for example 100111101.
Encryption: To protect the sensitivity of data, presentation layer encrypts the data at the
sender side before the transmission and the receiver side this data is decrypted by the
presentation layer at the receiver side. Secure sockets layer protocol (SSL) is used by the
presentation layer for encryption and decryption.
Compression: Compress the data to small size so that it can be transferred faster over a
network. This compression can be lossy or lossless compression.

The Application Layer

This is layer 7 of the OSI model and is a host layer. It is directly accessible by an end-user
through software APIs (application program interfaces) and terminals. Applications such as
file transfers, FTP (file transfer protocol), e-mails, and other such operations are initiated from
this layer. The application layer deals with user authentication, identification of
communication hosts, quality of service, and privacy. The protocol data unit associated with
this layer is referred to as data.Application layer defines the protocols that are used by
computer applications for example:HTTP and HTTPS protocols are used by web browsers such
as google chrome, FireFox, Safari etc.FTP protocol is used for file transfer between two or
more computers. SMTP protocol is used for emails Telnet is used for virtual terminals.

The TCP/IP Reference Model

The TCP/IP Model is developed before than OSI Model. The layers in TCP/IP Model are
different than OSI Model.

The Internet protocol suite predates the OSI model and provides only four levels of
abstraction:
1) Link layer, 2) Internet layer,3) Transport layer, and 4) Application layer.

(i) Link Layer: The first and base layer of the TCP/IP protocol suite is also known as the
network interface layer. This layer is synonymous with the collective physical and data link
layer of the OSI model. It enables the transmission of TCP/IP packets over the physical
medium. According to its design principles, the link layer is independent of the medium in
use, frame format, and network access, enabling it to be used with a wide range of
technologies such as the Ethernet,wireless LAN, and the asynchronous transfer mode (ATM).

(ii) Internet Layer: Layer 2 of the TCP/IP protocol suite is somewhat synonymous to the
network layer of the OSI model. It is responsible for addressing, address translation, data
packaging, data disassembly and assembly, routing, and packet delivery tracking operations.
Some core protocols associated with this layer are address resolution protocol (ARP), Internet
protocol (IP), Internet control message protocol (ICMP), and Internet group management
protocol (IGMP).Traditionally, this layer was built upon IPv4, which is gradually shifting to

ASHWINI K.G,ASST.PROF,CSBS,CEC 20
MODULE 1

IPv6, enabling the accommodation of a much more significant number of addresses and
security measures.

(iii) Transport Layer: Layer 3 of the TCP/IP protocol suite is functionally synonymous with the
transport layer of the OSI model. This layer is tasked with the functions of error control, flow
control, congestion control, segmentation, and addressing in an end-to-end manner; it is also
independent of the underlying network. Transmission control protocol (TCP) and user
datagram protocol (UDP) are the core protocols upon which this layer is built, which in turn
enables it to have the choice of providing connection-oriented or connectionless services
between two or more hosts or networked devices.

(iv) Application Layer: The functionalities of the application layer, layer 4, of the TCP/IP
protocol suite are synonymous with the collective functionalities of the OSI model’s session,
presentation, and application layers. This layer enables an end-user to access the services of
the underlying layers and defines the protocols for the transfer of data. Hypertext transfer
protocol (HTTP), file transfer protocol (FTP), simple mail transfer protocol (SMTP), domain
name system (DNS), routing information protocol (RIP), and simple network management
protocol (SNMP) are some of the core protocols associated with this layer.

Fig 1.11

ASHWINI K.G,ASST.PROF,CSBS,CEC 21
MODULE 1

The Model Used

The strength of the OSI reference model is the model itself (minus the presentation and
session layers), which has proven to be exceptionally useful for discussing computer
networks. In contrast, the strength of the TCP/IP reference model is the protocols, which have
been widely used for many years. The framework used for our reference is:

5 Application
4 Transport
3 Network
2 Link
1 Physical

This model has five layers, running from the physical layer up through the link, network and
transport layers to the application layer.
The physical layer specifies how to transmit bits across different kinds of media as electrical
(or other analog) signals.
The link layer is concerned with how to send finite-length messages between directly
connected computers with specified levels of reliability. Ethernet and 802.11 are examples of
link layer protocols.
The network layer deals with how to combine multiple links into networks, and networks of
networks, into internetworks so that we can send packets between distant computers. This
includes the task of finding the path along which to send the packets. IP is the main example
protocol.
The transport layer strengthens the delivery guarantees of the Network layer, usually with
increased reliability, and provide delivery abstractions, such as a reliable byte stream, that
match the needs of different applications. TCP is an important example of a transport layer
protocol.
The application layer contains programs that make use of the network. Many, but not all,
networked applications have user interfaces, such as a Web browser. This is the HTTP protocol

ASHWINI K.G,ASST.PROF,CSBS,CEC 22
MODULE 1

in the case of the Web browser. There are also important support programs in the application
layer, such as the DNS, that are used by many applications.

A Comparison of the OSI and TCP/IP Reference Models

There are several similarities between the TCP/IP and OSI reference models.Both are based
on the concept of a stack of independent protocols. The functionality of the layers is almost
similar. For example, in both models the layers up through and including the transport layer
are there to provide an end-to-end, network- independent transport service to processes
wishing to communicate. These layers form the transport provider. In both models, the layers
above transport are application-oriented users of the transport service.

Despite these fundamental similarities, the two models also have many differences.

Three concepts are central to the OSI model:


1. Services.
2. Interfaces.
3. Protocols.

Each layer performs some services for the layer above it.

The service definition tells what the layer does, not how entities above it access it or how the
layer works. It defines the layer’s semantics.

A layer’s interface tells the processes above it how to access it. It specifies what the
parameters are and what results to expect. It, too, says nothing about how the layer works
inside.

The peer protocols used in a layer are the layer’s own business. It can use any protocols it
wants to, as long as it gets the job done (i.e., provides the offered services). It can also change
them at will without affecting software in higher layers.

These ideas fit very nicely with modern ideas about object-oriented programming. An object,
like a layer, has a set of methods (operations) that processes outside the object can invoke.
The semantics of these methods define the set of services that the object offers. The methods’
parameters and results form the object’s interface. The code internal to the object is its
protocol and is not visible or of any concern outside the object.

The TCP/IP model did not originally clearly distinguish between services, interfaces, and
protocols. For example, the only real services offered by the internet layer are SEND IP
PACKET and RECEIVE IP PACKET. As a consequence, the protocols in the OSI model are better
hidden than in the TCP/IP model and can be replaced relatively easily as the technology
changes.

The OSI reference model was devised before the corresponding protocols were invented. This
ordering meant that the model was not biased toward one particular set of protocols, a fact

ASHWINI K.G,ASST.PROF,CSBS,CEC 23
MODULE 1

that made it quite general. The downside of this ordering was that the designers did not have
much experience with the subject and did not have a good idea of which functionality to put
in which layer.
For example, the data link layer originally dealt only with point-to-point networks. When
broadcast networks came around, a new sublayer had to be hacked into the model.
Furthermore, when people started to build real networks using the OSI model and existing
protocols, it was discovered that these networks did not match the required service
specifications, so convergence sublayers had to be grafted onto the model to provide a place
for papering over the differences.

With TCP/IP the reverse was true: the protocols came first, and the model was really just a
description of the existing protocols. There was no problem with the protocols fitting the
model. They fit perfectly. The only trouble was that the model did not fit any other protocol
stacks. Consequently, it was not especially useful for describing other, non-TCP/IP networks
Turning from philosophical matters to more specific ones, an obvious difference between the
two models is the number of layers: the OSI model has seven layers and the TCP/IP model has
four. Both have (inter)network, transport, and application layers, but the other layers are
different.
Another difference is in connectionless versus connection-oriented communication. The OSI
model supports both connectionless and connection oriented communication in the network
layer, but only connection-oriented communication in the transport layer, where it counts
(because the transport service is visible to the users). The TCP/IP model supports only one
mode in the network layer (connectionless) but in the transport layer, giving the users a
choice. This choice is especially important for simple request-response protocols.

A Critique of the OSI Model and Protocols

Neither the OSI model and its protocols nor the TCP/IP model and its protocols are perfect. It
has certain drawbacks. They can be summarized as:
1. Bad timing.
2. Bad technology.
3. Bad implementations.
4. Bad politics.

1. Bad Timing:
The time at which a standard is established is absolutely critical to its success. David Clark of
M.I.T. has a theory of standards that he calls the apocalypse of the two elephants, which is
illustrated in Fig.1.13.

This figure shows the amount of activity surrounding a new subject. When the subject is first
discovered, there is a burst of research activity in the form of discussions,papers, and
meetings. After a while this activity subsides, corporations discover the subject, and the
billion-dollar wave of investment hits. It is essential that the standards be written in the
trough in between the two ''elephants.'' If the standards are written too early, before the
research is finished, the subject may still be poorly understood; the result is bad standards. If
they are written too late, so many companies may have already made major investments in

ASHWINI K.G,ASST.PROF,CSBS,CEC 24
MODULE 1

different ways of doing things that the standards are effectively ignored. If the interval
between the two elephants is very short(because everyone is in a hurry to get started), the
people developing the standards may get crushed.

2. Bad Technology:
The second reason that OSI never caught on is that both the model and the protocols are
flawed. The choice of seven layers was more political than technical, and two of the layers
(session and presentation) are nearly empty, whereas two other ones (data link and network)
are overfull.

The OSI model, along with the associated service definitions and protocols, is extraordinarily
complex. When piled up, the printed standards occupy a significant fraction of a meter of
paper. They are also difficult to implement and inefficient in operation. In addition to being
incomprehensible, another problem with OSI is that some functions, such as addressing, flow
control, and error control, reappear again and again in each layer.

3. Bad Implementations:
Given the enormous complexity of the model and the protocols, it will come as no surprise
that the initial implementations were huge, unwieldy, and slow. Everyone who tried them got
burned. It did not take long for people to associate ''OSI'' with ''poor quality.'' Although the
products improved in the course of time, the image stuck.

4. Bad Politics:
On account of the initial implementation, many people, especially in academia, thought of
TCP/IP as part of UNIX, and UNIX in the 1980s in academia was not unlike parenthood (then
incorrectly called motherhood) and apple pie.

OSI, on the other hand, was widely thought to be the creature of the European
telecommunication ministries, the European Community, and later the U.S. Government. This
belief was only partly true, but the very idea of a bunch of government bureaucrats trying to
shove a technically inferior standard down the throats of the poor researchers and
programmers down in the trenches actually developing computer networks did not help

ASHWINI K.G,ASST.PROF,CSBS,CEC 25
MODULE 1

much. Some people viewed this development in the same light as IBM announcing in the
1960s that PL/I was the language of the future, or DoD correcting this later by announcing
that it was actually Ada.

A Critique of the TCP/IP Reference Model

The TCP/IP model and protocols have their problems too.

First, the model does not clearly distinguish the concepts of services, interfaces, and
protocols. Good software engineering practice requires differentiating between the
specification and the implementation, something that OSI does very carefully, but 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 protocol
stack other than TCP/IP. Trying to use the TCP/IP model to describe Bluetooth, for example,
is completely impossible.

Third, the link 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 between 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. 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.

ASHWINI K.G,ASST.PROF,CSBS,CEC 26

You might also like