0% found this document useful (0 votes)
18 views1 page

Unit 3: Minimum Number of Hops

The document discusses various routing algorithms, focusing on the distance vector algorithm, which is iterative, asynchronous, and distributed. It explains the design issues for the network layer, the services provided to the transport layer, and the differences between connectionless and connection-oriented services. Additionally, it compares IPv4 and IPv6, explains flooding and its applications, and outlines the Address Resolution Protocol (ARP) and Reverse Address Resolution Protocol (RARP).

Uploaded by

Dattaraj Naik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Unit 3: Minimum Number of Hops

The document discusses various routing algorithms, focusing on the distance vector algorithm, which is iterative, asynchronous, and distributed. It explains the design issues for the network layer, the services provided to the transport layer, and the differences between connectionless and connection-oriented services. Additionally, it compares IPv4 and IPv6, explains flooding and its applications, and outlines the Address Resolution Protocol (ARP) and Reverse Address Resolution Protocol (RARP).

Uploaded by

Dattaraj Naik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Unit 3 • The routing algorithms are used for routing the packets. The routing algorithm is Q.

used for routing the packets. The routing algorithm is Q.3 Explain the distance vector algorithm with example.
nothing but a software responsible for deciding the optimal path through which
Q.1 What are the design issues for network layer. Explain in brief. • The Distance vector algorithm is iterative, asynchronous and distributed.
packet can be transmitted.
• Distributed: It is distributed in that each node receives information from one or more
→ • The routing algorithm initializes and maintains the routing table for the process of
of its directly attached neighbors, performs calculation and then distributes the
path determination.
1. Store and Forward packet switching: result back to its neighbors.
The host sends the packet to the nearest router. This packet is stored there until it b. Routing table: • Iterative: It is iterative in that its process continues until no more information is
has fully arrived once the link is fully processed by verifying the checksum then it is available to be exchanged between neighbors.
A routing table is a set of rules, often viewed in table format, that is used to determine
forwarded to the next router till it reaches the destination. This mechanism is called • Asynchronous: It does not require that all of its nodes operate in the lock step with
where data packets traveling over an Internet Protocol (IP) network will be directed. All IP-
“Store and Forward packet switching.” each other.
enabled devices, including routers and switches, use routing tables.
2. Services provided to Transport Layer: • The Distance vector algorithm is a dynamic algorithm.
Through the network/transport layer interface, the network layer transfers it’s Each entry in the routing table consists of the following entries: • Each router maintains a distance table known as Vector.
services to the transport layer.
• Network ID: Example:
Based on the connections there are 2 types of services provided:
The network ID or destination corresponding to the route.
• Connectionless – The routing and insertion of packets into subnet is done In the network shown below, there are three routers, A, B, and C, with the following weights
• Subnet Mask:
individually. No added setup is required. AB =2, BC =3 and CA =5.
The mask that is used to match a destination IP address to the network ID.
• Connection-Oriented – Subnet must offer reliable service and all the packets must be
• Next Hop: Step 1 − In this DVR network, each router shares its routing table with every neighbour. For
transmitted over a single route.
The IP address to which the packet is forwarded example, A will share its routing table with neighbours B and C and neighbours B and C will
3. Implementation of Connectionless Service:
• Outgoing Interface: share their routing table with A.
Packet is termed as “datagrams” and corresponding subnet as “datagram subnets”.
Outgoing interface the packet should go out to reach the destination network.
When the message size that has to be transmitted is 4 times the size of the packet,
• Metric:
then the network layer divides into 4 packets and transmits each packet to router via.
A common use of the metric is to indicate the minimum number of hops (routers
a few protocols. Each data packet has destination address and is routed
crossed) to the network ID.
independently irrespective of the packets.
4. Implementation of Connection Oriented service: c. Routing Algorithm:
To use a connection-oriented service, first we establish a connection, use it and then
The routing algorithms are used for routing the packets. The routing algorithm is nothing but
release it. In connection-oriented services, the data packets are delivered to the
a software responsible for deciding the optimal path through which packet can be
receiver in the same order in which they have been sent by the sender.
transmitted.
It can be done in either two ways:
• Circuit Switched Connection – A dedicated physical path or a circuit is established Routing algorithms can be grouped into two major classes:
between the communicating nodes and then data stream is transferred.
1) nonadaptive (Static Routing):
• Virtual Circuit Switched Connection – The data stream is transferred over a packet
Non-Adaptive routing algorithm is also known as a static routing algorithm. When
switched network, in such a way that it seems to the user that there is a dedicated
booting up the network, the routing information stores to the routers. Non-Adaptive
path from the sender to the receiver. A virtual path is established here. While, other
routing algorithms do not take the routing decision based on the network topology or
connections may also be using the same path. Step 2 − If the path via a neighbour has a lower cost, then the router updates its local table
network traffic.
Q.2 Explain: to forward packets to the neighbour. In this table, the router updates the lower cost for A
2) adaptive. (Dynamic Routing) and C by updating the new weight from 4 to 3 in router A and from 4 to 3 in router C.
a. Routing:
An adaptive routing algorithm is also known as dynamic routing algorithm. This algorithm Step 3 − The final updated routing table with lower cost distance vector routing protocol for
• A Router is a process of selecting path along which the data can be transferred from makes the routing decisions based on the topology and network traffic. The main all routers A, B, and C is given below –
source to the destination. Routing is performed by a special device known as a parameters related to this algorithm are hop count, distance and estimated transit time.
router.
Different Routing Algorithms: • Optimality principle • Shortest path algorithm • Flooding
• A Router works at the network layer in the OSI model and internet layer in TCP/IP
model • Distance vector routing • Link state routing • Hierarchical Routing

