Computer Network Tutorial
Computer Network Tutorial
The purpose of having computer network is to send and receive data stored in
other devices over the network. These devices are often referred as nodes.
Sender: Sender is the device that has the data and needs to send the data to
other device connected to the network.
Receiver: A receiver is the device which is expecting the data from other device
on the network.
Transmission media: In order to transfer data from one device to another device
we need a transmission media such as wires, cables, radio waves etc.
Protocol: A protocol is a set of rules that are agreed by both sender and
receiver, without a protocol two devices can be connected to each other but they
cannot communicate. In order to establish a reliable communication or data
sharing between two different devices we need set of rules that are called
protocol. For example, http and https are the two protocols used by web
browsers to get and post the data to internet, similarly smtp protocol is used by
email services connected to the internet.
Computer Network Features
BY CHAITANYA SINGH | FILED UNDER: COMPUTER NETWORK
Data Sharing: One of the reason why we use a computer network is to share the
data between different systems connected with each other through a
transmission media.
Backup: A computer network must have a central server that keeps the backup
of all the data that is to be shared over a network so that in case of a failure it
should be able to recover the data faster.
Software and hardware compatibility: A computer network must not limit all
the computers in a computer network to use same software and hardware,
instead it should allow the better compatibility between the different software and
hardware configuration.
Reliability: There should not be any failure in the network or if it occurs the
recovery from a failure should be fast.
In Client Server architecture a central computer acts as a hub and serves all the
requests from client computers. All the shared data is stored in the server
computer which is shared with the client computer when a request is made by
the client computer.
All the communication takes place through the server computer, for example if a
client computer wants to share the data with other client computer then it has to
send the data to server first and then the server will send the data to other client.
Server: Servers are computers that runs operating system and hold data that
can be shared over a computer network.
Client: A client is a computer that is connected to other computers in the network
and can receive data sent by other computers.
Hub: Hub acts as a device that connects all the computer in a network to each
other. Any request that comes from a client computer first received by Hub and
then hub transmit this request over a network so that the correct server receives
and respond to it.
Router: Router joins multiple computer networks to each other. For example lets
say a company runs 100 computers over a local area network(LAN) and another
company runs another LAN of 150 computers. These both LANs can be
connected with each other through a internet connection which is provided by the
router.
LAN cable: A wire that is used to connect more than one computers or other
devices such as printers and scanner to each other.
Types of Topology
There are five types of topology in computer networks:
1. Mesh Topology
2. Star Topology
3. Bus Topology
4. Ring Topology
5. Hybrid Topology
Mesh Topology
In mesh topology each device is connected to every other device on the network
through a dedicated point-to-point link. When we say dedicated it means that the
link only carries data for the two connected devices only. Lets say we have n
devices in the network then each device must be connected with (n-1) devices of
the network. Number of links in a mesh topology of n devices would be n(n-1)/2.
Star Topology
In star topology each device in the network is connected to a central device
called hub. Unlike Mesh topology, star topology doesn’t allow direct
communication between devices, a device must have to communicate through
hub. If one device wants to send data to other device, it has to first send the data
to hub and then the hub transmit that data to the designated device.
In bus topology there is a main cable and all the devices are connected to this
main cable through drop lines. There is a device called tap that connects the
drop line to the main cable. Since all the data is transmitted over the main cable,
there is a limit of drop lines and the distance a main cable can have.
Ring Topology
In ring topology each device is connected with the two devices on either side of
it. There are two dedicated point to point links a device has with the devices on
the either side of it. This structure forms a ring thus it is known as ring topology. If
a device wants to send data to another device then it sends the data in one
direction, each device in ring topology has a repeater, if the received data is
intended for other device then repeater forwards this data until the intended
device receives it.
Hybrid topology
A combination of two or more topology is known as hybrid topology. For example
a combination of star and mesh topology is known as hybrid topology.
There are mainly three types of computer networks based on their size:
1. Local Area Network (LAN)
2. Metropolitan Area Network (MAN)
3. Wide area network (WAN)
Wide area network provides long distance transmission of data. The size of the
WAN is larger than LAN and MAN. A WAN can cover country, continent or even
a whole world. Internet connection is an example of WAN. Other examples of
WAN are mobile broadband connections such as 3G, 4G etc.
Advantages of WAN:
Centralized infrastructure: One of the main advantage of WAN is the that we do
not need to maintain the backup and store data on local system as everything is
stored online on a data centre, from where we can access the data through
WAN.
Privacy: We can setup the WAN in such a way that it encrypts the data that we
share online that way the data is secure and minimises the risk of unauthorized
access.
Increased Bandwidth: With the WAN we get to choose the bandwidth based on
the need, a large organization can have larger bandwidth that can carry large
amount of data faster and efficiently.
Area: A WAN can cover a large area or even a whole world though internet
connection thus we can connect with the person in another country through WAN
which is not possible is other type of computer networks.
Disadvantages of WAN:
Antivirus: Since our systems are connected with the large amount of systems,
there is possibility that we may unknowingly download the virus that can affect
our system and become threat to our privacy and may lead to data loss.
Expensive: Cost of installation is very high.
Issue resolution: Issue resolution takes time as the WAN covers large area, it is
really difficult to pin point the exact location where the issues raised and causing
the problem.
Interconnection of Networks:
We have read LAN, MAN and WAN above, we also talked about internet. You
can say that an internet is a combination of LAN, MAN and WAN.
1. Simplex
2. Half-Duplex
3. Full-Duplex
Simplex Mode
1. In simplex mode the data transmits in one direction only, from one system to
another system.
2. The sender device that sends data can only send data and cannot receive it.
On the other hand the receiver device can only receive the data and cannot send
it.
3. Television is an example of simplex mode transmission as the broadcast
sends signals to our TV but never receives signals back from our TV. This is a
unidirectional transmission.
Advantages of Simplex Mode:
The full capacity of the transmission medium is utilised as the transmission is one
way and cannot have traffic issues.
Half-Duplex Mode
1. In half duplex mode transmission can be done both ways which means if two
systems are connected with half-duplex mode of transmission, they both can
send and receive data but not at the same time.
2. If one device is sending data then other device cannot send data until it
receives the data which is already in transmission. You can say that the
communication is not simultaneous.
3. The radio communication device that our soldiers use at the battle fields are
the examples of half duplex mode transmission as they send message and then
say over and then the person on other hand send his message and this way they
communicate but not simultaneously like we used to do on mobile.
1. In full duplex mode both the connected devices can send and receive data
simultaneously. The mobile phone we use is an example of full duplex mode
where we can communicate simultaneously.
2. Both the devices can send and receive the data at the same time.
Before we discuss the computer network models, lets have a discussion on the
layers that a computer model consists. Lets have a basic idea of layers involved
in data communication.
Layers of a computer network models
1. The main purpose of having several layers in a computer network model is to
divide a process of sending and receiving data into small small tasks.
2. These layers are connected with each other, each layer provide certain data to
its immediate higher and immediate lower layer and receives certain data from
the same.
3. Dividing a model is layers makes the structure quite simple that makes it easy
to identify the issue if it occurs. There are three main components of a computer
network model. Sender, receiver and carrier.
At sender Side:
Higher layer: Higher layer serves the middle layer, directs the message (or data)
to middle layer
Middle layer: Middle layer picks up the data from higher layer and transfer it to
the lower layer
lower layer: The data is transmitted to the lower layer of the receiver side.
At receiver Side:
lower layer: Receives the data from the lower layer of sender side and transfer it
to middle layer.
Middle layer: Middle layer picks up the data from lower layer and transfer to
higher layer.
Higher layer: Higher layer transfers the data to the receiver.
4. We will discuss more than one computer models here, each model has
different set and design of layers.
In this guide, we will discuss OSI model in computer network and seven layers of
OSI model in detail.
1. OSI Model stands for Open System interconnection model.
2. OSI Model defines how data is transferred from one computer to another
computer.
3. In a very basic scenario two computers connected with a LAN and connectors
transfer data using the NIC. This forms a computer network, however if both the
system uses different operating systems, for example one system runs on
windows and other one runs on MacOS then how can data be transferred
between these two different systems, here comes the role of a OSI model which
is a seven layered model that defines how a data can be transferred between
different systems.
4. OSI model was introduced by International Organisation for standardisation
(ISO) in 1984.
5. There are seven layers in a OSI model
Application layer
Presentation Layer
Session layer
Transport layer
Network Layer
DataLink layer
Physical layer
Physical Layer
We now learned that a transport layer converts the data into segments, network
layer converts the segments into packets and data link layer converts the packets
into frames. A frame is nothing but a sequence of bits such as 1001011.
Physical layer converts these binary sequences into signals and transfer it
through a transmission media such as cables etc.
The signals generated by physical layer is based on the transmission media. For
example an electrical signal is generated if the media is copper cable, light signal
if media is optical fibre and radio signal in case of transmission media is air. This
generated signal is received by the physical layer at the receiver side and
converts it into bits.
Line coding:
A digital data is in form of binary sequence such as 1000111 (combination of 0s
and 1s). Line coding uses three schemes to represent these binary sequences in
form of signals that can be transferred.
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.
Network layer
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.
Transport layer
The main role of transport layer is to check the reliability of data communication.
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.
Session Layer
The main role of session layer is to setup and maintain the connection between
different systems.
Presentation Layer
Presentation layer receives the data from top most layer which is application
layer.
Application layer
1. Application layer is used by computer applications such as google chrome,
outlook, FireFox, Skype etc.
2. 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.
There are dozens of other protocol that forms the application layer, such as NFS,
FMTP, DHCP, SNMP, POP3, IRC, NNTP etc.
3. In short you can say that application layer provides the services to computer
applications with the help of protocols that are defined in it.
Internetworking protocol(IP):
1. It is an unreliable connectionless protocol used by TCP/IP Model.
2. This protocol is used for data transmission.
3. This protocol doesn’t do error checking or tracking of data, thus we cannot be
sure that the data is actually reached its destination. This is why it is also known
as best effort delivery service which means this protocol tries it best to send the
data to its destination but doesn’t take an guarantee.
4. IP protocol transmits the data in form of small packets known as datagrams.
Each of these datagrams are transmitted separately, thus they can take different
routes and sometime duplicate datagrams can be reached to destination, also
they are reached in no particular order at the destination.
ARP protocol is used to find the physical address of a device whose internet
address (IP address) is known.
3. Transport Layer
Transport layer in TCP/Model can be represented by three protocols:
Transmission control protocol (TCP), User data gram protocol (UDP) and Stream
Control Transmission Protocol (SCTP).
These three protocols in transport layer are responsible for delivery of messages
from one process to another. The SCTP protocol was later introduced to meet
the needs of newer applications.
2. It takes the data from upper layer of TCP/IP Model and adds following
information to the data:
a) Port Address – Source port address of 16 bits and destination port address of
16 bits added to the data so that it reaches to correct destination and displays the
correct source of data.
b) checksum error control – 16 bits of checksum data is added to the data
received from upper layer, this is used for error control.
c) length of data – Length defines the total bytes of data in datagram.
3. Although this protocol finds the error in the transmission of data, it doesn’t
specify the error which makes it hard to identify the actual error in transmission.
4. It also adds acknowledgement number to the segments to verify that the data
is actually reached its destination or not.
5. Unlike UDP which is unable to specify the exact error in transmission, this
protocol does error control and specifies the exact error which makes TCP a
reliable protocol.
4. Application Layer
1. This is the top most layer of TCP/IP model.
3. There are several protocols used by the application layer for user interaction
such as: HTTP, SNMP, SMTP, DNS, TELNET, FTP etc.
SMTP: SMTP stands for Simple mail transfer protocol. It is used for email
services, using this protocol a email containing data can be sent to another email
address.