unit 1 cn

You might also like

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

What is a Computer Network

 Computer Network is a group of computers connected with each other through wires, so
that various devices can interact with each other through a network.
 The aim of the computer network is the sharing of resources among various devices.

Criteria of a Good Network

1. Performance:
 It can be measured in many ways, including transmit 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 the network depends on a number of factors, including the
number of users, the type of medium & Hardware
2. Reliability:
 In addition to accuracy is measured by frequency of failure, the time it takes a link
to recover from failure, and the network’s robustness in catastrophe.
3. 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 loss.

Goals of Computer Networking


 Programs do not have to execute on a single system because of resource and load
sharing.
 Reduced costs – Multiple machines can share printers, tape drives, and other
peripherals.
 Reliability – If one machine fails, another can take its place.
 Scalability: it’s simple to add more processors or computers
 Communication and mail: People living apart can work together
 Information Access: Remote information access, access to the internet, e-mail, video
conferencing, and online shopping
 Social Networking
Computer Network Components
Computer networks components comprise both physical parts as well as the software required
for computer networks

1.Hardware Components
1.Peers :
 Peers are computers that provide as well as receive services from other peers in a
workgroup network.
2. Transmission Media :
 Transmission media are the channels through which data is transferred from one device
to another in a network.
 Transmission media may be guided media like coaxial cable, fibre optic cables etc; or
maybe unguided media like microwaves, infra-red waves etc.
3. Connecting Devices:
 Connecting devices act as middleware between networks or computers, by binding the
network media together. Some of the common connecting devices are:

a) Routers
b) Bridges
c) Hubs
d) Repeaters
e) Gateways
f) Switches

2. Software Components
 Networking Operating System − Network Operating Systems is typically installed in
the server and facilitate workstations in a network to share files, database, applications,
printers etc.
 Protocol Suite − A protocol is a rule or guideline followed by each computer for data
communication. The two popular protocol suites are −
a. OSI Model ( Open System Interconnections)
b. TCP / IP Model
Features Of Computer network

1. Communication speed:

Network provides us to communicate over the network in a fast and efficient manner. For
example, we can do video conferencing, email messaging, etc. over the internet. Therefore, the
computer network is a great way to share our knowledge and ideas.

2 File sharing

File sharing is one of the major advantages of the computer network. Computer network
provides us to share the files with each other.
3. Back up and Roll back is easy:

Since the files are stored in the main server which is centrally located. Therefore, it is easy to
take the back up from the main server.

4. Software and Hardware sharing

We can install the applications on the main server, therefore, the user can access the applications
centrally. So, we do not need to install the software on every machine. Similarly, hardware can
also be shared.

5. Security

Network allows the security by ensuring that the user has the right to access the certain files and
applications.

6. Scalability

Scalability means that we can add the new components on the network. Network must be
scalable so that we can extend the network by adding new devices. But, it decreases the speed of
the connection and data of the transmission speed also decreases, this increases the chances of
error occurring. This problem can be overcome by using the routing or switching devices.

7.Reliability

Computer network can use the alternative source for the data communication in case of any
hardware failure.

Computer Network Architecture

 Computer Network Architecture is defined as the physical and logical design of the
software, hardware, protocols, and media of the transmission of data.
 Simply we can say that how computers are organized and how tasks are allocated to the
computer.

The two types of network architectures are used:

1. Peer-To-Peer network
2. Client/Server network

1.Peer-To-Peer network
 Peer-To-Peer network is a network in which all the computers are linked together with
equal privilege and responsibilities for processing the data.
 Peer-To-Peer network is useful for small environments, usually up to 10 computers.
 Peer-To-Peer network has no dedicated server.

Advantages of Peer-To-Peer Network:


 It is less costly as it does not contain any dedicated server.
 If one computer stops working but, other computers will not stop working.
 It is easy to set up and maintain as each computer manages itself.

Disadvantages of Peer-To-Peer Network:


 In the case of Peer-To-Peer network, it does not contain the centralized system .
Therefore, it cannot back up the data as the data is different in different locations.
 It has a security issue as the device is managed itself.

2.Client/Server Network
 Client/Server network is a network model designed for the end users called clients, to
access the resources from a central computer known as Server.
 The central controller is known as a server while all other computers in the network are
called clients.
 A server performs all the major operations such as security and network management.
 A server is responsible for managing all the resources such as files, directories, printer,
etc.
 All the clients communicate with each other through a server. For example, if client1
wants to send some data to client 2, then it first sends the request to the server for the
permission. The server sends the response to the client 1 to initiate its communication
with the client 2.
Advantages of Client/Server network:
 A Client/Server network contains the centralized system. Therefore we can back up the
data easily.
 A Client/Server network has a dedicated server that improves the overall performance of
the whole system.
 Security is better in Client/Server network as a single server administers the shared
resources.
 It also increases the speed of the sharing resources.

Disadvantages of Client/Server network:


 Client/Server network is expensive as it requires the server with large memory.
 A server has a Network Operating System(NOS) to provide the resources to the clients,
but the cost of NOS is very high.

Types of Computer Networks


a. Based on the Communication Medium
b. Based on Area Covered
c. Based on Types of Communication
d. Based on the Type of Architecture

1.Division Based on the Communication Medium

1.Wired Network:
 wired” refers to any physical medium made up of cables.
 Copper wire, twisted pair, or fiber optic cables are all options. A wired network
