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

EC 458 A - Computer Communication and Data Networks

(EC/ECC/EEE)
3L, 1T 3 Hours, 100 Marks

Computer Communication: Layered architecture of computer

communication networks. DNA, SNA and ISO-OSI models. Properties of

LANs, MANS and WANs. Physical level, data link and transport protocols.

Multiple access protocol organization. Routing techniques, flow and

congestion control in packet switched networks. Window scheme.

Network interconnection-bridges and routers. Dead lock avoidance.

Elements of queuing analysis. Introduction to network security.

Data Networks:. Structure and functions of network protocols. Data link

control procedures. Operation of HDLC, SDLC, BISYNC, X.25 and X.21

Protocols Elements of Polling, ALOHA, Reservation ALOHA, CSMA and

token ring. Characteristic features of LANs

Basics of Internet: Evolution; dialup, XDSL, ADSL, cable modem and

other access methods. IP address and domain


Sr No. Topic name Page No.

1 Basics of Computer Networking 1-2

2 OSI layers & Network topologies

3
4
5
6
7
Data Communication & basics of Computer Network

Data communications refers to the transmission of this digital data between two or
more computers and a computer network or data network is a telecommunications
network that allows computers to exchange data. The physical connection between
networked computing devices is established using either cable media or wireless
media. The best-known computer network is the Internet.
This tutorial should teach you basics of Data Communication and Computer Network
(DCN) and will also take you through various advance concepts related to Data
Communication and Computer Network.

Why to Learn Data Communication & Computer Network?

Network Basic Understanding


A system of interconnected computers and computerized peripherals such as printers
is called computer network. This interconnection among computers facilitates
information sharing among them. Computers may connect to each other by either
wired or wireless media.
Network Engineering
Networking engineering is a complicated task, which involves software, firmware, chip
level engineering, hardware, and electric pulses. To ease network engineering, the
whole networking concept is divided into multiple layers. Each layer is involved in
some particular task and is independent of all other layers. But as a whole, almost all
networking tasks depend on all of these layers. Layers share data between them and
they depend on each other only to take input and send output.
Internet
A network of networks is called an internetwork, or simply the internet. It is the
largest network in existence on this planet. The internet hugely connects all WANs
and it can have connection to LANs and Home networks. Internet uses TCP/IP
protocol suite and uses IP as its addressing protocol. Present day, Internet is widely
implemented using IPv4. Because of shortage of address spaces, it is gradually
migrating from IPv4 to IPv6.
Internet enables its users to share and access enormous amount of information
worldwide. It uses WWW, FTP, email services, audio and video streaming etc. At huge
level, internet works on Client-Server model. Internet uses very high speed backbone
of fiber optics. To inter-connect various continents, fibers are laid under sea known to
us as submarine communication cable.
Goals of Networks

Computer Network means an interconnection of autonomous (standalone)


computers for information exchange. The connecting media could be a copper wire,
optical fiber, microwave, or satellite.
Networking Elements – The computer network includes the following networking
elements:
1. At least two computers
2. Transmission medium either wired or wireless
3. Protocols or rules that govern the communication
4. Network software such as Network Operating System
Network Criteria:
The criteria that have to be met by a computer network are:
1. Performance – It is measured in terms of transit time and response time.
 Transit time is the time for a message to travel from one device to another
 Response time is the elapsed time between an inquiry and a response.
Performance is dependent on the following factors:
 The number of users
 Type of transmission medium
 Capability of connected network
 Efficiency of software
2. Reliability – It is measured in terms of
 Frequency of failure
 Recovery from failures
 Robustness during catastrophe
3. Security – It means protecting data from unauthorized access.
Goals of Computer Networks: The following are some important goals of
computer networks:
1. Resource Sharing –
Many organizations has a substantial number of computers in operations, which
are located apart. Ex. A group of office workers can share a common printer, fax,
modem, scanner, etc.

2. High Reliability –
If there are alternate sources of supply, all files could be replicated on two or
more machines. If one of them is not available, due to hardware failure, the other
copies could be used.

3. Inter-process Communication –
Network users, located geographically apart, may converse in an interactive
session through the network. In order to permit this, the network must provide
almost error-free communications.

4. Flexible access –
Files can be accessed from any computer in the network. The project can be
begun on one computer and finished on another. Other goals include
Distribution of processing functions, Centralized management, and allocation of
network resources, Compatibility of dissimilar equipment and software, Good
network performance, Scalability, Saving money, Access to remote information,
Person to person communication, etc.
Applications of Communication & Computer Network

Computer systems and peripherals are connected to form a network. They provide
numerous advantages:

 Resource sharing such as printers and storage  IP phones


devices  Video conferences
 Exchange of information by means of e-Mails and  Parallel computing
FTP  Instant messaging
 Information sharing by using Web or Internet
 Interaction with other users using dynamic web
pages

Basics of Computer Networking


Open system:
A system which is connected to the network and is ready for communication.

Closed system:
A system which is not connected to the network and can’t be communicated with.

Computer Network:

An interconnection of multiple devices, also known as hosts, that are connected using
multiple paths for the purpose of sending/receiving data or media. Computer
networks can also include multiple devices/mediums which help in the
communication between two different devices; these are known as Network
devices and include things such as routers, switches,hubs,andbridges.
Network Topology:
The layout arrangement of the different devices in a network. Common examples
include: Bus, Star, Mesh, Ring, and Daisy chain.

OSI:
OSI stands for Open Systems Interconnection. It is a reference model that specifies
standards for communications protocols and also the functionalities of each layer. The
OSI has been developed by the International Organization For Standardization and it
is 7 layer architecture. Each layer of OSI has different functions and each layer has to
follow different protocols.

The 7 layers are:-

1. physical layer
2. Data link layer
3. Network layer
4. Transport layer
5. Session layer
6. Presentation layer
7. Application layer

Protocol:
A protocol is the set of rules or algorithms which define the way how two entities can
communicate across the network and there exists different protocol defined at each
layer of the OSI model. Few of such protocols are TCP, IP, UDP, ARP, DHCP, FTP and
so on.

1. UNIQUE IDENTIFIERS OF NETWORK