Step 2: Step 3: Q.5 Explain Link state routing algorithm. • Second to keep track of which packets have been flooded, to avoid sending them out
a second time. achieve this goal is to have the source router put a sequence number
The idea behind link state routing is simple and can be stated as five parts.
in each packet it receives from its hosts. Each router then needs a list per source
• Discover its neighbors, learn their network address: When a router is booted, its router telling which sequence numbers originating at that source have already been
first task is to learn who its neighbors are. It accomplishes this goal by sending a seen.
special HELLO packet on each point-to-point line. The router on the other end is
Q.7 Compare IP v4 and IP v6.
expected to send back a reply telling who it is.
• Measure the delay or cost to each of its neighbors: The link state routing algorithm IP v4 IP v6
requires each router to know, or at least have a reasonable estimate of, the delay to IPv4 is a 32-bit address. IPv6 is a 128-bit address.
each of its neighbors. The most direct way to determine this delay is to send over the IPv4 is a numeric address that consists of 4 IPv6 is an alphanumeric address that
line a special ECHO packet that the other side is required to send back immediately. fields which are separated by dot (.). consists of 8 fields, which are separated by
• Construct a packet telling all it has just learned: Once the information needed for colon.
the exchange has been collected, the next step is for each router to build a packet It generates 4 billion unique addresses It generates 340 undecillion unique
addresses.
containing all the data. The packet starts with the identity of the sender, followed by
In IPv4, end-to-end connection integrity is In the case of IPv6, end-to-end connection
Q.4 What do you understand by principle of optimality with regards to routing? Explain with a sequence number, age, and a list of neighbors. For each neighbor, the delay to that
unachievable. integrity is achievable.
diagram. neighbor is given.
It supports manual and DHCP configuration It supports manual, DHCP, auto
• Send this packet to all other routers: The trickiest part of the algorithm is configuration, and renumbering.
The optimality principle states that if router J is on the optimal path from router I to router
distributing the link state packets reliably. As the packets are distributed and
K, then the routes from I to J and from J to K are also optimal.
installed, the routers getting the first ones will change their routes.
• Compute the shortest path to every other router: Once a router has accumulated a Q.8 Address Resolution Protocol vs Reverse Address Resolution Protocol.
full set of link state packets, it can construct the entire subnet graph because every ARP RARP
link is represented. Every link is, in fact, represented twice, once for each direction. The ARP retrieves the receiver’s physical The RARP retrieves a computer’s logical
The two values can be averaged or used separately. address in a network. address from its available server.
Q.6 Explain Flooding and its application and drawbacks. The nodes use ARP broadcasts in the LAN The RARP utilises IP addresses for
Consider a network of routers, {G, H, I, J, K, L, M, N} as shown in the figure. Let the optimal route with the help of the MAC address. broadcasting.
from I to K be as shown via the green path, i.e., via the route I-G-J-L-K. According to the optimality • Flooding is a process in which every incoming packet is sent out on every outgoing The ARP table is maintained by the Local The RARP table is maintained by the RARP
principle, the optimal path from J to K with be along the same route, i.e. J-L-K. line except the one it arrived on. Host. Server.
The primary use of the ARP reply is to The primary use of the RARP reply is to
Applications: update the ARP table. configure the local host’s IP address.
• Military applications: where large numbers of routers may be blown to bits at any
instant, the tremendous robustness of flooding is highly desirable. Q.9 Explain the following
• Distributed database applications: it is sometimes necessary to update all the
databases concurrently, in which case flooding can be useful. ARP:
Now, suppose we find a better route from J to K is found, say along J-M-N-K. Consequently, we will • Wireless networks: all messages transmitted by a station can be received by all other ARP stands for Address Resolution Protocol which is a LAN protocol. It is a process that links
also need to update the optimal route from I to K as I-GJ- M-N-K, since the previous route ceases to stations within its radio range, which is, in fact, flooding, and some algorithms utilize the Internet Protocol (IP) address to the media access control (MAC) address, often known
be optimal in this situation. This new optimal path is shown line orange lines in the following figure − this property. as a fixed physical machine address in a local area network (LAN).
Drawbacks: Flooding obviously generates vast numbers of duplicate packets, in fact, an RARP:
infinite number unless some measures are taken to damp the process.
A TCP/IP protocol called RARP is in charge of converting physical addresses (MAC addresses)
• One such measure is to have a hop counter contained in the header of each packet, into IP addresses. For example, Diskless Workstations have only the MAC address but do not
which is decremented at each hop, with the packet being discarded when the have IP addresses. So, using the RARP protocol one can find the IP address via any external
counter reaches zero. source.

You might also like