employs wires to link devices to the Internet or another network, such as laptops or
desktop PCs.
2.Wireless Network:
 “Wireless” means without wire, media that is made up of electromagnetic waves (EM
Waves) or infrared waves.
 Antennas or sensors will be present on all wireless devices.
 Cellular phones, wireless sensors, TV remotes, satellite dish receivers, and laptops with
WLAN cards are all examples of wireless devices.
 For data or voice communication, a wireless network uses radio frequency waves rather
than wires.

2.Division Based on Area Covered


1.Local Area Network (LAN):
 A LAN is a network that covers an area of around 10 kilometers.
 For example, a college network or an office network. Depending upon the needs of the
organization, a LAN can be a single office, building, or Campus.
 We can have two PCs and one printer in-home office or it can extend throughout the
company and include audio and video devices. Each host in LAN has an identifier, an
address that defines hosts in LAN. A packet sent by the host to another host carries both
the source host’s and the destination host’s address.
2.Metropolitan Area Network (MAN):
 MAN refers to a network that covers an entire city. For example: consider the cable
television network.
3.Wide Area Network (WAN):
 WAN refers to a network that connects countries or continents.
 For example, the Internet allows users to access a distributed system called www from
anywhere around the globe.
 WAN interconnects connecting devices such as switches, routers, or modems. A LAN
is normally privately owned by an organization that uses it.

3.Based on Types of Communication

1.Point To Point networks:


 Point-to-Point networking is a type of data networking that establishes a direct link
between two networking nodes.

 A direct link between two devices, such as a computer and a printer, is known as a
point-to-point connection.
2.Multipoint:
 It is the one in which more than two specific devices share links.
 In the multipoint environment, the capacity of the channel is shared, either spatially
or temporally. If several devices can use the link simultaneously, it is a spatially shared
connection.
3.Broadcast networks:
 In broadcast networks, a signal method in which numerous parties can hear a single
sender.
 Radio stations are an excellent illustration of the “Broadcast Network” in everyday life.
The radio station is a sender of data/signal in this scenario, and data is only intended to
travel in one direction.

4.Based on the Type of Architecture


 P2P Networks: Computers with similar capabilities and configurations are referred to as
peers.
“Peer to Peer” is the abbreviation for “peer to peer.” The “peers” in a peer-to-peer network
are computer systems that are connected to each other over the Internet. Without the use of
a central server, files can be shared directly between systems on the network.
 Client-Server Networks: Each computer or process on the network is either a client or a
server in a client-server architecture (client/server). The client asks for services from the
server, which the server provides. Servers are high-performance computers or processes
that manage disc drives (file servers), printers (print servers), or network traffic (network
servers)
 Hybrid Networks: The hybrid model refers to a network that uses a combination of client-
server and peer-to-peer architecture. Eg: Torrent.

What is Network Topology?


 Topology defines the structure of the network of how all the components are
interconnected to each other.

Types of Network Topology

1. BUS Topology

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

1. It transmits data only in one direction.


2. Every device is connected to a single cable

Advantages of Bus Topology:

1. It is cost effective.
2. Cable required is least compared to other network topology.
3. Used in small networks.
4. Easy to expand joining two cables together.

Disadvantages of Bus Topology:

1. Cables fails then whole network fails.


2. If network traffic is heavy or nodes are more the performance of the network decreases.
3. Cable has a limited length.
4. It is slower than the ring topology.

2. RING Topology

 It is called ring topology because it forms a ring as each computer is connected to another
computer, with the last one connected to the first. Exactly two neighbors for each device.
Features of Ring Topology:

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

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


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

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

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

Advantages of Ring Topology

1. Transmitting network is not affected by high traffic or by adding more nodes, as only the
nodes having tokens can transmit data.

2. Cheap to install and expand

Disadvantages of Ring Topology

1. Troubleshooting is difficult in ring topology.


2. Adding or deleting the computers disturbs the network activity.
3. Failure of one computer disturbs the whole network.
3. STAR Topology

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

Features of Star Topology


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

2. Hub acts as a repeater for data flow.

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

Advantages of Star Topology

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

2. Hub can be upgraded easily.

3. Easy to troubleshoot.

4. Easy to setup and modify.

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

Disadvantages of Star Topology

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

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


4. MESH Topology

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

Types of Mesh Topology:

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

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

Features of Mesh Topology:

1. Fully connected.

2. Robust.

Advantages of Mesh Topology:

1. It is robust.

2. Fault is diagnosed easily.

3. Provides security and privacy.

Disadvantages of Mesh Topology:

1. Installation and configuration is difficult.

2. Cabling cost is more.

3. Bulk wiring is required.


5. TREE Topology

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

Features of Tree Topology:

1. Ideal if workstations are located in groups.

2. Used in Wide Area Network.

Advantages of Tree Topology:

1. Extension of bus and star topologies.

2. Expansion of nodes is possible and easy.

3. Easily managed and maintained.

4. Error detection is easily done.

Disadvantages of Tree Topology

1. Heavily cabled.

2. Costly.

3. If more nodes are added maintenance is difficult.

4. Central hub fails, network fails.


6.HYBRID Topology

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

Advantages of Hybrid Topology:

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

2. Effective.

3. Scalable as size can be increased easily.

Disadvantages of Hybrid Topology