Host name:
Each device in the network is associated with a unique device name known as
Hostname.
Type “hostname” in the command prompt(Administrator Mode) and press ‘Enter’,
this displays the hostname of your machine.

IP Address (Internet Protocol address):


Also known as the Logical Address, the IP Address is the network address of the
system across the network.
To identify each device in the world-wide-web, the Internet Assigned Numbers
Authority (IANA) assigns an IPV4 (Version 4) address as a unique identifier to each
device on the Internet.
The length of an IPv4 address is 32-bits, hence, we have 232 IP addresses available. The
length of an IPv6 address is 128-bits.
Type “ipconfig” in the command prompt and press ‘Enter’, this gives us the IP address of
the device.

MAC Address (Media Access Control address):


Also known as physical address, the MAC Address is the unique identifier of each host
and is associated with its NIC (Network Interface Card).
A MAC address is assigned to the NIC at the time of manufacturing.
The length of the MAC address is : 12-nibble/ 6 bytes/ 48 bits
Type “ipconfig/all” in the command prompt and press ‘Enter’, this gives us the MAC
address.

Port:
A port can be referred to as a logical channel through which data can be sent/received
to an application. Any host may have multiple applications running, and each of these
applications is identified using the port number on which they are running.
A port number is a 16-bit integer, hence, we have 216 ports available which are
categorized as shown below:
Port Types Range
Well known Ports 0 – 1023
Registered Ports 1024 – 49151
Ephemeral Ports 49152 – 65535
Number of ports: 65,536
Range: 0 – 65535
Type “netstat -a” in the command prompt and press ‘Enter’, this lists all the ports being
used.

Socket:
The unique combination of IP address and Port number together are termed as
Socket.

Other related concepts


DNS Server:
DNS stands for Domain Name system.
DNS is basically a server which translates web addresses or URLs (ex:
www.google.com) into their corresponding IP addresses. We don’t have to remember
all the IP addresses of each and every website.
The command ‘nslookup’ gives you the IP address of the domain you are looking for.
This also provides the information of our DNS Server.
ARP:
ARP stands for Address Resolution Protocol.
It is used to convert an IP address to its corresponding physical address(i.e., MAC
Address).
ARP is used by the Data Link Layer to identify the MAC address of the Receiver’s
machine.

RARP:
RARP stands for Reverse Address Resolution Protocol.
As the name suggests, it provides the IP address of the device given a physical address
as input. But RARP has become obsolete since the time DHCP has come into the
picture.
Layers of OSI Model
OSI stands for Open Systems Interconnection. It has been developed by ISO –
‘International Organization for Standardization‘, in the year 1984. It is a 7 layer
architecture with each layer having specific functionality to perform. All these 7 layers
work collaboratively to transmit the data from one person to another across the
globe.

1. Physical Layer (Layer 1) :

The lowest layer of the OSI reference model is the physical layer. It is responsible for
the actual physical connection between the devices. The physical layer contains
information in the form of bits. It is responsible for transmitting individual bits from
one node to the next. When receiving data, this layer will get the signal received and
convert it into 0s and 1s and send them to the Data Link layer, which will put the
frame back together.

The functions of the physical layer are as follows:


1. Bit synchronization: The physical layer provides the synchronization of the bits by
providing a clock. This clock controls both sender and receiver thus providing
synchronization at bit level.
2. Bit rate control: The Physical layer also defines the transmission rate i.e. the
number of bits sent per second.
3. Physical topologies: Physical layer specifies the way in which the different,
devices/nodes are arranged in a network i.e. bus, star, or mesh topology.
4. Transmission mode: Physical layer also defines the way in which the data flows
between the two connected devices. The various transmission modes possible are
Simplex, half-duplex and full-duplex.

Types of Network Topology


The arrangement of a network that comprises nodes and connecting lines via sender
and receiver is referred to as network topology. The various network topologies are:
Mesh Topology:
In a mesh topology, every device is connected to another device via a particular
channel. In Mesh Topology, the protocols used are AHCP (Ad Hoc Configuration
Protocols), DHCP (Dynamic Host Configuration Protocol), etc.

Figure : Every device is connected to another via dedicated channels. These


channels are known as links.

 Suppose, the N number of devices are connected with each other in a mesh
topology, the total number of ports that are required by each device is N-1. In
Figure 1, there are 5 devices connected to each other, hence the total number of
ports required by each device is 4. The total number of ports required=N*(N-1).
 Suppose, N number of devices are connected with each other in a mesh topology,
then the total number of dedicated links required to connect them is NC2 i.e.
N(N-1)/2. In Figure 1, there are 5 devices connected to each other, hence the total
number of links required is 5*4/2 = 10.

Advantages of this topology:


 Communication is very fast between the nodes.
 It is robust.
 The fault is diagnosed easily. Data is reliable because data is transferred among
the devices through dedicated channels or links.
 Provides security and privacy.
Problems with this topology:
 Installation and configuration are difficult.
 The cost of cables is high as bulk wiring is required, hence suitable for less
number of devices.
 The cost of maintenance is high.

Star Topology:
In star topology, all the devices are connected to a single hub through a cable. This
hub is the central node and all other nodes are connected to the central node. The
hub can be passive in nature i.e., not an intelligent hub such as broadcasting devices,
at the same time the hub can be intelligent known as an active hub. Active hubs have
repeaters in them. Coaxial cables or RJ-45 cables are used to connect the computers.
In Star Topology, many popular Ethernet LAN protocols are used as CD(Collision
Detection), CSMA (Carrier Sense Multiple Access), etc.

Figure 2: A star topology having four systems connected to a single point of


connection i.e. hub.

Advantages of this topology:


 If N devices are connected to each other in a star topology, then the number of
cables required to connect them is N. So, it is easy to set up.
 Each device requires only 1 port i.e. to connect to the hub, therefore the total
number of ports required is N.
 It is Robust. If one link fails only that link will affect and not other than that.
 Easy to fault identification and fault isolation.
 Star topology is cost-effective as it uses inexpensive coaxial cable.
Problems with this topology:
 If the concentrator (hub) on which the whole topology relies fails, the whole
