Unit 3-2

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

ZCoER,Pune

Functions of Network Layer

o The network layer is the computer network component that enables the node to
transfer the data packets using the connection between different nodes and
devices.
o The transmission of data between different devices is performed in the form of
packets through different logical network paths.
o The network layer provides paths to transfer the data packets in the network.
o The network layer also arranges and manages the possible routes for data
transmission.
o The network layer assigns destination and source IP address to each data
segment.
o It arranges all the possible paths to transfer the data in the network and then
chooses the best logical path to transfer the data between the different nodes.
o The network layer act upon the requests of the layer above it. The layer above it
is the transport layer. Then it generates requests forwarded to the model's lower
layer, that is, the data link layer.

Major functions of Network layer are …

1. Routing:

It is the process to determine the most effective route for data transmission in
the network.

When a data packet arrives at the router's input link, it determines the ideal route
for data transmission in the network.

It determines the path that will be used to transfer the packet further in the
network.

2. Logical Addressing:

1
ZCoER,Pune

There are two types of addressing performed in the network: logical addressing
and physical addressing.

The data link layer performs the physical addressing, while the network layer does
the logical addressing in the OSI model.

Logical addressing is also used to distinguish between the source and destination
system.

The network layer adds a header to the packet, which includes the logical
addresses of both the sender and the receiver.

3. Internetworking:

This is the most important function performed by the network layer of the OSI
model.

It establishes the logical connection between nodes in the same or different


networks.

4. Fragmentation:

It is the conversion of data packets into the smallest individual data units capable
of being transmitted in the network.

Switching Techniques :

 Switching is the mechanism in computer networks that helps in deciding the best
possible route for data transmission.
 In large networks there might be multiple paths linking between sender and
receiver.
 Information may be switched from one node to another and travels through
various communication channels before reaching to the destination.
 There are three typical switching techniques available for digital traffic.

2
ZCoER,Pune

Switched
Networks

Circuit Message Packet


Switching Switching Switching

Circuit Switching :

A dedicated path is established between sender and receiver.


It is a connection-oriented network which consists of three major steps :
1. Circuit establishment
2. Data transfer
3. Circuit Disconnect

Circuit Establishment

 A dedicated circuit between the source and the destination is established with the help
of numerous intermediate switching centres.
 The requesting and receiving of the communication signals are possible when the
sender and receiver transmit signals across the circuit.

3
ZCoER,Pune

Data Transfer

 The transfer of data and voice signals are possible between the source and the
destination after the establishment of the circuit.
 The connection between both the end parties continues as long as they communicate.
 If the frame is sent by the primary station, it contains the address(es) of the secondary
station(s).
Circuit Disconnect

 The disconnection in the circuit happens when one of the users initiates to disconnect.
 When the disconnection takes place, all the intermediate links between the sender and
receiver are removed.

Advantages Of Circuit Switching:

 In the case of Circuit Switching technique, the communication channel is dedicated.


 It has fixed bandwidth.

Disadvantages Of Circuit Switching:

 Once the dedicated path is established, the only delay occurs in the speed of data
transmission.
 It takes a long time to establish a connection approx 10 seconds during which no data
can be transmitted.
 It is more expensive than other switching techniques as a dedicated path is required for
each connection.
 It is inefficient to use because once the path is established and no data is transferred,
then the capacity of the path is wasted.
 In this case, the connection is dedicated therefore no other data can be transferred
even if the channel is free.

Examples of circuit switching are:

 Analog telephone network

4
ZCoER,Pune

 Optical mesh network


 Public Switched Telephone Network (PSTN)

Message Switching :

 Message Switching is a switching technique in which a message is transferred as a


complete unit and routed through intermediate nodes at which it is stored and
forwarded.
 In Message Switching technique, there is no establishment of a dedicated path between
the sender and receiver.
 The destination address is appended to the message.
 Message Switching provides a dynamic routing as the message is routed through the
intermediate nodes based on the information available in the message.
 Message switches are programmed in such a way so that they can provide the most
efficient routes.
 Each and every node stores the entire message and then forwards it to the next node.
This type of network is known as store and forward network.
 Message switching treats each message as an independent entity.