1. Complex in design.

2. Costly.

Transmission Modes in Computer Networks

 Transmission mode refers to the mechanism of transferring of data between two devices
connected over a network.
 It is also called Communication Mode. These modes direct the direction of flow of
information.
 There are three types of transmission modes. They are:

1. Simplex Mode
2. Half duplex Mode
3. Full duplex Mode

1. SIMPLEX Mode

 In this type of transmission mode, data can be sent only in one direction i.e.
communication is unidirectional. We cannot send a message back to the sender.
 Unidirectional communication is done in Simplex Systems where we just need to send a
command/signal, and do not expect any response back.
 Examples of simplex Mode are loudspeakers, television broadcasting, television and
remote, keyboard and monitor etc.

2. HALF DUPLEX Mode

 Half-duplex data transmission means that data can be transmitted in both directions on a
signal carrier, but not at the same time.
 Example of half duplex is a walkie- talkie in which message is sent one at a time but
messages are sent in both the directions.
3. FULL DUPLEX Mode

 In full duplex system we can send data in both the directions as it is bidirectional at the
same time in other words, data can be sent in both directions simultaneously.
 Example of Full Duplex is a Telephone Network in which there is communication
between two persons by a telephone line, using which both can talk and listen at the same
time.

In full duplex system there can be two lines one for sending the data and the other for receiving
data.

............................................................................................................................

Layered Architecture in Computer Networks


Every network consists of a specific number of functions, layers, and tasks to perform. Layered
Architecture in a computer network is defined as a model where a whole network process is
divided into various smaller sub-tasks. These divided sub-tasks are then assigned to a specific
layer to perform only the dedicated tasks. A single layer performs only a specific type of task.
To run the application and provide all types of services to clients a lower layer adds its services
to the higher layer present above it. Therefore layered architecture provides interactions
between the sub-systems. If any type of modification is done in one layer it does not affect the
next layer.
Layered Architecture

As shown in the above diagram, there are five different layers. Therefore, it is a five-layered
architecture. Each layer performs a dedicated task. The lower-level data for example from
layer 1 data is transferred to layer 2. Below all the layers Physical Medium is present. The
physical medium is responsible for the actual communication to take place. For the transfer of
data and communication layered architecture provides with a clean cut interface.

Features of Layered Architecture:


 Use of Layered architecture in computer network provides with the feature of
modularity and distinct interfaces.
 Layered architecture ensures independence between layers, by offering services to
higher layers from the lower layers and without specifying how these services are
implemented.
 Layered architecture segments as larger and unmanageable design into small sub tasks.
 In layer architecture every network has different number of functions, layers and
content.
 In layered architecture, the physical route provides with communication which is
available under the layer 1.
 In layered architecture, the implementation done by one layer can be modified by
another layer.

Elements of Layered Architecture


There are three different types of elements of a layered architecture. They are described below:
 Service: Service is defined as a set of functions and tasks being provided by a lower
layer to a higher layer. Each layer performs a different type of task. Therefore, actions
provided by each layer are different.
 Protocol: Protocol is defined as a set rule used by the layer for exchanging and
transmission of data with its peer entities. These rules can consists details regarding a
type of content and their order passed from one layer to another.
 Interface: Interface is defined as a channel that allows to transmit the messages from
one layer to the another.

Need of Layered Architecture


 Divide and Conquer Approach: Layered architecture supports divide and conquer
approach. The unmanageable and complex task is further divided into smaller sub tasks.
Each sub task is then carried out by the different layer. Therefore, using this approach
reduces the complexity of the problem or design process.
 Easy to Modify: The layers are independent of each other in layered architecture. If
any sudden change occurs in the implementation of one layer, it can be changed. This
change does not affect the working of other layers involved in the task. Therefore,
layered architectures are required to perform any sudden update or change.
 Modularity: Layered architecture is more modular as compared to other architecture
models in Computer network. Modularity provides with more independence between
the layers and are easier to understand.
 Easy to Test: Each layer in layered architecture performs a different and dedicated
task. Therefore, each layer can be analyzed and tested individually. It helps to analyze
the problem and solve them more efficiently as compared to solving all the problems at
a time.

Application of Layered Architecture in computer Networks:


In computer networks, layered architecture is majorly used for communication. The two
network models that make use of layered architecture are:
1. OSI Model
2. TCP/IP Model

What are Design Issues for the Layers of Computer Networks:

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

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.

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.
What is Protocol?
A protocol is simply defined as a set of rules and regulations for data communication. Rules
are defined for every step and process at the time of communication among two or more
computers. Networks are needed to follow these protocols to transmit the data successfully. All
protocols might be implemented using hardware, software, or a combination of both of them.

There are three aspects of protocols given below :


 Syntax – It is used to explain the data format that is needed to be sent or received.
 Semantics – It is used to explain the exact meaning of each of the sections of bits that are
usually transferred.
 Timings – This is used to explain the exact time at which data is generally transferred
along with the speed at which it is transferred.

Protocol Hierarchies in Computer Network

A Protocol Hierarchy is a fixed set of rules and conventions that govern the communication
between two or more computers. The hierarchical structure allows for modular design,
interoperability, and ease of implementation in computer networks.