system will crash down.
 The cost of installation is high.
 Performance is based on the single concentrator i.e. hub.
Bus Topology:
Bus topology is a network type in which every computer and network device is
connected to a single cable. It is bi-directional. It is a multi-point connection and a
non-robust topology because if the backbone fails the topology crashes. In Bus
Topology, various MAC (Media Access Control) protocols are followed by LAN
ethernet connections like TDMA, Pure Aloha, CDMA, Slotted Aloha, etc.

Figure: A bus topology with shared backbone cable. The nodes are connected to the
channel via drop lines.

Advantages of this topology:


 If N devices are connected to each other in a bus topology, then the number of
cables required to connect them is 1, known as backbone cable, and N drop lines
are required.
 Coaxial or twisted pair cables are mainly used in bus-based networks that support
up to 10 Mbps.
 The cost of the cable is less compared to other topologies, but it is used to build
small networks.
 Bus topology is familiar technology as installation and troubleshooting
techniques are well known.
Problems with this topology:
 A bus topology is quite simpler, but still, it requires a lot of cabling.
 If the common cable fails, then the whole system will crash down.
 If the network traffic is heavy, it increases collisions in the network. To avoid
this, various protocols are used in the MAC layer known as Pure Aloha, Slotted
Aloha, CSMA/CD, etc.
 Adding new devices to the network would slow down networks.
 Security is very low.
Ring Topology:
In this topology, it forms a ring connecting devices with exactly two neighbouring
devices.
A number of repeaters are used for Ring topology with a 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.
The data flows in one direction, i.e.., it is unidirectional, but it can be made
bidirectional by having 2 connections between each Network Node, it is called Dual
Ring Topology. In-Ring Topology, the Token Ring Passing protocol is used by the
workstations to transmit the data.

Figure : A ring topology comprises 4 stations connected with each forming a ring.
The most common access method of ring topology is token passing.
 Token passing: It is a network access method in which a token is passed from
one node to another node.
 Token: It is a frame that circulates around the network.
The following operations take place in ring topology are :
1. One station is known as a monitor station which takes all the responsibility for
performing the operations.
2. To transmit the data, the station has to hold the token. After the transmission is
done, the token is to be released for other stations to use.
3. When no station is transmitting the data, then the token will circulate in the
ring.
4. There are two types of token release techniques: Early token release releases
the token just after transmitting the data and Delayed token release releases
the token after the acknowledgment is received from the receiver.
Advantages of this topology:
 The data transmission is high-speed.
 The possibility of collision is minimum in this type of topology.
 Cheap to install and expand.
 It is less costly than a star topology.
Problems with this topology:
 The failure of a single node in the network can cause the entire network to fail.
 Troubleshooting is difficult in this topology.
 The addition of stations in between or the removal of stations can disturb the
whole topology.
 Less secure.

Tree Topology :
This topology is the variation of the Star topology. This topology has a hierarchical
flow of data. In Tree Topology, protocols like DHCP and SAC (Standard Automatic
Configuration ) are used.

Figure 5: In this, the various secondary hubs are connected to the central hub which
contains the repeater. This data flow from top to bottom i.e. from the central hub to
the secondary and then to the devices or from bottom to top i.e. devices to the
secondary hub and then to the central hub. It is a multi-point connection and a non-
robust topology because if the backbone fails the topology crashes.

Advantages of this topology :


 It allows more devices to be attached to a single central hub thus it decreases the
distance that is traveled by the signal to come to the devices.
 It allows the network to get isolated and also prioritize from different computers.
 We can add new devices to the existing network.
 Error detection and error correction are very easy in a tree topology.
Problems with this topology :
 If the central hub gets fails the entire system fails.
 The cost is high because of the cabling.
 If new devices are added, it becomes difficult to reconfigure.

Hybrid Topology :
This topological technology is the combination of all the various types of topologies
we have studied above. It is used when the nodes are free to take any form. It means
these can be individuals such as Ring or Star topology or can be a combination of
various types of topologies seen above. Each individual topology uses the protocol
that has been discussed earlier.
Figure 6: The above figure shows the structure of the Hybrid topology. As seen it
contains a combination of all different types of networks.

Advantages of this topology :


 This topology is very flexible.
 The size of the network can be easily expanded by adding new devices.
Problems with this topology :
 It is challenging to design the architecture of the Hybrid Network.
 Hubs used in this topology are very expensive.
 The infrastructure cost is very high as a hybrid network requires a lot of cabling
and network devices.

* Hub, Repeater, Modem, Cables are Physical Layer devices.


** Network Layer, Data Link Layer, and Physical Layer are also known as Lower
Layers or Hardware Layers.

2. Data Link Layer (DLL) (Layer 2) :

The data link layer is responsible for the node-to-node delivery of the message. The
main function of this layer is to make sure data transfer is error-free from one node to
another, over the physical layer. When a packet arrives in a network, it is the
responsibility of DLL to transmit it to the Host using its MAC address.
Data Link Layer is divided into two sublayers:

1. Logical Link Control (LLC)


2. Media Access Control (MAC)
The packet received from the Network layer is further divided into frames depending
on the frame size of NIC(Network Interface Card). DLL also encapsulates Sender and
Receiver’s MAC address in the header.

The Receiver’s MAC address is obtained by placing an ARP(Address Resolution


Protocol) request onto the wire asking “Who has that IP address?” and the destination
host will reply with its MAC address.

The functions of the Data Link layer are :

1. Framing: Framing is a function of the data link layer. It provides a way for a sender
to transmit a set of bits that are meaningful to the receiver. This can be
accomplished by attaching special bit patterns to the beginning and end of the
frame.
2. Physical addressing: After creating frames, the Data link layer adds physical
addresses (MAC address) of the sender and/or receiver in the header of each frame.
3. Error control: Data link layer provides the mechanism of error control in which it
detects and retransmits damaged or lost frames.
4. Flow Control: The data rate must be constant on both sides else the data may get
corrupted thus, flow control coordinates the amount of data that can be sent before
receiving acknowledgement.
5. Access control: When a single communication channel is shared by multiple
devices, the MAC sub-layer of the data link layer helps to determine which device
has control over the channel at a given time.