Advantages of Message Switching

 Data channels are shared among the communicating devices that improve the efficiency
of using available bandwidth.
 Traffic congestion can be reduced because the message is temporarily stored in the
nodes.
 Message priority can be used to manage the network.
 The size of the message which is sent over the network can be varied. Therefore, it
supports the data of unlimited size.

5
ZCoER,Pune

Disadvantages of Message Switching

 The message switches must be equipped with sufficient storage to enable them to store
the messages until the message is forwarded.
 The Long delay can occur due to the storing and forwarding facility provided by the
message switching technique.
 Not suitable for streaming media and real time applications

Applications of Message Switching

 In telegraph message switching centres.


 In delivery processes of electronic mail.

Packet Switching:

 The packet switching is a switching technique in which the message is sent in one go,
but it is divided into smaller pieces, and they are sent individually.
 It combines the advantages of message and circuit switching and minimize the
disadvantages of both.
 The message splits into smaller pieces known as packets and packets are given a unique
number to identify their order at the receiving end.
 Every packet contains some information in its headers such as source address,
destination address and sequence number.
 Packets will travel across the network, taking the shortest path as possible.
 All the packets are reassembled at the receiving end in correct order.
 If any packet is missing or corrupted, then the message will be sent to resend the
message.
 If the correct order of the packets is reached, then the acknowledgment message will be
sent.

6
ZCoER,Pune

There are two approaches in packet switching ..


1. Datagram Packet Switching and
2. Virtual Circuit Switching
Datagram Packet Switching

 In case of datagram packet switching, a connectionless switching is established.


 Each independent entity is called as datagram.
 Datagram contains information about destination and used by all the intermediate
nodes to forward the datagram towards receiver.
 In datagram packet switching, the routing path is not fixed.
 All the intermediate nodes takes decision based on traffic to forward the packets
towards receiver.
 Based on datagram sequence number, each datagram is arranged and reconstructed as
an entire message at receiver.

Virtual Circuit Switching

 It is a connection oriented switching method.


 Here, a pre-planned route is established before actual message is sent.
 Thus the path is fixed for duration of logical connection.

Network Addressing :

 Network addressing is one of the major tasks of Network Layer.


 Network Addresses are always logical i.e. these are software based addresses which can
be changed by appropriate configurations.
 A network address always points to host / node / server or it can represent a whole
network.

7
ZCoER,Pune

IP Protocol :

 Internet protocol is widely respected and deployed Network Layer protocol which helps
to communicate end to end devices over the internet.

Types

1. IPv4 : Which has ruled the world for decades but now is running out of address space.
IPv4 protocol only allowed for 232 addresses
2. IPv6 : It is created to replace IPv4. The available address space and allowed for 2128
addresses

IPV4 :

 Uses Dotted Decimal Notation … with every eight bits (octet) represented by a number
from 1 to 255, each separated by a dot.

 Uses Dotted Decimal Notation … with every eight bits (octet) represented by a number
from 1 to 255, each

1. Class A
• In a class A address, the first bit of the first octet is always ‘0’.
• Thus, class A addresses range from 0.0.0.0 to 127.255.255.255(as 01111111 in
binary converts to 127 in decimal).
• The first 8 bits or the first octet denote the network portion and the rest 24 bits
or the 3 octets belong to the host portion.
• Its Subnet mask is 255.0.0.0.
• Example: 10.1.1.1
• Exception –-

8
ZCoER,Pune

• 127.X.X.X is reserved for loopback and 0.X.X.X is reserved for default network
(Thus, the actual range of class A is: 1.0.0.0 to 126.255.255.255)

2. Class B
• In a class B address, the first octet would always start with ’10’.
• Thus, class B addresses range from 128.0.0.0 to 191.255.255.255.

• The first 16 bits or the first two octets denote the network portion and the
remaining 16 bits or two octets belong to the host portion.
• Its Subnet mask is 255.255.0.0.
• Example: 172.16.1.1

3. Class C
• In a class C address, the first octet would always start with ‘110’.
• Thus, class C addresses range from 192.0.0.0 to 223.255.255.255.
• The first 24 bits or the first three octets denote the network portion and the rest
8 bits or the remaining one octet belong to the host portion.
• Its Subnet mask is 255.255.255.0.
• Example: 192.168.1.1