Generally, Computer networks are comprised of or contain a large number of hardware and
software. For network design, various networks are organized and arranged as a stack of layers
of hardware and software, one on top of another. The number, name, content, and function of
each layer might vary and can be different from one network to another. The main purpose of
each layer is to provide services to higher layers that are present. Every layer has some
particular task or function. The networks are organized and arranged as different layers or
levels simply to reduce and minimize the complexity of the design of network software.

Example: Protocol Hierarchy

Below is diagram representing a five-layer network. The diagram shows communication


between Host 1 and Host 2. The data stream is passed through a number of layers from one
host to other. Virtual communication is represented using dotted lines between peer layers.
Physical communication is represented using solid arrows between adjacent layers. Through
physical medium, actual communication occurs. The layers at same level are commonly known
as peers. The peer basically has a set of communication protocols. An interface is present
between each of layers that are used to explain services provided by lower layer to higher
layer.
Advantages of Protocol Hierarchy
 The layers generally reduce complexity of communication between networks
 It increases network lifetime.
 It also uses energy efficiently.
 It does not require overall knowledge and understanding of network.

Disadvantages of Protocol Hierarchy


 Protocol Hierarchy requires a deep understanding of each layers of OSI model.
 Implementation of protocol hierarchy is very costly.
 Every layer in protocol hierarchy introduce over-heading in terms of memory,
bandwidth and processing.
 Protocol Hierarchy is not scalable for complex networks.

What is Interfaces and Services:

Interfaces and Services is a process that generally provides and gives a common technique for
each layer to communicate with each other. Standard terminology basically required for
layered networks to request and aim for the services are provided. Service is defined as a set of
primitive operations. Services are provided by layer to each of layers above it. Below is
diagram showing relation between layers at an interface. In diagram, layers N+1, N, and N-1
are involved and engaged in process of communication among each other.
Components Involved and their Functions:
 Service Data Unit (SDU) – SDU is a piece of information or data that is generally passed
by layer just above current layer for transmission. Unit of data or information is passed
down to a lower layer from an OSI (Open System Interconnection) layer or sublayer. Data
is passed with request to transmit data. SDU basically identifies or determines information
that is been transferred among entities of peer layers that are not interpreted by supporting
entities of lower-layer

 Protocol Data Unit (PDU) – PDU is a single unit of information or data that is transmitted
or transferred among entities of peer layers of a computer network. When application data
is passed down to protocol stack on its way to being transmitted all over network media,
some of protocols add information and data to it at each and every level. PDU is used to
represent and describe data is it gets transferred from one layer of OSI model to another
layer.
Advantages:
 Increase in Compatibility – Layered approach to networking and communication
protocols generally provides and shows greater compatibility among all devices, systems,
and networks that they deliver.
 Less expensive – Easy way of development and implementation converts to increase in an
efficiency and even effectiveness that in turn converts into larger economic rationalization
and very cheaper products while not compromising with quality.
 Increase in Mobility – Whenever we use layered and segmented strategies into
architecture design, there will always be an increase in mobility.
 Better Scalability – Whenever we use a layered or hierarchical approach to networking
protocol, design, and implementation scale much better than horizontal approach.

Connection Oriented and Connectionless Services

In order to establish a connection between two or more devices, there are services in Computer
Networks. There are two services that are given by the layers to layers above them. These
services are as follows:

1. Connection-Oriented Service
2. Connectionless Services

1.Connection-Oriented Services

There is a sequence of operations to be followed by the users of connection-oriented service.


These are:

1. The connection is established.


2. Information is sent.
3. The connection is released.
In connection-oriented service, we have to establish a connection before starting the
communication. When the connection is established, we send the message or the information and
then we release the connection.

Connection-oriented service is more reliable than connectionless service. We can send the
message in a connection-oriented service if there is an error at the receiver's end.

An example of connection-oriented is TCP (Transmission Control Protocol) protocol.

In the above diagram, a solid line between Device A and Device B indicates that there is a
dedicated link with which the stream of data travels between them. With the help of this link, a
receiver can send an acknowledgment to the sender about the status of the packet.

Different Ways : There are two ways in which connection-oriented services can be done.
These ways are given below :

1. Circuit-Switched Connection – Circuit-switching networks or connections are generally


known as connection-oriented networks. In this connection, a dedicated route is being
established among sender and receiver, and whole data or message is sent through it. A
dedicated physical route or a path or a circuit is established among all communication
nodes, and after that, data stream or message is sent or transferred.
2. Virtual Circuit-Switched Connection – Virtual Circuit-Switched Connection or Virtual
Circuit Switching is also known as Connection-Oriented Switching. In this connection, a
preplanned route or path is established before data or messages are transferred or sent. The
message Is transferred over this network is such a way that it seems to user that there is a
dedicated route or path from source or sender to destination or receiver.

Advantages
 Connection-Oriented Services are reliable.
 There is no duplication of data packets.
 There are no chances of Congestion.
 These are Suitable for long connections.
 Sequencing of data packets is guaranteed.

Disadvantages
Drawbacks of Connection-Oriented Service are as follows:

 This allocation of resources is mandatory before communication.


 The speed of connection is slower. As much time is taken for establishing and
relinquishing the connection.
 In the case of Network Congestion or router failures, there are no alternative ways to
continue with communication.

2.Connection Less Services

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

In connectionless the data is transferred in one direction from source to destination without
checking the destination is still there or not or if it prepared to accept the message.
Authentication is not needed in this.