* Packet in Data Link layer is referred to as Frame.


** Data Link layer is handled by the NIC (Network Interface Card) and device drivers
of host machines.
*** Switch & Bridge are Data Link Layer devices.

3. Network Layer (Layer 3) :

The network layer works for the transmission of data from one host to the other
located in different networks. It also takes care of packet routing i.e. selection of the
shortest path to transmit the packet, from the number of routes available. The sender
& receiver’s IP addresses are placed in the header by the network layer.

The functions of the Network layer are :

1. Routing: The network layer protocols determine which route is suitable from
source to destination. This function of the network layer is known as routing.
2. Logical Addressing: In order to identify each device on internetwork uniquely, the
network layer defines an addressing scheme. The sender & receiver’s IP addresses
are placed in the header by the network layer. Such an address distinguishes each
device uniquely and universally.

* Segment in Network layer is referred to as Packet.

** Network layer is implemented by networking devices such as routers.

4. Transport Layer (Layer 4) :

The transport layer provides services to the application layer and takes services from
the network layer. The data in the transport layer is referred to as Segments. It is
responsible for the End to End Delivery of the complete message. The transport layer
also provides the acknowledgement of the successful data transmission and re-
transmits the data if an error is found.

At sender’s side: Transport layer receives the formatted data from the upper layers,
performs Segmentation, and also implements Flow & Error control to ensure
proper data transmission. It also adds Source and Destination port numbers in its
header and forwards the segmented data to the Network Layer.

Note: The sender needs to know the port number associated with the receiver’s
application.

Generally, this destination port number is configured, either by default or manually.


For example, when a web application makes a request to a web server, it typically uses
port number 80, because this is the default port assigned to web applications. Many
applications have default ports assigned.

At receiver’s side: Transport Layer reads the port number from its header and
forwards the Data which it has received to the respective application. It also performs
sequencing and reassembling of the segmented data.

The functions of the transport layer are as follows:

1. Segmentation and Reassembly: This layer accepts the message from the (session)
layer, and breaks the message into smaller units. Each of the segments produced has
a header associated with it. The transport layer at the destination station
reassembles the message.
2. Service Point Addressing: In order to deliver the message to the correct process,
the transport layer header includes a type of address called service point address or
port address. Thus by specifying this address, the transport layer makes sure that
the message is delivered to the correct process.

The services provided by the transport layer :

A. Connection-Oriented Service: It is a three-phase process that includes

– Connection Establishment
– Data Transfer
– Termination / disconnection

In this type of transmission, the receiving device sends an acknowledgement, back to


the source after a packet or group of packets is received. This type of transmission is
reliable and secure.

B. Connectionless service: It is a one-phase process and includes Data Transfer. In


this type of transmission, the receiver does not acknowledge receipt of a packet. This
approach allows for much faster communication between devices. Connection-
oriented service is more reliable than connectionless Service.

* Data in the Transport Layer is called as Segments.


** Transport layer is operated by the Operating System. It is a part of the OS and
communicates with the Application Layer by making system calls.
Transport Layer is called as Heart of OSI model.

5. Session Layer (Layer 5) :

This layer is responsible for the establishment of connection, maintenance of sessions,


authentication, and also ensures security.
The functions of the session layer are :

1. Session establishment, maintenance, and termination: The layer allows the


two processes to establish, use and terminate a connection.
2. Synchronization: This layer allows a process to add checkpoints which are
considered synchronization points into the data. These synchronization points help
to identify the error so that the data is re-synchronized properly, and ends of the
messages are not cut prematurely and data loss is avoided.
3. Dialog Controller: The session layer allows two systems to start communication
with each other in half-duplex or full-duplex.

**All the below 3 layers(including Session Layer) are integrated as a single layer in the
TCP/IP model as “Application Layer”.
**Implementation of these 3 layers is done by the network application itself. These are
also known as Upper Layers or Software Layers.

Scenario:
Let us consider a scenario where a user wants to send a message through some
Messenger application running in his browser. The “Messenger” here acts as the
application layer which provides the user with an interface to create the data. This
message or so-called Data is compressed, encrypted (if any secure data), and
converted into bits (0’s and 1’s) so that it can be transmitted.

6. Presentation Layer (Layer 6):

The presentation layer is also called the Translation layer. The data from the
application layer is extracted here and manipulated as per the required format to
transmit over the network.
The functions of the presentation layer are :

 Translation: For example, ASCII to EBCDIC.


 Encryption/ Decryption: Data encryption translates the data into another form or
code. The encrypted data is known as the ciphertext and the decrypted data is
known as plain text. A key value is used for encrypting as well as decrypting data.
 Compression: Reduces the number of bits that need to be transmitted on the
network.

7. Application Layer (Layer 7) :

At the very top of the OSI Reference Model stack of layers, we find the Application
layer which is implemented by the network applications. These applications produce
the data, which has to be transferred over the network. This layer also serves as a
window for the application services to access the network and for displaying the
received information to the user.

Example: Application – Browsers, Skype Messenger, etc.

**Application Layer is also called Desktop Layer.

The functions of the Application layer are :


1. Network Virtual Terminal
2. FTAM-File transfer access and management
3. Mail Services
4. Directory Services

OSI model acts as a reference model and is not implemented on the Internet because
of its late invention. The current model being used is the TCP/IP model.

OSI model in a nutshell

Sr. Type of Layer in Working or Responsibility information Devices


No OSI Model

1 Physical Establishing Physical connection Bits Hubs, Modem,


Layer between devices. cables,Repeaters
2 Data Link Node to Node delivery of Frame Switch, Bridge
Layer messages.
3 Network Transmission data from one Host Packet Router
Layer to other located in different
Network.
4 Transport Layer Take service from network layer Segment Firewall
Heart of OSI & provide it to Application Layer.
5 Session Establish connection , Message Gateway
Layer Maintenance, Authentication
and safety.
6 Presentation Data from application layer is Message
Layer extracted & manipulated.
7 Application Helps in identifying clients and Message Monitor
Layer synchronise communication.
TCP/IP Model
The OSI Model we just looked at is just a reference/logical model. It was
designed to describe the functions of the communication system by
dividing the communication procedure into smaller and simpler
components. But when we talk about the TCP/IP model, it was designed
and developed by the Department of Defense (DoD) in the 1960s and is
based on standard protocols. It stands for Transmission Control
Protocol/Internet Protocol. The TCP/IP model is a concise version of
the OSI model. It contains four layers, unlike the seven layers in the OSI
model.