4. Class D
• Class D is used for multicast addressing
• The first octet would always start with ‘1110’.
• Thus, class D addresses range from 224.0.0.0 to 239.255.255.255.
• Its Subnet mask is not defined.
• Example: 239.2.2.2
• Class D addresses are used by routing protocols like OSPF, RIP, etc.

5. Class E

9
ZCoER,Pune

• Class E addresses are reserved for research purposes and future use.
• The first octet in a class E address starts with ‘1111’.
• Thus, class E addresses range from 240.0.0.0 to 255.255.255.255.
• Its Subnet mask is not defined.

IPV4 Address Classes Summary :

Address Range Bit Pattern Decimal Default Subnet Reserved For


Class of 1st Byte Range Mask

A 0.0.0.0 0XXX XXXX 1 to 127 255.0.0.0 Government


127.255.255.255

B 128.0.0.0 10XX XXXX 128 to 191 255.255.0.0 Medium


Companies
191.255.255.255

C 192.0.0.0 110X XXXX 192 to 223 255.255.255.0 Small


Companies
223.255.255.255.255

D 224.0.0.0 1110 XXXX 224 to 239 Not Applicable Reserved for


Multicasting
239.255.255.255

E 240.0.0.0 1111 XXXX 240 to 255 Not Applicable Experimental


/ Future use
255.255.255.255

10
ZCoER,Pune

IPV6 :

• An IPv6 address consists of eight groups of four hexadecimal digits(Total 128 bits).

Types of IPV6 :

• Unicast addresses : It identifies a unique node on a network and usually refers to a


single sender or a single receiver.
• Multicast addresses : It represents a group of IP devices and can only be used as the
destination of a datagram.
• Any cast addresses : It is assigned to a set of interfaces that typically belong to different
nodes.

Advantages of IPV6 :
• Reliability
• Faster Speeds:
 IPv6 supports multicast rather than broadcast in IPv4.

11
ZCoER,Pune

 This feature allows bandwidth-intensive packet flows (like multimedia streams)


to be sent to multiple destinations all at once.
• Stronger Security:
 IP Security, which provides confidentiality, and data integrity, is embedded into
IPv6.
 Routing efficiency

 Most importantly it’s the final solution for growing nodes in Global-network.

Disadvantages of IPv6
• Conversion:
 Due to widespread present usage of IPv4 it will take a long period to
completely shift to IPv6.
• Communication:
 IPv4 and IPv6 machines cannot communicate directly with each other.
 They need an intermediate technology to make that possible.

Difference between IPv4 and IPv6

IPv4 IPv6

IPv4 has a 32-bit address length IPv6 has a 128-bit address length

It Supports Manual and DHCP address It supports Auto and renumbering address
configuration configuration

In IPv4 end to end, connection integrity In IPv6 end to end, connection integrity is
is Unachievable Achievable

It can generate 4.29×109 address space Address space of IPv6 is quite large it can
produce 3.4×1038 address space

12
ZCoER,Pune

The Security feature is dependent on IPSEC is an inbuilt security feature in the IPv6
application protocol

Address representation of IPv4 is in Address Representation of IPv6 is in


decimal hexadecimal
Fragmentation performed by Sender In IPv6 fragmentation performed only by the
and forwarding routers sender

In IPv4 Packet flow identification is not In IPv6 packet flow identification are
available Available and uses the flow label field in the
header

In IPv4 checksum field is available In IPv6 checksum field is not available

It has broadcast Message Transmission In IPv6 multicast and anycast message


Scheme transmission scheme is available

In IPv4 Encryption and Authentication In IPv6 Encryption and Authentication are


facility not provided provided

IPv4 has a header of 20-60 bytes IPv6 has header of 40 bytes fixed

IPv4 consist of 4 fields which are IPv6 consist of 8 fields, which are separated
separated by dot (.) by colon (:)

IPv4’s IP addresses are divided into IPv6 does not have any classes of IP address
five different classes. Class A , Class B,
Class C , Class D , Class E