An example of a Connectionless service is UDP (User Datagram Protocol) protocol.

Advantages
 There are usually low overheads.
 Connection-Oriented services help to broadcast or multicast messages to multiple
recipients.
 In this, there is no circuit setup. Thus it takes a fraction of a minute in order to
establish a connection.
 In the case of Network congestion or router failures, it has an alternative path of data
transmission.

Disadvantages
Drawbacks of Connection fewer services are as follows:

 These are susceptible to congestion in the network.


 It is not reliable as there is the possibility of a loss of data packets, wrong delivery of
packets or duplication is high.
 In this, each data packet needs lengthy fields because these are supposed to hold all
the destination addresses and the routing information.

Difference between Connection-oriented and Connection-less Services

Connection-Oriented Services Connection Less Services


Connection-Oriented services are designed on the Connectionless services are based on
basis of the Telephone System. the Postal System.
In this type of service, a prior connection needs In this type of service, no prior connection is
to be established. needed.
These services Ensure the reliable transfer of As these services are best efforts services
data. but reliability is not guaranteed in these.
There is no possibility of congestion. There are chances of occurrence of
congestion using these services.
In this authentication is required before In this, authentication is not required before
transmitting the data packets to the receiver. transmitting the data packets to the receiver.
These services are suitable for long and These services are suitable
steady transmissions. for bursty transmissions.
In this connection is established through the There is no such signaling concept exists.
process of signaling
In this type of service, data packets travel towards In this type of service, data packets travel
their destination node in a sequential manner. towards their destination node in a random
manner.
Retransmission of lost data bits is possible. In this, it is not possible.
Delay is more while transferring the information. Due to the absence of the connection
But after the establishment of connection, these establishment phase, there is no delay.
services offer fast delivery of information.
What are 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.

Connection-Oriented Service Primitives


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. The response is
awaited.
3. RECIEVE: Then the RECIEVE call blocks the server.
4. SEND: Then the client executes SEND primitive to transmit its request followed by the
execution of RECIEVE to get the reply. Send the message.
5. DISCONNECT: This primitive is used for terminating the connection. After this
primitive one can't send any message. When the client sends the 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.

Connectionless Service Primitives:

Primitive Meaning
Unitdata Unitdata primitive is simply required to send packet of data or information.
Facility, This primitive is required for getting details about the performance and working
Report of the network such as delivery statistics or report.

What are Services?


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

OSI Model

 OSI stands for Open System Interconnection is a reference model that describes how
information from one computer moves through a physical medium to the another
computer.
 OSI consists of seven layers, and each layer performs a particular network function.
 OSI model was developed by the International Organization for Standardization (ISO) in
1984, and it is now considered as an architectural model for the inter-computer
communications.
 The physical layer, data link layer and the network layer are the network support layers.
The layers manage a physical transfer of data from one device to another.
 Session layer, presentation layer, and application layer are the user support layers. These
layers allow communication among unrelated software in dissimilar environments

Function of Each Layer:


1) Physical layer
 The main functionality of the physical layer is to transmit the individual bits from one
node to another node.
 It is the lowest layer of the OSI model.
 It establishes, maintains and deactivates the physical connection.
 It specifies the mechanical, electrical and network interface specifications.

Functions of a Physical layer:


 Line Configuration: It defines the way how two or more devices can be connected
physically.
 Transmission modes: It defines the transmission mode whether it is simplex, half-
duplex or full-duplex mode between the two devices on the network.
 Topology: It defines the way how network devices are arranged.
 Signals: It determines the type of the signal used for transmitting the information.

2) Data-Link Layer
 This layer is responsible for the error-free transfer of data frames.
 It provides a reliable and efficient communication between two or more devices.
 It is mainly responsible for the unique identification of each device that resides on a local
network.
 It contains two sub-layers:

1.Logical Link Control Layer


 It is responsible for transferring the packets to the Network layer of the receiver that
is receiving.
 It identifies the address of the network layer protocol from the header.
 It also provides flow control.

2.Media Access Control Layer


 A Media access control layer is a link between the Logical Link Control layer and the
network's physical layer.
 It is used for transferring the packets over the network.
Functions of the Data-link layer
Framing: The data link layer translates the physical's raw bit stream into packets known
as Frames. The Data link layer adds the header and trailer to the frame. The header which
is added to the frame contains the hardware destination and source address.

o Physical Addressing: The Data link layer adds a header to the frame that contains a
destination address. The frame is transmitted to the destination address mentioned in the
header.
o Flow Control: Flow control is the main functionality of the Data-link layer. It is the
technique through which the constant data rate is maintained on both the sides so that no
data get corrupted. It ensures that the transmitting station such as a server with higher
processing speed does not exceed the receiving station, with lower processing speed.
o Error Control: Error control is achieved by adding a calculated value CRC (Cyclic
Redundancy Check) that is placed to the Data link layer's trailer which is added to the
message frame before it is sent to the physical layer. If any error seems to occur, then the
receiver sends the acknowledgment for the retransmission of the corrupted frames.
o Access Control: When two or more devices are connected to the same communication
channel, then the data link layer protocols are used to determine which device has control
over the link at a given time.

3) Network Layer
 It is a layer 3 that manages device addressing, tracks the location of devices on the
network.
 It determines the best path to move data from source to the destination based on the