The layers are:


1. Application Layer
2. Transport Layer(TCP/UDP)
3. Network/Internet Layer(IP)
4. Data Link Layer (MAC)
5. Physical Layer

The diagrammatic comparison of the TCP/IP and OSI model is as follows:

Layers in TCP/IP OSI Model


Application Application
Presentation
Transport Session
Transport
Network/Internet Network
Data-link Data-link
Physical Physical

1. Physical Layer:
It is a group of applications requiring network communications. This layer is
responsible for generating the data and requesting connections. It acts on behalf of
the sender and the Network Access layer on the behalf of the receiver. During this
article, we will be talking on the behalf of the receiver.

2. Data Link Layer:

The packet’s network protocol type, in this case TCP/IP, is identified by the data-link
layer. Error prevention and “framing” are also provided by the data-link layer. Point-
to-Point Protocol (PPP) framing and Ethernet IEEE 802.2 framing are two examples
of data-link layer protocols.
3. Internet Layer:
This layer parallels the functions of OSI’s Network layer. It defines the protocols
which are responsible for the logical transmission of data over the entire network.
The main protocols residing at this layer are as follows:
1. IP – stands for Internet Protocol and it is responsible for delivering packets from
the source host to the destination host by looking at the IP addresses in the
packet headers. IP has 2 versions: IPv4 and IPv6. IPv4 is the one that most
websites are using currently. But IPv6 is growing as the number of IPv4 addresses
are limited in number when compared to the number of users.
2. ICMP – stands for Internet Control Message Protocol. It is encapsulated within
IP datagrams and is responsible for providing hosts with information about
network problems.
3. ARP – stands for Address Resolution Protocol. Its job is to find the hardware
address of a host from a known IP address. ARP has several types: Reverse ARP,
Proxy ARP, Gratuitous ARP, and Inverse ARP.

The Internet Layer is a layer in the Internet Protocol (IP) suite, which is the set of
protocols that define the Internet. The Internet Layer is responsible for routing
packets of data from one device to another across a network. It does this by
assigning each device a unique IP address, which is used to identify the device and
determine the route that packets should take to reach it.
What is an IP Address?
All the computers of the world on the Internet network communicate with each
other with underground or underwater cables or wirelessly. If I want to download a
file from the internet or load a web page or literally do anything related to the
internet, my computer must have an address so that other computers can find and
locate mine in order to deliver that particular file or webpage that I am requesting.
In technical terms, that address is called IP Address or Internet Protocol Address.
Let us understand it with another example, like if someone wants to send you a mail
then he/she must have your home address. Similarly, your computer too needs an
address so that other computers on the internet can communicate with each other
without the confusion of delivering information to someone else’s computer. And
that is why each computer in this world has a unique IP Address. Or in other words,
an IP address is a unique address that is used to identify computers or nodes on the
internet. This address is just a string of numbers written in a certain format. It is
generally expressed in a set of numbers for example 192.155.12.1. Here each number in
the set is from 0 to 255 range. Or we can say that a full IP address ranges from 0.0.0.0
to 255.255.255.255. And these IP addresses are assigned by IANA(known as Internet
Corporation For Internet Assigned Numbers Authority).
But what is Internet protocol? This is just a set of rules that makes the internet work.
You are able to read this article because your computer or phone has a unique
address where the page that you requested (to read this article from GeeksforGeeks)
has been delivered successfully.
Working of IP addresses
The working of IP addresses is similar to other languages. It can also use some set of
rules to send information. Using these protocols we can easily send, and receive data
or files to the connected devices. There are several steps behind the scenes. Let us
look at them
 Your device directly requests your Internet Service Provider which then grants
your device access to the web.
 And an IP Address is assigned to your device from the given range available.
 Your internet activity goes through your service provider, and they route it back
to you, using your IP address.
 Your IP address can change. For example, turning your router on or off can
change your IP Address.
 When you are out from your home location your home IP address doesn’t
accompany you. It changes as you change the network of your device.

Types of IP Address

IP Address is of two types:


1. IPv4: Internet Protocol version 4. It consists of 4 numbers separated by the dots.
Each number can be from 0-255 in decimal numbers. But computers do not
understand decimal numbers, they instead change them to binary numbers which
are only 0 and 1. Therefore, in binary, this (0-255) range can be written as (00000000
– 11111111). Since each number N can be represented by a group of 8-digit binary digits.
So, a whole IPv4 binary address can be represented by 32-bits of binary digits. In
IPv4, a unique sequence of bits is assigned to a computer, so a total of (2^32) devices
approximately = 4,294,967,296 can be assigned with IPv4.
IPv4 can be written as:
189.123.123.90

Classes of IPv4 Address: There are around 4.3 billion IPv4 addresses and managing
all those addresses without any scheme is next to impossible. Let’s understand it
with a simple example. If you have to find a word from a language dictionary, how
long will it take? Usually, you will take less than 5 minutes to find that word. You are
able to do this because words in the dictionary are organized in alphabetical order. If
you have to find out the same word from a dictionary that doesn’t use any sequence
or order to organize the words, it will take an eternity to find the word. If a
dictionary with one billion words without order can be so disastrous, then you can
imagine the pain behind finding an address from 4.3 billion addresses. For easier
management and assignment IP addresses are organized in numeric order and
divided into the following 5 classes :

IP Class Address Range Maximum number of networks