IPv4 supports VLSM(Variable Length IPv6 does not support VLSM


subnet mask)

Example of IPv4: 66.94.29.13 Example of IPv6:


2001:0000:3238:DFE1:0063:0000:0000:FEFB

13
ZCoER,Pune

• Network Address Translation (NAT) :

• NAT is where a computer or network device, typically a network firewall, creates a


public IP for a computer (or group of computers) inside a private network.
• The main function of NAT is to limit the number of public IPs that an organization or
company should use for Economy and Security purposes.
• NAT is developed by Cisco
• NAT is a service that is used in routers. Its purpose is to translate a set of IP addresses to
another set of IP addresses.

• It has an IP address called as Private IP Address for a computer to communicate with other
computers and web servers on the Internet.
• And to access resources outside the network, like the Internet, It must have a public address
in order for responses to their requests to return to them.
• The private addressing scheme works well for computers that only have to access resources
inside the network, like workstations needing access to file servers and printers.
• Routers inside the private network can route traffic between private addresses with no
trouble.

• Sub-netting :

• When a bigger network is divided into smaller networks, to maintain security, then that is
known as Subnetting.
• So, maintenance is easier for smaller networks.

14
ZCoER,Pune

• For example, if we consider a class A address, the possible number of hosts is 2 24 for
each network, it is obvious that it is difficult to maintain such a huge number of hosts,
but it would be quite easier to maintain if we divide the network into small parts.

• Classless Inter Domain Routing (CIDR):

• In the Classful addressing the no of Hosts within a network always remains the same
depending upon the class of the Network.
• Class A network contains 224 Hosts
• Class B network contains 216 Hosts
• Class C network contains 28 Hosts
• If any Organization requires 214 hosts (16384), then it must have to go with a Class B network
with 216 Hosts (65536).
• In this case, 49152 Hosts will be wasted (65536 - 16384 = 42152) .
• This is the major drawback of Classful Addressing.
• In order to reduce the wastage of IP addresses a new concept of Classless Inter-Domain
Routing is introduced.

• Network Layer Protocools:

1. ARP
2. RARP
3. ICMP

15
ZCoER,Pune

4. IGMP
5. IP

• ARP (Address Resolution Protocol )

• ARP uses a simple message format sent over the data link layer and network layer (Layers 2
and 3 of the OSI model).
• This message contains one request

• For example, assume two computers on an Ethernet LAN.


• Computer A needs to send a packet to computer B.
• Computer A knows that Computer B's IP address is 192.168.1.101.
• To send the packet to computer B, it needs the physical address of computer B or its
MAC address.

16
ZCoER,Pune

• Here A it sends out a broadcast ARP request to every computer on the network asking
"Who has IP address 192.168.1.101?".
• In response, only Computer B will then send a unicast (1 to 1) response saying "I have
192.168.1.101 and my MAC address is 11:22:33:44:55:66!".

• RARP (Reverse Address Resolution Protocol )

• If a HOST does not recognize its IP own address, it may send out a RARP (Reverse Address
Resolution Protocol) appeal deliver by a RARP server which has a table of MAC addresses and
IP addresses.
• The RARP server works as a elementary server.
• RARP Server replies back with IP address of HOST

17
ZCoER,Pune

• ARP / RARP Message Format :

• Compare ARP and RARP :

18
ZCoER,Pune

• Internet Control Message Protocol (ICMP):

• It is a network layer protocol.


• It is a supporting protocol and is used by networks devices like routers for sending error
messages and operations information.,
• e.g. the requested service is not available or that a host or router could not be
reached.
ICMP Message Format

19
ZCoER,Pune

ICMP Messages

20
ZCoER,Pune

• Internet Group Management Protocol (IGMP):

• It is a protocol that allows several devices to share one IP address so they can all receive the
same data.
• IGMP is a network layer protocol used to set up multicasting on networks that use the
Internet Protocol version 4 (IPv4). Specifically, IGMP allows devices to join a multicast group.
• The IGMP protocol gives the multicast routers information about the membership status of
hosts (routers) connected to the network.
• A multicast router may receive thousands of multicast packets every day for different groups.
• If a router has no knowledge about the membership status of the hosts, it must broadcast all
these packets.
• This creates a lot of traffic and consumes bandwidth.
• A better solution is to keep a list of groups in the network for which there is at least one loyal
member.