network conditions, the priority of service, and other factors.
 The Data link layer is responsible for routing and forwarding the packets.
 The protocols used to route the network traffic are known as Network layer protocols.
Examples of protocols are IPv4 and Ipv6.
Functions of Network Layer:
o Internetworking: An internetworking is the main responsibility of the network layer. It
provides a logical connection between different devices.
o Addressing: A Network layer adds the source and destination address to the header of
the frame. Addressing is used to identify the device on the internet.
o Routing: Routing is the major component of the network layer, and it determines the best
optimal path out of the multiple paths from source to the destination.
o Packetizing: A Network Layer receives the packets from the upper layer and converts
them

4) Transport Layer
 The Transport layer is a Layer 4 ensures that messages are transmitted in the order in
which they are sent and there is no duplication of data.
 The main responsibility of the transport layer is to transfer the data completely.
 It receives the data from the upper layer and converts them into smaller units known as
segments.
 This layer can be termed as an end-to-end layer as it provides a point-to-point connection
between source and destination to deliver the data reliably.

The two protocols used in this layer are:


1.Transmission Control Protocol
 It is a standard protocol that allows the systems to communicate over the internet.
 It establishes and maintains a connection between hosts.
 When data is sent over the TCP connection, then the TCP protocol divides the data into
smaller units known as segments. Each segment travels over the internet using multiple
routes, and they arrive in different orders at the destination. The transmission control
protocol reorders the packets in the correct order at the receiving end.

2.User Datagram Protocol


 User Datagram Protocol is a transport layer protocol.
 It is an unreliable transport protocol as in this case receiver does not send any
acknowledgment when the packet is received, the sender does not wait for any
acknowledgment. Therefore, this makes a protocol unreliable.
Functions of Transport Layer:
 Service-point addressing: Computers run several programs simultaneously due to this
reason, the transmission of data from source to the destination not only from one computer to
another computer but also from one process to another process. The transport layer adds the
header that contains the address known as a service-point address or port address. The
responsibility of the network layer is to transmit the data from one computer to another
computer and the responsibility of the transport layer is to transmit the message to the correct
process.
 Segmentation and reassembly: When the transport layer receives the message from the
upper layer, it divides the message into multiple segments, and each segment is assigned with
a sequence number that uniquely identifies each segment. When the message has arrived at
the destination, then the transport layer reassembles the message based on their sequence
numbers.
 Connection control: Transport layer provides two services Connection-oriented service and
connectionless service. A connectionless service treats each segment as an individual packet,
and they all travel in different routes to reach the destination. A connection-oriented service
makes a connection with the transport layer at the destination machine before delivering the
packets. In connection-oriented service, all the packets travel in the single route.
 Flow control: The transport layer also responsible for flow control but it is performed end-
to-end rather than across a single link.
 Error control: The transport layer is also responsible for Error control. Error control is
performed end-to-end rather than across the single link. The sender transport layer ensures
that message reach at the destination without any error.

5) Session Layer
 The Session layer is used to establish, maintain and synchronizes the interaction between
communicating devices.

Functions of Session layer:


 Dialog control: Session layer acts as a dialog controller that creates a dialog between two
processes or we can say that it allows the communication between two processes which can
be either half-duplex or full-duplex.
 Synchronization: Session layer adds some checkpoints when transmitting the data in a
sequence. If some error occurs in the middle of the transmission of data, then the
transmission will take place again from the checkpoint. This process is known as
Synchronization and recovery.

6) Presentation Layer
 A Presentation layer is mainly concerned with the syntax and semantics of the information
exchanged between the two systems.
 It acts as a data translator for a network.
 This layer is a part of the operating system that converts the data from one presentation
format to another format.
 The Presentation layer is also known as the syntax layer.

Functions of Presentation layer:


 Translation: The processes in two systems exchange the information in the form of
character strings, numbers and so on. Different computers use different encoding methods,
the presentation layer handles the interoperability between the different encoding methods. It
converts the data from sender-dependent format into a common format and changes the
common format into receiver-dependent format at the receiving end.
 Encryption: Encryption is needed to maintain privacy. Encryption is a process of converting
the sender-transmitted information into another form and sends the resulting message over
the network.
 Compression: Data compression is a process of compressing the data, i.e., it reduces the
number of bits to be transmitted. Data compression is very important in multimedia such as
text, audio, video.

7) Application Layer
 An application layer serves as a window for users and application processes to access
network service.
 It handles issues such as network transparency, resource allocation, etc.
 An application layer is not an application, but it performs the application layer functions.
 This layer provides the network services to the end-users.

Functions of Application layer:


 File transfer, access, and management (FTAM): An application layer allows a user to
access the files in a remote computer, to retrieve the files from a computer and to manage the
files in a remote computer.
 Mail services: An application layer provides the facility for email forwarding and storage.
 Directory services: An application provides the distributed database sources and is used to
provide that global information about various objects.
TCP/IP model

 The TCP/IP model was developed prior to the OSI model.


 The TCP/IP model consists of five/four layers: the application layer, transport layer,
network layer, data link layer and physical layer.
 The first four layers provide physical standards, network interface, internetworking, and
transport functions that correspond to the first four layers of the OSI model and these four
layers are represented in TCP/IP model by a single layer called the application layer.
 TCP/IP is a hierarchical protocol made up of interactive modules, and each of them
provides specific functionality.