Class A 0-127 127 (27-1)
Class B 128-191 16384
Class C 192-223 2097152
Class D 224-239 Reserve for multitasking
Class E 240-254 Reserved for Research and development
2. IPv6: But, there is a problem with the IPv4 address. With IPv4, we can connect
only the above number of 4 billion devices uniquely, and apparently, there are much
more devices in the world to be connected to the internet. So, gradually we are
making our way to IPv6 Address which is a 128-bit IP address. In human-friendly
form, IPv6 is written as a group of 8 hexadecimal numbers separated with colons(:).
But in the computer-friendly form, it can be written as 128 bits of 0s and 1s. Since, a
unique sequence of binary digits is given to computers, smartphones, and other
devices to be connected to the internet. So, via IPv6 a total of (2^128) devices can be
assigned with unique addresses which are actually more than enough for upcoming
future generations.
IPv6 can be written as:
2011:0bd9:75c5:0000:0000:6b3e:0170:8394

Classification of IP Address

An IP address is classified into the following types:


1. Public IP Address: This address is available publicly and it is assigned by your
network provider to your router, which further divides it to your devices. Public IP
Addresses are of two types,
 Dynamic IP Address: When you connect a smartphone or computer to the
internet, your Internet Service Provider provides you an IP Address from the
range of available IP Addresses. Now, your device has an IP Address and you can
simply connect your device to the Internet and send and receive data to and from
your device. The very next time when you try to connect to the internet with the
same device, your provider provides you with different IP Addresses to the same
device and also from the same available range. Since IP Address keeps on
changing every time when you connect to the internet, it is called a Dynamic IP
Address.
 Static IP Address: Static address never changes. They serve as a permanent
internet address. These are used by DNS servers. What are DNS servers? Actually,
these are computers that help you to open a website on your computer. Static IP
Address provides information such as device is located on which continent,
which country, which city, and which Internet Service Provider provides internet
connection to that particular device. Once, we know who is the ISP, we can trace
the location of the device connected to the internet. Static IP Addresses provide
less security than Dynamic IP Addresses because they are easier to track.
2. Private IP Address: This is an internal address of your device which are not
routed to the internet and no exchange of data can take place between a private
address and the internet.
3. Shared IP addresses: Many websites use shared IP addresses where the traffic is
not huge and very much controllable, they decide to rent it to other similar websites
so to make it cost-friendly. Several companies and email sending servers use the
same IP address (within a single mail server) to cut down the cost so that they could
save for the time the server is idle.
4. Dedicated IP addresses: A dedicated IP Address is an address used by a single
company or an individual which gives them certain benefits using a private Secure
Sockets Layer (SSL) certificate which is not in the case of a shared IP address. It
allows to access the website or log in via File Transfer Protocol (FTP) by IP address
instead of its domain name. It increases the performance of the website when the
traffic is high. It also protects from a shared IP address that is black-listed due to
spam.

Lookup IP addresses

To know your public IP, you can simply search “What is my IP?” on google. Other
websites will show you equivalent information: they will see your public IP address
because, by visiting the location, your router has made an invitation/request and
thus revealed the information. the location IP location goes further by showing the
name of your Internet Service Provider and your current city.
Finding your device’s private IP Address depends on the OS or platform you are
using.
 On Windows: Click Start and type “cmd” in the search box and run the
command prompt. In the black command prompt dialog box type “ipconfig” and
press enter. You will be able to see your IP Address there.
 On Mac: Go to system preferences and select Network, you will be able to see the
information regarding your network which includes your IP Address.

IP address security threats

Each IP address is associated with virtual ports in a computer that acts as a doorway
that allows web applications or websites to send and receive data or information on
your device. If after the connection is terminated the ports remain open somehow,
might allow hackers to get into your device. Once, a hacker gets access to your
device remotely through various tools and viruses, they would be able to access all
your stored files and data and your computer hardware as well, which includes your
webcam, mic, speaker, and all your browsing history, your emails and saved
passwords. These are some serious threats from which we need to be extra careful.
Various online activities can reveal your IP address from playing games or accepting
bad cookies from a trap website or commenting on a website or forum. Once, they
have your IP, there are websites that help them get a decent idea of your location.
They can further use social media websites to track your online presence and cross
verify everything that they got from these sites and use your information for their
benefits or can sell these data collected on the dark web which can further exploit
you.
The worst which I have seen in my friend’s pc got infected while he was installing an
application that he downloaded from a pirated website. The moment he hit install, a
number of command prompt boxes started appearing, tens of commands started
running and after a while, it was back to normal. Some malware was installed in the
process. After a few days, someone was trying to log in to his social media account
and other accounts using his computer as a host pc (his own IP address) but his
computer was idle. The hacker was using his pc and his network, i.e., his IP address
to do some serious stuff. He formatted his computer then and there, secured all his
emails and other accounts, and changed all the passwords and all the security
measures that had to be taken.
Cybercriminals use different techniques to get hands-on with your IP address and
know your location, get into your network and hack into your computers. For
instance, they will find you through Skype which uses IP addresses to speak. If you
are using these apps, it’s important to notice that your IP address might be
vulnerable. Attackers can use the various tools, where they will find your IP address.
Some of the threats are: Online stalking, downloading illegal content using your IP
address, tracking your location, directly attacking your network, and hacking into
your device.

Protect and hide IP address

To secure and hide your IP address from unwanted people always remember the
following points:
 Use a proxy server.
 Use a virtual private network (VPN) when using public Wi-Fi, you are traveling,
working remotely, or just want some privacy.
 Change privacy settings on instant messaging applications.
 Create unique passwords.
 Beware of phishing emails and malicious content.
 Use a good and paid antivirus application and keep it up to date.
 When you are using public wifi in a cafe or station or anywhere, you must hide
your IP address by using VPN. Getting your IP from public wifi is just a cakewalk
for these hackers and they are very good at stealing all your information while
using your computer’s address. There are different phishing techniques in which
they email you, call you, and SMS you about giving vital information about you.
They give links to vicious websites which are pre-rigged. The moment you open
these websites, they steal all your device’s information revealing all the
information about you and your device which are to be kept private. These leaks
help the hackers to exploit your device and install or download some spyware
and malware on your device. But using a good anti-virus gives you web security
as well, which will prevent those websites to launch and warn you about the
information being passed to these websites.
 It is also not recommended to use torrent or pirated websites which are a threat