21
ZCoER,Pune

• IGMP helps the multicast router create and update this list.

IGMP Message Format

Type Value
General or special query Ox11 or 00010001
Membership report Ox16 or 00010110
Leave report Ox17 or 00010111

 Maximum Response Time.


This 8-bit field defines the amount of time in which a query must be answered. The value is
in tenths of a second;
for example, if the value is 100, it means 10 s.
The value is nonzero in the query message; it is set to zero in the other two message
types.
 Checksum.
This is a 16-bit field carrying the checksum.
The checksum is calculated over the 8-byte message.
 Group address.
The value of this field is 0 for a general query message.
The value defines the groupid (multicast address of the group) in the special query, the
membership report, and the leave report messages.

• Network Routing and Algorithms

22
ZCoER,Pune

• Static Routing

• Static Routing is also known as Non-adaptive Routing.


• It is a technique in which the administrator manually adds the routes in a routing table.
• A Router can send the packets for the destination along the route defined by the
administrator.
• In this technique, routing decisions are not made based on the condition or topology of
the networks

Advantages of Static Routing

• No Overhead: It has no overhead on the CPU usage of the router. Therefore, the cheaper
router can be used to obtain static routing.
• Bandwidth: It has not bandwidth usage between the routers.
• Security: It provides security as the system administrator is allowed only to have control
over the routing to a particular network.

Disadvantages of Static Routing

• For a large network, it becomes a very difficult task to add each route manually to the
routing table.
• The system administrator should have a good knowledge of a topology as he has to add
each route manually.

• Dynamic Routing

• It is also known as Adaptive Routing.


• It is a technique in which a router adds a new route in the routing table for each packet in
response to the changes in the condition or topology of the network.
• Dynamic protocols are used to discover the new routes to reach the destination.
• In Dynamic Routing, different protocols used to discover the new routes.
• If any route goes down, then the automatic adjustment will be made to reach the
destination.

Advantages of Dynamic Routing:

• It is easier to configure.
• It is more effective in selecting the best route in response to the changes in the condition
or topology.

Disadvantages of Dynamic Routing:

23
ZCoER,Pune

• It is more expensive in terms of CPU and bandwidth usage.


• It is less secure as compared to default and static routing.

• Distance-Vector Routing

• It is routing based on distance-vector algorithms, also sometimes called Bellman-Ford


algorithms, the algorithms periodically pass copies of their routing tables to their
immediate network neighbours.
• Each recipient adds a distance vector—that is, its own distance “value”—to the table and
forwards it on to its immediate neighbours.
• This process occurs in an omnidirectional manner among immediately neighbouring
routers.
• This step-by-step process results in each router learning about other routers and
developing a cumulative perspective of network “distances.”
The cumulative table is then used to update each router’s routing tables.

Advantages of Distance Vector routing :

• It is simpler to configure and maintain than link state routing.

Disadvantages of Distance Vector routing :

• It is slower to converge than link state.


• It is at risk from the count-to-infinity problem.
• It creates more traffic than link state .
• For larger networks, distance vector routing results in larger routing tables than
link state.

• Link State Routing

• It is routing based on distance-vector algorithms, also sometimes called Bellman-Ford


algorithms, the algorithms periodically pass copies of their routing tables to their
immediate network neighbours.
• Each recipient adds a distance vector—that is, its own distance “value”—to the table and
forwards it on to its immediate neighbours.
• This process occurs in an omnidirectional manner among immediately neighbouring
routers.
• This step-by-step process results in each router learning about other routers and
developing a cumulative perspective of network “distances.”
• The cumulative table is then used to update each router’s routing tables.
• This results in each node building a complete map of the network (shortest path tree),
with itself as the root using the shortest path first algorithm

24
ZCoER,Pune

• Path Vector