Here, hierarchical means that each upper-layer protocol is supported by two or more lower-level
protocols.

Functions of TCP/IP layers:


1. Network Access Layer or Host to Network Layer
 A network layer is the lowest layer of the TCP/IP model.
 A network layer is the combination of the Physical layer and Data Link layer defined in
the OSI reference model.
 It defines how the data should be sent physically through the network.
 This layer is mainly responsible for the transmission of the data between two devices on
the same network.
 The functions carried out by this layer are encapsulating the IP datagram into frames
transmitted by the network and mapping of IP addresses into physical addresses.
 The protocols used by this layer are Ethernet, token ring, FDDI, X.25, frame relay.

2. Internet Layer
 An internet layer is the second layer of the TCP/IP model.
 An internet layer is also known as the network layer.
 The main responsibility of the internet layer is to send the packets from any network, and
they arrive at the destination irrespective of the route they take.

Following are the protocols used in this layer are:

IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire
TCP/IP suite.

Following are the responsibilities of this protocol:


 IP Addressing: This protocol implements logical host addresses known as IP addresses. The
IP addresses are used by the internet and higher layers to identify the device and to provide
internetwork routing.
 Host-to-host communication: It determines the path through which the data is to be
transmitted.
 Data Encapsulation and Formatting: An IP protocol accepts the data from the transport
layer protocol. An IP protocol ensures that the data is sent and received securely, it
encapsulates the data into message known as IP datagram.
 Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data
link layer protocol is known as Maximum Transmission unit (MTU). If the size of IP
datagram is greater than the MTU unit, then the IP protocol splits the datagram into smaller
units so that they can travel over the local network. Fragmentation can be done by the sender
or intermediate router. At the receiver side, all the fragments are reassembled to form an
original message.
 Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN,
it is known as direct delivery. When source and destination are on the distant network, then
the IP datagram is sent indirectly. This can be accomplished by routing the IP datagram
through various devices such as routers.

ARP Protocol

 ARP stands for Address Resolution Protocol.


 ARP is a network layer protocol which is used to find the physical address from the IP
address.
 The two terms are mainly associated with the ARP Protocol:

o ARP request: When a sender wants to know the physical address of the device, it
broadcasts the ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP request
and process the request, but only recipient recognize the IP address and sends
back its physical address in the form of ARP reply. The recipient adds the
physical address both to its cache memory and to the datagram header

ICMP Protocol
 ICMP stands for Internet Control Message Protocol.
 It is a mechanism used by the hosts or routers to send notifications regarding datagram
problems back to the sender.
 A datagram travels from router-to-router until it reaches its destination. If a router is
unable to route the data because of some unusual conditions such as disabled links, a
device is on fire or network congestion, then the ICMP protocol is used to inform the
sender that the datagram is undeliverable.
 The core responsibility of the ICMP protocol is to report the problems, not correct them.
The responsibility of the correction lies with the sender.
 ICMP can send the messages only to the source, but not to the intermediate routers
because the IP datagram carries the addresses of the source and destination but not of the
router that it is passed to.

Transport Layer

The transport layer is responsible for the reliability, flow control, and correction of data which is
being sent over the network.

The two protocols used in the transport layer are User Datagram protocol and Transmission
control protocol.

1.User Datagram Protocol (UDP)

 It provides connectionless service and end-to-end delivery of transmission.


 It is an unreliable protocol as it discovers the errors but not specify the error.
 User Datagram Protocol discovers the error, and ICMP protocol reports the error to
the sender that user datagram has been damaged.
2.Transmission Control Protocol (TCP)

 It provides a full transport layer services to applications.


 It creates a virtual circuit between the sender and receiver, and it is active for the
duration of the transmission.
 TCP is a reliable protocol as it detects the error and retransmits the damaged frames.
Therefore, it ensures all the segments must be received and acknowledged before the
transmission is considered to be completed and a virtual circuit is discarded.
 At the sending end, TCP divides the whole message into smaller units known as
segment, and each segment contains a sequence number which is required for
reordering the frames to form an original message.
 At the receiving end, TCP collects all the segments and reorders them based on
sequence numbers.

Application Layer
 An application layer is the topmost layer in the TCP/IP model.
 It is responsible for handling high-level protocols, issues of representation.
 This layer allows the user to interact with the application.
 When one application layer protocol wants to communicate with another application
layer, it forwards its data to the transport layer.
 There is an ambiguity occurs in the application layer. Every application cannot be placed
inside the application layer except those who interact with the communication system.
For example: text editor cannot be considered in application layer while web browser
using HTTP protocol to interact with the network where HTTP protocol is an
application layer protocol.

Following are the main protocols used in the application layer:


o HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access
the data over the world wide web. It transfers the data in the form of plain text, audio,
video. It is known as a Hypertext transfer protocol as it has the efficiency to use in a
hypertext environment where there are rapid jumps from one document to another.
o SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used
for managing the devices on the internet by using the TCP/IP protocol suite.
o SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that
supports the e-mail is known as a Simple mail transfer protocol. This protocol is used to
send the data to another e-mail address.
o DNS: DNS stands for Domain Name System. An IP address is used to identify the
connection of a host to the internet uniquely. But, people prefer to use the names instead
of addresses. Therefore, the system that maps the name to the address is known as
Domain Name System.
o TELNET: It is an abbreviation for Terminal Network. It establishes the connection
between the local computer and remote computer in such a way that the local terminal
appears to be a terminal at the remote system.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for
transmitting the files from one computer to another computer.