to your online identity and can compromise your device or emails or any other
information about you.

Here is an example of a use case for the Internet Layer:


Imagine that you are using a computer to send an email to a friend. When you click
“send,” the email is broken down into smaller packets of data, which are then sent to
the Internet Layer for routing. The Internet Layer assigns an IP address to each
packet and uses routing tables to determine the best route for the packet to take to
reach its destination. The packet is then forwarded to the next hop on its route until
it reaches its destination. When all of the packets have been delivered, your friend’s
computer can reassemble them into the original email message.
In this example, the Internet Layer plays a crucial role in delivering the email from
your computer to your friend’s computer. It uses IP addresses and routing tables to
determine the best route for the packets to take, and it ensures that the packets are
delivered to the correct destination. Without the Internet Layer, it would not be
possible to send data across the Internet.
What is an Web Address?
The web address was developed by Sir Tim Berners-Lee and the URL working group
of IEFT (Internet Engineering Task Force) in the year 1994. It is a name that points to
the location of a particular web page in the internet world. It can be the address of
anything like the address of a particular file, directory, photo, video, etc. Every web
page on the internet has a unique web address, with the help of which the user
accesses those web pages. It is the same as the address of your house or school or any
place on this planet. Web Address is also known as URL i.e. uniform resource
locator. For example:

Here, https is the scheme, www.google,com is the domain name and in combination,
it is known as the web address of Google website.

Components of a web address

A web address is written in the following format:


Scheme://Domain name/Path/?Parameters#Anchor

Now we discuss each part in detail:


 Scheme: It is the protocol that is associated with every URL. It tells the browser
what type of address the user is trying to access so that the browser connects
correctly. Generally, http or https protocol is used to connect with the browser,
but other types of the protocol are also available like rtp, dns, chrome, etc.
 Domain name: A domain name is a text name that corresponds to the numeric
IP (Internet Protocol) address of the website, followed by the top-level domain
name(eg: .gov, .org, .com, etc). Domain names are used to make it easier for the
user to access a particular website. Basically, it tells which web server is being
requested. For example, the domain name to access google.com where .com is
the top-level domain name.

 Path: Path specifies the entire path to a particular web page that the user wants
to access. The user can define the entire path of the particular web page (if
he/she knows). If no path is specified and only the domain name is entered by
the user then the browser loads the default page, also known as the home page,
of the website from where the user can navigate to the desired web page.

 Parameters: Parameters are the query string that begins with a question mark(?)
after the Path. This is the list of key pairs separated by an ampersand(&) sign.
You must have seen it when you have searched for a query on Google or on
youtube or any platform. Each web browser has its own rules for passing the
parameters.

 For example,
https://www.google.com/search?q=gfg+login&rlz=1C1CHBD_enIN919IN919&… ,
here are the strings after the question mark(?) is the query string or the
parameters.
 Anchor: Anchors are like bookmarks it tell the browser which particular part of
