Module-4
Module-4
Internetworking
Internetworking is the practice of interconnecting multiple computer networks, such that
any pair of hosts in the connected networks can exchange messages irrespective of their
hardware-level networking technology.
Datagram
Datagram is a segment of data sent over a packet-switched network. A datagram contains
enough information to be routed from its source to its destination. By this definition, an IP
packet is one example of a datagram. Essentially, datagram is an alternative term for packet.
It used at transport layer.
Eg: packet
Datagram is an alternative term for packet.
Virtual Circuit Network
Virtual Circuits are also known as connection-oriented switching. Virtual circuit switching
establishes a predetermined path before messages are sent. In contrast, a datagram is a
packet-switching technique in which each packet, known as a datagram, is treated as a
separate entity.
1
2. It provides only connection-oriented service.
3. Always a new connection set up is required for transmission.
Routing Algorithm
Routing
It refers to the process of directing a data packet from one node to another.
Router is a network device which performs routing functions
It transmits data from one location to another across a network (Network type could
be any like LAN, WAN, or MAN).
The process of routing involves making various routing decisions to ensure reliable &
efficient delivery of the data packet by finding the shortest path using various routing
metrics
Routing of a data packet is done by analysing the destination IP Address of the packet.
Routing of packets
Source Node (Sender) sends the data packet on the network, embedding the IP in
the header of data packet.
The nearest router receives the data packet, and based on some metrics, further
routes the data packet to other routers.
There are limits to how many hop counts a packet can do if its exceeded, the packet
is considered to be lost.
Routes are stored in a logical data structure called – ‘Routing Table‘
Types of Routing
Routing is typically of 3 types, each serving their own purpose and offering different
functionalities.
2
1. Static Routing (Non- adaptive Routing)
Static routing is also called as “non-adaptive routing”.
In this, routing configuration is done manually by the network administrator.
Let’s say for example, we have 5 different routes to transmit data from one node to
another, so the network administrator will have to manually enter the routing
information by assessing all the routes.
Network administrator has full control over the network, routing the data packets to
their concerned destinations
Routers will route packets to the destination configured manually the network
administrator.
It may not be suitable for large scale enterprise networks.
2. Dynamic Routing (Adaptive Routing)
Dynamic Routing is another type of routing in which routing is an automatic
procedure without any human intervention.
Packets are transmitted over a network using various shortest path algorithms and
pre-determined metrics.
This type of routing is majorly preferred in modern networks as it offers more
flexibility and versatile functionality.
It is also known as adaptive routing.
In this, the router adds a new route to the routing table based on any changes made
in the topology of the network.
The autonomous procedure of routing helps in automating every routing operation
from adding to removing a route upon updates or any changes made to the network.
The three popular types of adaptive routing algorithms are shown in the following diagram −
3
Centralized algorithm − In centralized routing, one centralized node has the total
network information and takes the routing decisions. It finds the least-cost path
between source and destination nodes by using global knowledge about the
network. So, it is also known as global routing algorithm. The advantage of this
routing is that only the central node is required to store network information and
so the resource requirement of the other nodes may be less. However, routing
performance is too much dependent upon the central node. An example of
centralized routing is link state routing algorithm.
Isolated algorithm − In this algorithm, the nodes make the routing decisions based
upon local information available to them instead of gathering information from
other nodes. They do not have information regarding the link status. While this helps
in fast decision making, the nodes may transmit data packets along congested
network resulting in delay. The examples of isolated routing are hot potato routing
and backward learning.
Distributed algorithm − This is a decentralized algorithm where each node receives
information from its neighbouring nodes and takes the decision based upon the
received information. The least-cost path between source and destination is
computed iteratively in a distributed manner. An advantage is that each node can
dynamically change routing decisions based upon the changes in the network.
However, on the flip side, delays may be introduced due to time required to gather
information. Example of distributed algorithm is distance vector routing algorithm.
3. Default Routing
In which, a router is configured to transmit packets to a default route.
It is commonly used when the network has single exit point.
The IP Router has the following address as the default route : 0.0.0.0/0.
Working Principle of Routing
Routing works by finding a shortest path from the source node to the destination node
across a network. Here’s step-by-step working of routing:
Step1: Communication initiation
The first step that typically happens is, one node (client or server) initiates a communication
across a network using HTTP protocols.
Step2: Data Packets
The source device now breaks a big chunk of information into small data packets for reliable
and efficient transmission. This process is called is called de-assembling and encapsulating
the data payload. And then each data packet is labelled with the destination node’s IP
address.
4
Step3: Routing Table
Routing table is a logical data structure used to store the IP addresses and relevant
information regarding the nearest routers. The source node then looks up for the IP
addresses of all the nodes that can transmit the packet to its destination and selects the
shortest path using the shortest path algorithm and then routes accordingly.
Routing Table is stored in a router, a network device that determines the shortest path and
routes the data packet.
Step4: Hopping procedure
In the procedure or routing, the data packet will undergo many hops across various different
nodes in a network till it reaches its final destination node. Hop-count is defined as the
number of nodes required to traverse through to finally reach the intended destination
node.
Step5: Reaching the destination node
Once all the data packets reach their intended destination node, they re-assemble and
transform into complete information that was sent by the sender (source node). The
receiver will perform various error checking mechanism to verify the authenticity of the data
packets.
Overall, the data packet will be transmitted over least hop-count path as well as the path on
which there is less traffic to prevent packet loss.
5
The shortest path is highlighted in red, the path with least hop-count. As we can see, there
are multiple paths from source to node but if all the appropriate metrics are satisfied, the
data packets will be transmitted through the shortest path (highlighted in red).
Flooding − In flooding, when a data packet arrives at a router, it is sent to all the
outgoing links except the one it has arrived on. Flooding may be of three types−
o Uncontrolled flooding − Here, each router unconditionally transmits the
incoming data packets to all its neighbours.
o Controlled flooding − They use some methods to control the transmission of
packets to the neighbouring nodes. The two popular algorithms for controlled
flooding are Sequence Number Controlled Flooding (SNCF) and Reverse Path
Forwarding (RPF).
o Selective flooding − Here, the routers don't transmit the incoming packets
only along those paths which are heading towards approximately in the right
direction, instead of every available paths.
Random walks (RW) − This is a probabilistic algorithm where a data packet is sent by
a router to any one of its neighbours randomly. The transmission path thereby
formed is a random walk. RW can explore the alternative routes very efficiently. RW
is very simple to implement, requires small memory footprints, does not topology
information of the network and has inherent load balancing property. RW is suitable
for very small devices and for dynamic networks.
6
Difference between Static Routing and Dynamic Routing
The following table highlights the major differences between Static Routing and Dynamic
Routing.
Static routing may not follow any Dynamic routing follows protocols like
Protocols
specific protocol. BGP, RIP and EIGRP.
Additional Static routing does not require Dynamic routing requires additional
Resources any additional resources. resources like memory, bandwidth etc.
7
Intermediate hops
8
Consider router X , X will share it routing table to neighbors and neighbors will share it
routing table to it to X and distance from node X to destination will be calculated using
bellmen- ford equation.
As we can see that distance will be less going from X to Z when Y is intermediate node(hop)
so it will be update in routing table X.
9
Similarly for Z also –
Steps:
1. Full fill local routing table of each router
2. Each router should aware about other nodes
3. Share the distance vector with neighbours (not entire routing table)
4. Each router will get other’s distance vector table
5. Update routing table (removes previous distance) of each routers based on
distance vector table.
10
Finally the routing table for all –
11
learn the entire network topology. Based on this learned topology, each router is then able
to compute its routing table by using the shortest path computation.
Link state routing is a technique in which each router shares the knowledge of its
neighborhood with every other router i.e. the internet work.
The three keys to understand the link state routing algorithm.
1. Knowledge about the neighborhood: Instead of sending its routing table, a router
sends the information about its neighborhood only. A router broadcast its identities
and cost of the directly attached links to other routers.
2. Flooding: Each router sends the information to every other router on the
internetwork except its neighbors. This process is known as flooding. Every router
that receives the packet sends the copies to all the neighbors. Finally each and every
router receives a copy of the same information.
3. Information Sharing: A router send the information to every other router only when
the change occurs in the information.
Link state routing has two phase:
1. Reliable Flooding: Initial state– Each node knows the cost of its neighbors. Final
state- Each node knows the entire graph.
2. Route Calculation: Each node uses Dijkstra’ s algorithm on the graph to calculate the
optimal routes to all nodes. The link state routing algorithm is also known as
Dijkstra’s algorithm which is used to find the shortest path from one node to every
other node in the network.
Features of Link State Routing Protocols
Link State Packet: A small packet that contains routing information.
Link-State Database: A collection of information gathered from the link-state packet.
Shortest Path First Algorithm (Dijkstra algorithm): A calculation performed on the
database results in the shortest path
Routing Table: A list of known paths and interfaces.
Calculation of Shortest Path
To find the shortest path, each node needs to run the famous Dijkstra algorithm.
To understand the Dijkstra Algorithm, let’s take a graph and find the shortest path from the
source to all nodes.
Example
12
Shortest Path Calculation – Step 1
STEPS
1. Check each link are up/ down by sending messages to all neighbouring
nodes.
2. create link state table for each router
3. create a packet and flood these packets to the entire network.
4. After flooding, find out the shortest path using Dijikstra Algorithm.
5. Create routing table for each routers based on shortest path.
Tunneling
13
A technique of inter-networking called Tunneling is used when source and destination
networks of the same type are to be connected through a network of different types.
Tunneling uses a layered protocol model such as those of the OSI or TCP/IP protocol suite.
So, in other words, when data moves from host A to B it covers all the different levels of the
specified protocol (OSI, TCP/IP, etc.) while moving between different levels, data conversion
(Encapsulation) to suit different interfaces of the particular layer is called tunneling.
The task is sent on an IP packet from host A of Ethernet-1 to host B of Ethernet-2 via a WAN.
Steps
Host A constructs a packet that contains the IP address of Host B.
It then inserts this IP packet into an Ethernet frame and this frame is addressed to
the multiprotocol router M1
Host A then puts this frame on Ethernet.
When M1 receives this frame, it removes the IP packet, inserts it in the payload
packet of the WAN network layer packet, and addresses the WAN packet to M2. The
multiprotocol router M2 removes the IP packet and sends it to host B in an Ethernet
frame.
Types of Tunneling Protocols
1. Generic Routing Encapsulation (GRE)
Generic Routing Encapsulation is a method of encapsulation of IP packets in a GRE header
that hides the original IP packet.
GRE header act as a new IP header with a Delivery header containing a new source and
destination address. Only routers between which GRE is configured can decrypt and encrypt
the GRE header. The original IP packet enters a router, travels in encrypted form, and
emerges out of another GRE-configured router as the original IP packet as they have traveled
through a tunnel. Hence, this process is called GRE tunneling.
14
2. Internet Protocol Security (IPsec)
IP security (IPSec) is a protocols that provide data authentication, integrity, and
confidentiality. It also defines the encrypted, decrypted, and authenticated packets. The
protocols needed for secure key exchange and key management are defined in it.
3. IP-in-IP
IP-in-IP is a Tunneling Protocol for encapsulating IP packets inside another IP packet.
4. Secure Shell (SSH)
SSH(Secure Shell) is an access credential that is used in the SSH Protocol. In other words, it is
a cryptographic network protocol that is used for transferring encrypted data over the
network. It allows you to connect to a server, or multiple servers, without having to
remember or enter your password for each system which is to log in remotely from one
system to another.
5. Point-to-Point Tunneling Protocol (PPTP)
PPTP or Point-to-Point Tunneling Protocol generates a tunnel and confines the data packet.
Point-to-Point Protocol (PPP) is used to encrypt the data between the connection. PPTP is
one of the most widely used VPN protocols and has been in use since the early release of
Windows. PPTP is also used on Mac and Linux apart from Windows.
Packet Fragmentation
Fragmentation is an important function of network layer. It is technique in which
gateways break up or divide larger packets into smaller ones called fragments.
Each fragment is then sent as a separate internal packet. Each fragment has its separate
header and trailer.
15
Sometimes, a fragmented datagram can also get fragmented further when it encounters
a network that handles smaller fragments.
A datagram can be fragmented several times before it reaches final destination. Reverse
process of the fragmentation is difficult.
Reassembling of fragments is usually done by the destination host because each
fragment has become an independent datagram.
Types of fragmentation
1. Transparent fragmentation
This fragmentation is done by one network is made transparent to all other subsequent
networks through which packet will pass.
Whenever a large packet arrives at a gateway, it breaks the packet into smaller fragments
as shown in the following figure i.e the gateway G1 breaks a packet into smaller
fragments.
16
2. Non-transparent fragmentation
This fragmentation is done by one network is non-transparent to the subsequent
networks through which a packet passes.
Packet fragmented by a gateway of a network is not recombined by exit gateway of same
network.
Once a packet is fragmented, each fragment is treated as original packet. All fragments of
a packet are passed through exit gateway and recombination of these fragments is done
at the destination host.
Advantages of Non-Transparent Fragmentation
We can use multiple exit gateways and can improve the network performance.
It has a higher throughput.
Disadvantages of Non-Transparent Fragmentation
Every host has capability of reassembling fragments.
When a packet is fragmented, fragments should be numbered in such a way
that the original data stream can be reconstructed.
Total overhead increases due to fragmentation as each fragment must have its
own header.
IP stands for internet protocol. It is a protocol defined in the TCP/IP model used for sending
the packets from source to destination.
The main task of IP is to deliver the packets from source to the destination based on the IP
addresses available in the packet headers.
IP defines the packet structure that hides the data which is to be delivered as well as the
addressing method that labels the datagram with a source and destination information.
The first version of IP (Internet Protocol) was IPv4. After IPv4, IPv6 came into the market.
17
Function
routing the data from source to the destination across one or more IP networks.
What is an IP packet?
Before an IP packet is sent over the network, two major components are added in an IP
packet, i.e., header and a payload.
o Source IP address: The source is the one who is sending the data.
o Destination IP address: The destination is a host that receives the data from the
sender.
o Header length
o Packet length
o TTL (Time to Live): The number of hops occurs before the packet gets discarded.
o Transport protocol: The transport protocol used by the internet protocol, either it
can be TCP or UDP.
IP Addressing
18
An IP address is a unique identifier assigned to the computer which is connected to the
internet. Each IP address consists of a series of characters like 192.168.1.2. Users cannot
access the domain name of each website with the help of these characters, so DNS resolvers
are used that convert the human-readable domain names into a series of characters. Each IP
packet contains two addresses, i.e., the IP address of the device, which is sending the
packet, and the IP address of the device which is receiving the packet.
Types of IP addresses
o Public address
o Private address
Public address
The public address is also known as an external address as they are grouped under the WAN
addresses. We can also define the public address as a way to communicate outside the
network. This address is used to access the internet. The public address available on our
computer provides the remote access to our computer. With the help of a public address,
we can set up the home server to access the internet. This address is generally assigned by
the ISP (Internet Service Provider).
o The scope of the public address is global, which means that we can communicate
outside the network.
o This address is assigned by the ISP (Internet Service Provider).
o It is not available at free of cost.
o We can get the Public IP by typing on Google "What is my IP".
Private address
A private address is also known as an internal address, as it is grouped under the LAN
addresses. It is used to communicate within the network. These addresses are not routed on
the internet so that no traffic can come from the internet to this private address. The
private addresses are assigned to mainly those computers, printers, smartphones, which are
kept inside the home or the computers that are kept within the organization.
If the computer is assigned with a private address, then the devices available within the
local network can view the computer through the private ip address. However, the devices
available outside the local network cannot view the computer through the private IP
address, but they can access the computer if they know the router's public address.
19
Key points related to private address are:
IP addresses
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.
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.
Types of IP Address
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
20
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.
189.123.123.90
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 :
21
A loopback address is a distinct reserved IP address range that starts from 127.0.0.0 ends
at 127.255.255.255 though 127.255.255.255 is the broadcast address for 127.0.0.0/8. The
loopback addresses are built into the IP domain system, enabling devices to transmit and
receive the data packets. The loopback address 127.0.0.1 is generally known as localhost.
HLEN: IP header length (4 bits), which is the number of 32 bit words in the header. The
minimum value for this field is 5 and the maximum is 15.
Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and
the maximum is 65,535 bytes.
Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more
fragments flag (same order)
Fragment Offset: Represents the number of Data Bytes ahead of the particular fragment in
the particular Datagram. Specified in terms of number of 8 bytes, which has the maximum
value of 65,528 bytes.
22
Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the
network by restricting the number of Hops taken by a Packet before delivering to the
Destination.
Header Checksum: 16 bits header checksum for checking errors in the datagram header
Option: Optional information such as source route, record route. Used by the Network
administrator to check whether a path is working or not.
2. IPv6
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.
2011:0bd9:75c5:0000:0000:6b3e:0170:8394
23
IPv6 Packet structure
Version (4-bits): Indicates version of Internet Protocol which contains bit sequence 0110.
Traffic Class (8-bits): The Traffic Class field indicates class or priority of IPv6 packet which is
similar to Service Field in IPv4 packet. It helps routers to handle the traffic based on the
priority of the packet. If congestion occurs on the router then packets with the least priority
will be discarded.
As of now, only 4-bits are being used (and the remaining bits are under research), in which 0
to 7 are assigned to Congestion controlled traffic and 8 to 15 are assigned to Uncontrolled
traffic.
Flow Label (20-bits): Flow Label field is used by a source to label the packets belonging to
the same flow in order to request special handling by intermediate IPv6 routers, such as
non-default quality of service or real-time service. In order to distinguish the flow, an
intermediate router can use the source address, a destination address, and flow label of the
packets. Between a source and destination, multiple flows may exist because many
processes might be running at the same time. Routers or Host that does not support the
functionality of flow label field and for default router handling, flow label field is set to 0.
While setting up the flow label, the source is also supposed to specify the lifetime of the
flow.
24
Payload Length (16-bits): It is a 16-bit (unsigned integer) field, indicates the total size of the
payload which tells routers about the amount of information a particular packet contains in
its payload. The payload Length field includes extension headers(if any) and an upper-layer
packet. In case the length of the payload is greater than 65,535 bytes (payload up to 65,535
bytes can be indicated with 16-bits), then the payload length field will be set to 0 and the
jumbo payload option is used in the Hop-by-Hop options extension header.
Next Header (8-bits): Next Header indicates the type of extension header(if present)
immediately following the IPv6 header. Whereas In some cases it indicates the protocols
contained within upper-layer packets, such as TCP, UDP.
Hop Limit (8-bits): Hop Limit field is the same as TTL in IPv4 packets. It indicates the
maximum number of intermediate nodes IPv6 packet is allowed to travel. Its value gets
decremented by one, by each node that forwards the packet and the packet is discarded if
the value decrements to 0. This is used to discard the packets that are stuck in an infinite
loop because of some routing error.
Source Address (128-bits): Source Address is the 128-bit IPv6 address of the original source
of the packet.
Destination Address (128-bits): The destination Address field indicates the IPv6 address of
the final destination(in most cases). All the intermediate nodes can use this information in
order to correctly route the packet.
Extension Headers: In order to rectify the limitations of the IPv4 Option Field, Extension
Headers are introduced in IP version 6. The extension header mechanism is a very important
part of the IPv6 architecture. The next Header field of IPv6 fixed header points to the first
Extension Header and this first extension header points to the second extension header and
so on.
IPv6 packet may contain zero, one or more extension headers but these should be present in
their recommended order:
25
Difference Between IPv4 and IPv6
IPv4 IPv6
IPv4 has a 32-bit address length IPv6 has a 128-bit address length
It can generate 4.29×109 address The address space of IPv6 is quite large it can
space produce 3.4×1038 address space
The Security feature is dependent IPSEC is an inbuilt security feature in the IPv6
on the application protocol
In IPv4 Packet flow identification In IPv6 packet flow identification are Available and
is not available uses the flow label field in the header
26
IPv4 IPv6
IPv4 can be converted to IPv6 Not all IPv6 can be converted to IPv4
IPv4 consists of 4 fields which are IPv6 consists of 8 fields, which are separated by a
separated by addresses dot (.) colon (:)
Example of IPv6:
Example of IPv4: 66.94.29.13
2001:0000:3238:DFE1:0063:0000:0000:FEFB
TCP (Transmission Control Protocol) is one of the main protocols of the Internet protocol
suite. It lies between the Application and Network Layers which are used in providing
reliable delivery services.
27
The Internet Protocol (IP), which establishes the technique for sending data packets
between computers, works with TCP.
Features of TCP/IP
TCP keeps track of the segments being transmitted or received by assigning numbers
to each and every single one of them.
A specific Byte Number is assigned to data bytes that are to be transferred while
segments are assigned sequence numbers.
Acknowledgment Numbers are assigned to received segments.
2. Connection Oriented
It means sender and receiver are connected to each other till the completion of the
process.
The order of the data is maintained i.e. order remains same before and after
transmission.
3. Full Duplex
In TCP data can be transmitted from receiver to the sender or vice – versa at the
same time.
It increases efficiency of data flow between sender and receiver.
4. Flow Control
Flow control limits the rate at which a sender transfers data. This is done to ensure
reliable delivery.
The receiver continually hints to the sender on how much data can be received
(using a sliding window)
5. Error Control
28
Segments are checked for error detection
Error Control includes – Corrupted Segment & Lost Segment Management, Out-of-
order segments, Duplicate segments, etc.
6. Congestion Control
Advantages
It is a reliable protocol.
It provides an error-checking mechanism as well as one for recovery.
It gives flow control.
It makes sure that the data reaches the proper destination in the exact order that it
was sent.
Open Protocol, not owned by any organization or individual.
It assigns an IP address to each computer on the network and a domain name to
each site thus making each device site to be distinguishable over the network.
Disadvantages
TCP is made for Wide Area Networks, thus its size can become an issue for small
networks with low resources.
TCP runs several layers so it can slow down the speed of the network.
It is not generic in nature. Meaning, it cannot represent any protocol stack other than
the TCP/IP suite. E.g., it cannot work with a Bluetooth connection.
No modifications since their development around 30 years ago.
User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the Internet
Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an unreliable and connectionless
protocol. So, there is no need to establish a connection prior to data transfer. The UDP helps
29
to establish low-latency and loss-tolerating connections establish over the network. The UDP
enables process to process communication.
UDP is mainly used for real-time services like computer gaming, voice or video
communication, live conferences; we need UDP. Since high performance is needed, UDP
permits packets to be dropped instead of processing delayed packets. There is no error
checking in UDP, so it also saves bandwidth.
User Datagram Protocol (UDP) is more efficient in terms of both latency and bandwidth.
Advantages of UDP:
1. Speed: UDP is faster than TCP because it does not have the overhead of establishing a
connection and ensuring reliable data delivery.
2. Lower latency: Since there is no connection establishment, there is lower latency and
faster response time.
3. Simplicity: UDP has a simpler protocol design than TCP, making it easier to implement and
manage.
4. Broadcast support: UDP supports broadcasting to multiple recipients, making it useful for
applications such as video streaming and online gaming.
5. Smaller packet size: UDP uses smaller packet sizes than TCP, which can reduce network
congestion and improve overall network performance.
Disadvantages of UDP:
1. No reliability: UDP does not guarantee delivery of packets or order of delivery, which can
lead to missing or duplicate data.
2. No congestion control: UDP does not have congestion control, which means that it can
send packets at a rate that can cause network congestion.
3. No flow control: UDP does not have flow control, which means that it can overwhelm the
receiver with packets that it cannot handle.
30
5. Limited use cases: UDP is not suitable for applications that require reliable data delivery,
such as email or file transfers, and is better suited for applications that can tolerate some
data loss, such as video streaming or online gaming.
the purpose of using a pseudo-header is to verify that the UDP packet has reached its
correct destination
the correct destination consist of a specific machine and a specific protocol port
number within that machine
Network Applications
31
2. DNS (Domain Name System)
A Domain Name System (DNS) turns domain names into IP addresses, which allow
browsers to get to websites and other internet resources. Every device on the
internet has an IP address, which other devices can use to locate the device.
3. Remote Login
Remote Login is a process in which user can login into remote site i.e. computer and
use services that are available on the remote computer. With the help of remote
login a user is able to understand result of transferring and result of processing from
the remote computer to the local computer.
32
Types of Connection in FTP
Control Connection
Data Connection
Control Connection
For sending control information like user identification, password, commands to
change the remote directory, commands to retrieve and store files, etc., FTP makes
use of a control connection. The control connection is initiated on port number 21.
Data connection
For sending the actual file, FTP makes use of a data connection. A data connection is
initiated on port number 20.
FTP sends the control information out-of-band as it uses a separate control
connection. Some protocols send their request and response header lines and the
data in the same TCP connection. For this reason, they are said to send their control
information in-band. HTTP and SMTP are such examples.
Types of FTP
Anonymous FTP: Anonymous FTP is enabled on some sites whose files are available
for public access. A user can access these files without having any username or
password. Instead, the username is set to anonymous, and the password is to the
guest by default. Here, user access is very limited. For example, the user can be
allowed to copy the files but not to navigate through directories.
Password Protected FTP: This type of FTP is similar to the previous one, but the
change in it is the use of username and password.
33
FTP Secure (FTPS): It is also called as FTP Secure Sockets Layer (FTP SSL). It is a more
secure version of FTP data transfer. Whenever FTP connection is established,
Transport Layer Security (TLS) is enabled.
Secure FTP (SFTP): SFTP is not a FTP Protocol, but it is a subset of Secure Shell
Protocol, as it works on port 22.
Advantages of FTP
File sharing also comes in the category of advantages of FTP in this between two
machines files can be shared on the network.
Speed is one of the main benefits of FTP.
Since we don’t have to finish every operation to obtain the entire file, it is more
efficient.
Using the username and password, we must log in to the FTP server. As a result, FTP
might be considered more secure.
We can move the files back and forth via FTP. Let’s say you are the firm manager and
you provide information to every employee, and they all reply on the same server.
Disadvantages of FTP
File size limit is the drawback of FTP only 2 GB size files can be transferred.
More then one receivers are not supported by FTP.
FTP does not encrypt the data this is one of the biggest drawbacks of FTP.
FTP is unsecured we use login IDs and passwords making it secure but they can be
attacked by hackers.
Basics of email:
1. An email address: This is a unique identifier for each user, typically in the format of
[email protected].
2. An email client: This is a software program used to send, receive and manage emails,
such as Gmail, Outlook, or Apple Mail.
3. An email server: This is a computer system responsible for storing and forwarding
emails to their intended recipients.
34
To send an email:
The basic components of an email system are : User Agent (UA), Message Transfer Agent
(MTA), Mail Box, and Spool file.
1. User Agent (UA) : The UA is normally a program which is used to send and receive
mail. Sometimes, it is called as mail reader. It accepts variety of commands for
composing, receiving and replying to messages as well as for manipulation of the
mailboxes.
2. Message Transfer Agent (MTA) : MTA is actually responsible for transfer of mail from
one system to another. To send a mail, a system must have client MTA and system
35
MTA. It transfer mail to mailboxes of recipients if they are connected in the same
machine. It delivers mail to peer MTA if destination mailbox is in another machine.
The delivery from one MTA to another MTA is done by Simple Mail Transfer
Protocol.
3. Mailbox : It is a file on local hard drive to collect mails. Delivered mails are present in
this file. The user can read it delete it according to his/her requirement. To use e-mail
system each user must have a mailbox . Access to mailbox is only to owner of
mailbox.
4. Spool file : This file contains mails that are to be sent. User agent appends outgoing
mails in this file using SMTP. MTA extracts pending mail from spool file for their
delivery. E-mail allows one name, an alias, to represent several different e-mail
addresses. It is known as mailing list, Whenever user have to sent a message, system
checks recipient’s name against alias database. If mailing list is present for defined
alias, separate messages, one for each entry in the list, must be prepared and
handed to MTA. If for defined alias, there is no such mailing list is present, name
itself becomes naming address and a single message is delivered to mail transfer
entity.
Composition – The composition refer to process that creates messages and answers.
For composition any kind of text editor can be used.
Transfer – Transfer means sending procedure of mail i.e. from the sender to
recipient.
Reporting – Reporting refers to confirmation for delivery of mail. It help user to
check whether their mail is delivered, lost or rejected.
Displaying – It refers to present mail in form that is understand by the user.
Disposition – This step concern with recipient that what will recipient do after
receiving mail i.e save mail, delete before reading or delete after reading.
Advantages of email:
36
Disadvantages of email:
SMTP
Email is emerging as one of the most valuable services on the internet today. Most internet
systems use SMTP as a method to transfer mail from one user to another.
POP (post office protocol) or IMAP (internet message access protocol) is used to retrieve
those emails at the receiver’s side.
MIME is an extension of the original Simple Mail Transport Protocol (SMTP) email protocol.
Using MIME protocol, exchange different kinds of data files, including audio, video, images
and application programs, over email.
WWW
The World Wide Web is abbreviated as WWW and is commonly known as the web.
WWW can be defined as the collection of different websites around the world, containing
different information shared via local servers(or computers).
37
Features of WWW:
1. Uniform Resource Locator (URL): serves as a system for resources on the web.
It is the resource address on the internet. The URL (Uniform Resource Locator) is
created by Tim Berners-Lee and the Internet Engineering working group in 1994.
URL is the character string (address) which is used to access data from the internet.
The URL is the type of URI (Uniform Resource Identifier).
38