Similarities between OSI Model and TCP/IP Model


 OSI and TCP/IP both are logical models.
 Both describe how information is transmitted between two devices across a network.
 Both models define a set of layers. Each layer performs a specific set of functions to
enable the transmission of data.
 They both use the concept of encapsulation, in which data is packaged into a series of
headers and trailers that contain information about the data being transmitted and how it
should be handled by the network.

Differences between OSI Model and TCP/IP Model


OSI Model TCP/IP Model
The OSI model was developed by ISO The TCP/IP model was developed by
(International Standard Organization) in 1984. ARPANET (Advanced Research Project
Agency Network) in 1982.
The OSI model provides standardization to devices The TCP/IP model does not provide
like routers, switches, motherboards, and other standardization to the devices; however, it
hardware devices. gives a connection between different
computers.
It consists of 7 layers: Starting from the bottom It consists of 4 layers: Starting from the
they are the Physical, Data Link, Network, bottom they are the Network Interface,
Transport, Session, Presentation, and Application Internet, Transport, and Application layer.
layer.
The OSI model follows a vertical approach. The TCP/IP model follows a horizontal
approach.
The OSI is a reference model, following which a The TCP/IP is an implementation of the OSI
network is designed. Model.
In the OSI model, the physical layer and the data In TCP, physical and data link layers are
link layer are separate layers. merged as a single network layer.
Session Layer and presentation layers are a There is no distinct session and presentation
component of the OSI model. layer in the TCP model.

Principle of Physical Layer

1.What is Bandwidth
 Bandwidth or Network bandwidth is the maximum rate at which data transfer occurs
across any particular path of the network.
 Bandwidth is basically a measure of the amount of data that can be sent and received at
any instance of time.
 Higher the bandwidth of a network, the larger the amount of data the network can be
sending to and from across its path.
 Be careful not to confuse bandwidth with closely related terms such as the data rate and
the throughput. Bandwidth is something that deals with the measurement of capacity
and not the speed of data transfer.

Units of Measurement
Bandwidth is usually measured in bits transferred per second through a path or link. The
common units of bandwidth are:
bps (Bits per second)
Mbps (Megabits per second)
Gbps (Gigabits per second)

Example: Bandwidth of 10 bps for a channel, means that maximum of 10 bits can be
transferred using that link for any given time. It has no relation with the transfer speed of the
channel.

Difference between Bandwidth and Speed


Bandwidth and Speed can be differentiated on the basis that Bandwidth tells the quantity
whereas Speed tells the fastness of the information.
Difference between Bandwidth and Latency
Latency can be easily defined as How late the information is coming to the user and Bandwidth
can be referred to as simply the amount of data received.
Difference between Bandwidth and Throughput
 Throughput is simply the data that is finally reaching the destination while Bandwidth
is the data coming to the user.
 There are some factors that impact the Throughput is that Network Speed, Packet Loss,
etc.
What is Modulation?
 The process by which data/information is converted into electrical/digital signals for
transferring that signal over a medium is called modulation. It increases strength for
maximum reach of the signals.
 The process of extracting information/data from the transmitted signal is
called demodulation.
 A Modem is a device that performs both modulation and demodulation processes.
 The various forms of modulation are designed to alter the characteristic of carrier
waves. The most commonly altered characteristics of modulation include amplitude,
frequency, and phase.

Carrier signal: The signals which contain no information but have a certain phase, frequency,
and amplitude are called carrier signals.
Modulated signals: The signals which are the combination of the carrier signals and
modulation signals are modulated signals. The modulated signal is obtained after the
modulation of the signals.

Types of modulation:

1. Amplitude modulation: It is a type of modulation in which only the amplitude of the carrier
signal is varied to represent the data being added to the signals whereas the phase and the
frequency of the signal are kept unchanged.

Amplitude Modulation

2. Frequency modulation: It is a type of modulation in which only the frequency of the carrier
signal is varied to represent the frequency of the data whereas the phase and the amplitude of the
signals are kept unchanged.
Frequency Modulation

3. Phase modulation: It is a type of modulation in which the phase of the carrier signal is varied
to represent the data being added to the signal. Different information values are represented by
different phases. For example: ‘1’ may be represented by 0° while ‘0’ by 180°.

What is the need for modulation


1.Size of antenna:
 As we know that the size of the antenna is inversely proportional to the frequency of
the radiated signal and antenna size must be 1/10th of the wavelength.
 If the frequency signals are more than 5KHz in that case it is quite impossible to set up
an antenna of that size. So, by using the modulation technique the size of the antenna is
reduced.
2.Wireless communication:
 Modulation provides a wireless connection to transmit the signals to a longer distance.
 Earlier we used wire systems (like the telephone) to transfer information with the help
of telephonic wires but it was not possible to spread the wires all over the world for
communication. By using the modulation technique, the cost of wire is saved and even
information can be transferred to longer distances faster.

Advantages of modulation:
 It reduces the size of the antenna.
 It reduces the cost of wires.
 It prohibits the mixing of signals.
 It increases the range of communication.
 It improves the reception quality.
 It easily multiplexes the signals.
 It also allows the adjustment of the bandwidth.

You might also like