a web page the user wants to access. They are written after the Parameters
and begin with a hashtag(#).

If we combine all the above parts of the web address then the web address looks like
this:

Types of Web Address

There are two types of web addresses:


 Absolute web address: An absolute web address is the web address that
contains the domain name and the entire address of the file/directory to which it
points. It is the web address that is normally seen in the address bar of the
browser and it can be accessed from anywhere in the world. It begins with the
protocols like “http”, “https”, “ftp” etc, and have the structure like:
Protocol://Domain name/Path
 Relative web address: Relative web address is the web address that can be
accessed only if you are on the home page or on any web page of the particular
website. It tells the web address is in relation to the current user location(hence
it is named Relative web address). Since it is assumed that the user is already
present on the website, a relative web address only contains the domain name
and the location, e.g.
<a href = "./google.html"

How to use a Web Address?

Web addresses can be accessed in 4 simple steps:


Step 1: Go to your web browser.
Step 2: Type the website name in the address bar, or you can type the entire web
address of the web page you want to access(if you know the entire web address).
Step 3: Press Enter.
Step 4: This will take you to the home page of the respective website. You can navigate
to the desired web page from the home page of the website.

Example:
Let’s say we want to access the Google website so the above steps can be followed as:
 Open the Chrome browser (or any browser which you use).

4. Transport Layer:

The TCP/IP transport layer protocols exchange data receipt acknowledgments and
retransmit missing packets to ensure that packets arrive in order and without error.
End-to-end communication is referred to as such. Transmission Control Protocol
(TCP) and User Datagram Protocol are transport layer protocols at this level (UDP).
 TCP: Applications can interact with one another using TCP as though they were
physically connected by a circuit. TCP transmits data in a way that resembles
character-by-character transmission rather than separate packets. A starting
point that establishes the connection, the whole transmission in byte order, and
an ending point that closes the connection make up this transmission.
 UDP: The datagram delivery service is provided by UDP, the other transport
layer protocol. Connections between receiving and sending hosts are not verified
by UDP. Applications that transport little amounts of data use UDP rather than
TCP because it eliminates the processes of establishing and validating
connections.

5. Application Layer:

This layer is analogous to the transport layer of the OSI model. It is responsible for
end-to-end communication and error-free delivery of data. It shields the upper-layer
applications from the complexities of data. The two main protocols present in this
layer are:
1. Transmission Control Protocol (TCP) – It is known to provide reliable and
error-free communication between end systems. It performs sequencing and
segmentation of data. It also has an acknowledgment feature and controls the
flow of the data through a flow control mechanism. It is a very effective protocol
but has a lot of overhead due to such features. Increased overhead leads to
increased costs.
2. User Datagram Protocol (UDP) – On the other hand does not provide any such
features. It is the go-to protocol if your application does not require reliable
transport as it is very cost-effective. Unlike TCP, which is a connection-oriented
protocol, UDP is connectionless.
1. HTTP and HTTPS – HTTP stands for Hypertext transfer protocol. It is used
by the World Wide Web to manage communications between web browsers
and servers. HTTPS stands for HTTP-Secure. It is a combination of HTTP with
SSL(Secure Socket Layer). It is efficient in cases where the browser need to fill
out forms, sign in, authenticate and carry out bank transactions.
2. SSH – SSH stands for Secure Shell. It is a terminal emulations software similar
to Telnet. The reason SSH is more preferred is because of its ability to
maintain the encrypted connection. It sets up a secure session over a TCP/IP
connection.
3. NTP – NTP stands for Network Time Protocol. It is used to synchronize the
clocks on our computer to one standard time source. It is very useful in
situations like bank transactions. Assume the following situation without the
presence of NTP. Suppose you carry out a transaction, where your computer
reads the time at 2:30 PM while the server records it at 2:28 PM. The server
can crash very badly if it’s out of sync.
The host-to-host layer is a layer in the OSI (Open Systems Interconnection) model
that is responsible for providing communication between hosts (computers or other
devices) on a network. It is also known as the transport layer.
Some common use cases for the host-to-host layer include:
1. Reliable data transfer: The host-to-host layer ensures that data is transferred
reliably between hosts by using techniques like error correction and flow control.
For example, if a packet of data is lost during transmission, the host-to-host layer
can request that the packet be retransmitted to ensure that all data is received
correctly.
2. Segmentation and reassembly: The host-to-host layer is responsible for breaking
up large blocks of data into smaller segments that can be transmitted over the
network, and then reassembling the data at the destination. This allows data to
be transmitted more efficiently and helps to avoid overloading the network.
3. Multiplexing and demultiplexing: The host-to-host layer is responsible for
multiplexing data from multiple sources onto a single network connection, and
then demultiplexing the data at the destination. This allows multiple devices to
share the same network connection and helps to improve the utilization of the
network.
4. End-to-end communication: The host-to-host layer provides a connection-
oriented service that allows hosts to communicate with each other end-to-end,
without the need for intermediate devices to be involved in the communication.
For example:
Consider a network with two hosts, A and B. Host A wants to send a file to host B.
The host-to-host layer in host A will break the file into smaller segments, add error
correction and flow control information, and then transmit the segments over the
network to host B. The host-to-host layer in host B will receive the segments, check
for errors, and reassemble the file. Once the file has been transferred successfully,
the host-to-host layer in host B will acknowledge receipt of the file to host A.
In this example, the host-to-host layer is responsible for providing a reliable
connection between host A and host B, breaking the file into smaller segments, and
reassembling the segments at the destination. It is also responsible for multiplexing
and demultiplexing the data and providing end-to-end communication between the
two hosts.
Conclusion:

Layer Number Layer Name Protocol Protocol Data-unit Addressing


5(innermost) Application HTTP, SMTP Messages n/a
4 Transport TCP/UDP Segments Ports
3 Network IP Packets IP Address
2 Data-link Ethernet/Wifi Frames MAC Address
1(outermost) Physical 10 Base Bits n/a

Lastly, connection-oriented layers let us see the differences between TCP/IP and OSI
Models in a tabular format that are as follows: follows connectionless.
TCP/IP OSI
TCP refers to Transmission Control OSI refers to Open Systems Interconnection.
Protocol.
TCP/IP has 5 layers. OSI has 7 layers.
TCP/IP is more reliable OSI is less reliable
TCP/IP does not have very strict OSI has strict boundaries
boundaries.
TCP/IP follows connection-less a OSI follows a vertical approach.
horizontal approach.
TCP/IP uses both session and OSI uses different session and presentation
presentation layer in the layers.
application layer itself.
TCP/IP developed protocols then OSI developed model then protocol.
model.
Transport layer in TCP/IP does not In OSI model, transport layer provides
provide assurance delivery of assurance delivery of packets.
packets.
TCP/IP model network layer only Connection less and connection-oriented both
provides connection less services. services are provided by the network layer in the
OSI model.
Protocols cannot be replaced easily While in OSI model, Protocols are better
in TCP/IP model. covered and is easy to replace with the change
in technology.

Network Protocols:

Network Protocols refer to the rules and standards that govern the communication
between devices on a network.
Types of Network Protocols :
There are several different types of Network Protocols, including TCP/IP, UDP, FTP,
HTTP, SMTP, and DNS.
1. TCP/IP (Transmission Control Protocol/Internet Protocol) is the most widely
used protocol on the internet. It is a set of rules and standards that govern the
transfer of data between devices on a network.
2. UDP (User Datagram Protocol) is a simpler protocol than TCP/IP, and it is used
for streaming video and audio, gaming, and other applications where low latency
is more important than reliability.
3. FTP (File Transfer Protocol) is a protocol that is used to transfer files between
devices on a network.
4. HTTP (Hypertext Transfer Protocol) is a protocol that is used to transfer files
between devices on a network
5. SMTP (Simple Mail Transfer Protocol) is a protocol that is used to transfer email
between devices on a network.
6. DNS (Domain Name System) is a protocol that is used to translate domain names
into IP addresses.

Differences between Network Topology and Network Protocols:

Network Topology Network Protocols

Rules and standards that govern the


Physical and logical arrangement of communication between devices on a
devices on a network network

Determines how data is transmitted Determines how data is formatted and


between devices processed

Examples include Bus, Star, Ring, Examples include TCP/IP, UDP, FTP, HTTP,
Mesh, and Tree SMTP, and DNS

Can affect the overall performance Can affect the overall performance and
and security of a network security of a network

Works together with Network


Protocols to create a functional Works together with Network Topology to
network create a functional network

Conclusion:
In conclusion, Network Topology and Network Protocols are closely related but
distinct concepts in the field of computer networking. Network Topology refers to
the physical and logical arrangement of devices on a network, while Network
Protocols refer to the rules and standards that govern the communication between
devices on a network. Understanding the difference between these two concepts is
essential for designing, implementing, and maintaining a functional and efficient
network. The appropriate Network Topology and Network Protocols for a network
will depend on the specific requirements of the network.
It is important to note that Network Topology and Network Protocols work together
to create a functional network. A well-designed Network Topology can improve the
overall performance and security of a network, but it is the Network Protocols that
enable devices to communicate with one another. Similarly, a well-designed Network
Protocol can improve the overall performance and security of a network, but it is the
Network Topology that determines how data is transmitted between devices.

You might also like