• Path vector (PV) protocols, such as Border Gateway Protocols (BGP), are used across
domains aka autonomous systems.
• A path-vector routing protocol is a network routing protocol which maintains the path
information that gets updated dynamically.
• Updates that have looped through the network and returned to the same node are easily
detected and discarded.
• In a path vector protocol, a router does not just receive the distance vector for a particular
destination from its neighbour; instead, a node receives the distance as well as path
information (aka BGP path attributes), that the node can use to calculate (via the BGP
path selection process) how traffic is routed to the destination .

• Routing Protocols

Types of routing protocols


• Routing information protocol (RIP)
• Interior gateway protocol (IGRP)
• Enhanced interior gateway routing protocol (EIGRP)
• Open shortest path first (OSPF)
• Exterior Gateway Protocol (EGP)
• Border gateway protocol (BGP)
• Immediate system-to-immediate system (IS-IS)
• Multiprotocol Label Switching (MPLS)

• Routing Information Protocol (RIP)

• RIP, an interior gateway protocol, is one of the first protocols created.


• It can be used with local area networks (LANs), which are linked computers in a small
range, or wide area networks (WANs), which are telecommunications networks that
cover a greater range.
• There are two different versions of this protocol type:
• RIPv1
• RIPv2.
• RIPv1
• The original version, is a classful protocol that examines and evaluates
network paths based on the hops to the pre-determined destination.
• Typically, it communicates with other networks by broadcasting its IP
address.
• RIPv2.
• The newer version, RIPv2, shares its routing table through a multicast
address, which identifies the main computer network.
25
ZCoER,Pune

• This version, which is a classless protocol, also features advanced security


measures, like authentication, to protect data.
• RIPv2 is beneficial for smaller networks because it can only support router
journeys of 15 hops or fewer.

• Open shortest path first (OSPF)

• It classifies as a link state, interior gateway and classless protocol


• It uses the shortest path first (SPF) algorithm to ensure the efficient transmission of data.
• Internally, it maintains multiple databases with topology tables and information about its
entire network.
• Typically, the information comes from link state advertisements sent by individual
routers.
• The advertisements, which are like reports, share detailed descriptions of the path's
distance and how many resources it may require.
• It also uses authentication practices to ensure its data is secure throughout changes or
network breaches.
• Small and large network organizations may benefit from using OSPF because of its
scalability features.

• Border gateway protocol (BGP)

• BGP is an exterior gateway protocol that was initially developed to replace EGP.
• It uses the best path selection algorithm for performing data package transfers, making it
a distance vector protocol as well.
• To automatically determine the best route, BGP references factors like:
• Path length
• Origin type
• Router identification
• Neighbor IP addresses
• BGP allows administrators to alter transfer routes depending on their needs and offers
advanced security features so only authorized routers can exchange data and information
with each other.

• Multiprotocol Label Switching (MPLS)

• It is a traffic routing mechanism.


• It has significant advantages over the traditional IP based routing mechanism.
• It is a routing technique in telecommunications networks that directs data from one
node to the next based on labels rather than network addresses.

26
ZCoER,Pune

• Whereas network addresses identify endpoints the labels identify established paths
between endpoints.

• Routing in MANET

• MANETs

• A Mobile Ad Hoc Network (MANET) is a self-configuring network of mobile devices


connected wirelessly.
• It has following Characteristics:
• Dynamic Topology: Nodes can join or leave the network at any time.
• Limited Bandwidth: Wireless communication often has lower bandwidth than
wired.
• Energy Constraints: Devices are typically battery-powered.
• Lack of Infrastructure: No fixed routers or access points; nodes act as routers.

• AODV (Ad hoc On-Demand Distance Vector)

• AODV is a reactive routing protocol used in Mobile Ad Hoc Networks (MANETs) that
establishes routes only when needed.
• It efficiently finds routes to distant nodes while minimizing control overhead.
• Key Features
• On-Demand Route Discovery: Routes are created only when a node wants to
communicate with another node.
• Route Maintenance: AODV maintains routes as long as they are needed and
removes them when they are no longer valid.
• Sequence Numbers: Helps in determining the freshness of routes and avoiding
routing loops.
• Unicast and Broadcast: Supports both unicast (one-to-one) and broadcast (one-
to-all) communications.

Operation of AODV

• AODV's operation can be broken down into two main processes: route discovery and
route maintenance.

27
ZCoER,Pune

a. Route Discovery Process


• Route Request (RREQ):
• When a node (source) needs to send data to another node (destination), it
broadcasts a RREQ packet.
• The RREQ includes:
• Source address
• Destination address
• Sequence number
• Hop count
• Route Reply (RREP):
• When a node receives the RREQ and has a valid route to the destination, it
responds with a RREP packet.
• The RREP travels back to the source along the reverse path established by the
RREQ.
• Route Creation:
• The source node, upon receiving the RREP, updates its routing table with the new
route.
• All intermediate nodes also update their routing tables to reflect the new route.

b. Route Maintenance

• Link Failure Detection:


• Nodes monitor their routes. If a link breaks, the node detects the failure through
timeouts or acknowledgment failures.
• Route Error (RERR):
• When a link is found to be broken, the node generates a RERR packet and sends it
to the affected nodes.
• This informs them that the route is no longer valid, allowing them to seek
alternative routes.
• Hop Count: Number of hops to reach the destination.

• DSR (Dynamic Source Routing)

• DSR is a reactive routing protocol designed for Mobile Ad Hoc Networks (MANETs)
that allows nodes to discover and maintain routes on-demand.
• It is used to establish routes as needed, reducing unnecessary overhead associated with
proactive protocols.

28
ZCoER,Pune

• Key Features
• On-Demand Route Discovery: Routes are created only when a source node
requires a path to a destination node.
• Source Routing: The complete route is specified in the packet header, allowing
each packet to carry the routing information.
• Route Caching: Nodes can cache routes they have recently used, enabling
quicker route discovery in the future.

Operation of DSR
• DSR consists of two main processes: route discovery and route maintenance.

a. Route Discovery Process


• Route Request (RREQ):
• When a source node needs to send data to a destination, it broadcasts a RREQ
packet.
• The RREQ includes:
• Source address
• Destination address
• Identifier (to prevent duplicates)
• Route record (initially empty)
• Route Reply (RREP):
• When an intermediate node receives the RREQ and has a route to the destination
(or if the destination receives it), it sends a RREP back to the source.
• The RREP contains the complete route, which is filled in as the RREQ traverses
the network.
• Route Establishment:
• The source node receives the RREP and updates its routing table with the new
route.
• The route is used for subsequent data transmissions.

• b. Route Maintenance

• Route Error (RERR):


• If a node detects a broken link during data transmission (e.g., a timeout occurs), it
generates a RERR packet.
• This packet informs the source and other nodes that the route is no longer valid,
prompting them to seek a new route.
• Route Caching:

29
ZCoER,Pune

• Nodes can cache routes they have recently used, allowing for faster route
discovery in future communications.

• Mobile IP

• Mobile IP is a communication protocol that allows mobile devices to maintain a


permanent IP address while moving between different networks.
• It enables seamless connectivity and mobility for devices as they change their point of
attachment to the internet.

• Key Components
• Home Agent (HA): A router on the home network of the mobile device that
keeps track of the device's current location and forwards packets to it.
• Foreign Agent (FA): A router on the visited network that provides routing
services to the mobile device while it is connected to that network.
• Mobile Node (MN): The device (e.g., smartphone, laptop) that is moving
between networks.

Operation of Mobile IP

• Mobile IP operates through several key processes:


a. Registration
• Mobile Node Moves: When a mobile node connects to a foreign network, it sends a
registration request to the home agent, possibly via the foreign agent.
• Registration Request: Contains the mobile node’s home address, care-of address (the
current location), and a unique identifier.
• Home Agent Response: The home agent acknowledges the registration, allowing
packets to be forwarded to the care-of address.
b. Data Transmission
• Forwarding: Packets sent to the mobile node’s home address are intercepted by the
home agent, which forwards them to the current care-of address via tunneling.
• Tunneling: Encapsulates the original packet inside a new packet for transmission,
ensuring delivery even when the mobile node moves.
c. Deregistration
• When the mobile node disconnects from the foreign network, it sends a deregistration
request to the home agent to stop forwarding packets.

30

You might also like