0% found this document useful (0 votes)
24 views9 pages

Routing and Switching

Uploaded by

mackson kasanga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views9 pages

Routing and Switching

Uploaded by

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

ROUTING

Routing is the process of selecting a path for traffic in a network or between or


across multiple networks. Broadly, routing is performed in many types of
networks, including circuit-switched networks, such as the public switched
telephone network (PSTN), and computer networks, such as the Internet.
In packet switching networks, routing is the higher-level decision making that
directs network packets from their source toward their destination through
intermediate network nodes by specific packet forwarding mechanisms. Packet
forwarding is the transit of network packets from one network interface to
another. Intermediate nodes are typically network hardware devices such
as routers, gateways, firewalls, or switches. General-purpose computers also
forward packets and perform routing, although they have no specially optimized
hardware for the task.
The routing process usually directs forwarding on the basis of routing tables.
Routing tables maintain a record of the routes to various network destinations.
Routing tables may be specified by an administrator, learned by observing
network traffic or built with the assistance of routing protocols.
Routing, in a narrower sense of the term, often refers to IP routing and is
contrasted with bridging. IP routing assumes that network addresses are
structured and that similar addresses imply proximity within the network.
Structured addresses allow a single routing table entry to represent the route to a
group of devices. In large networks, structured addressing (routing, in the
narrow sense) outperforms unstructured addressing (bridging). Routing has
become the dominant form of addressing on the Internet. Bridging is still
widely used within local area networks.

Routing and Forwarding


Routing is the process of moving data between two devices. Forwarding is the
process of collecting data from one device and sending it to another device.
Finally, switching is the process of collecting data from one device and sending
it to another device along with a path

Difference between routing and forwarding


Routing and forwarding are two different mechanisms that work in completely
different ways. Let's dive in deeper to understand and clarify their respective
functions.
Routing
Routing refers to the process of determining the optimal path from source to
destination for data transmission in the computer network. Whenever an edge
device needs to transmit data packets to another device located on another
network or subnet, a routing phenomenon is used. This mechanism is achieved
through a router.
Router
A router is a specialized networking device that is designed to connect
different networks and allow data transmission between the connected
networks. They achieve this by handling routing decisions and thereby routing
data packets o the optimal path calculated by them. This calculation is done
through a routing table.
Routing table
A routing table enables the router to forward the data packets to a port in an
intelligent way after calculating the optimal path from the source to a
destination IP address.
A routing table looks something like this:
Network Outgoing
Netmask Gateway Metric
Destination Interface
101.25.67.0 255.255.255.0 10.0.0.2 eth0 1

Routing process
The routing process involves analyzing the destination IP addresses of the data
packets and consulting the routing table to calculate the optimal path for the data
packets in transit.
Routers use various metrics like hop count, bandwidth, delay, or path cost to
calculate the data packets' most feasible or optimal path. After calculating the
optimal path, the router forwards the packet to the next hop along that path. This
process continues until the data packet reaches its destination.
Forwarding
Forwarding refers to the process of actually transmitting the data packets from
one network device to the next hop in their route. This route has been
predetermined by the previous routers in the network.
Therefore, forwarding doesn't involve any real decision-making and is a
straightforward real-time operation that occurs when data packets arrive at a router.
Forwarding process
The forwarding process is when a data packet arrives at a router, computes its
optimal route and the feasible next hop to which the packet should be sent.

The key differences between routing and forwarding can be best illustrated in
tabular form as follows:
Routing Forwarding
Determining the optimal path for Transmitting data packets from one
Purpose
packets interface to the other
Decision Involves decision making Doesn't involve complex decisions
Complexity More complex Relatively simpler
Position Performed at the network level Performed at each individual router

Difference between Static and Dynamic Routing

Routing is a vital communication mechanism that governs how data packets


travel from source to destination. Effective routing ensures that data is
transferred across networks in an efficient, reliable, and timely manner. There
are two main forms of routing: static and dynamic. In this article, we will
discuss the differences between static and dynamic routing.
What is Static Routing?
Static Routing is also known as non-adaptive routing which doesn’t change the
routing table unless the network administrator changes or modifies them
manually. Static routing does not use complex routing algorithms and It
provides higher or more security than dynamic routing.

Advantages of Static Routing


 No routing overhead for the router CPU which means a cheaper router can
be used to do routing.
 It adds security because only an only administrator can allow routing to
particular networks only.
 No bandwidth usage between routers.
Disadvantage of Static Routing
 For a large network, it is a hectic task for administrators to manually add
each route for the network in the routing table on each router.
 The administrator should have good knowledge of the topology. If a new
administrator comes, then he has to manually add each route so he should
have very good knowledge of the routes of the topology.
What is Dynamic Routing?
Dynamic routing is also known as adaptive routing which changes the routing
table according to the change in topology. Dynamic routing uses complex
routing algorithms and it does not provide high security like static routing.
When the network change(topology) occurs, it sends the message to the router
to ensure that changes then the routes are recalculated for sending updated
routing information.

Advantages of Dynamic Routing


 Easy to configure.
 More effective at selecting the best route to a destination remote network
and also for discovering remote networks.
Disadvantage of Dynamic Routing
 Consumes more bandwidth for communicating with other neighbors.
 Less secure than static routing.

Difference between Static and Dynamic Routing

Static Routing Dynamic Routing

In static routing routes are user- In dynamic routing, routes are


defined. updated according to the topology.

Static routing does not use Dynamic routing uses complex


complex routing algorithms. routing algorithms.

Static routing provides high or Dynamic routing provides less


more security. security.

Static routing is manual. Dynamic routing is automated.

Static routing is implemented in Dynamic routing is implemented in


small networks. large networks.

In static routing, additional In dynamic routing, additional


resources are not required. resources are required.
Static Routing Dynamic Routing

In static routing, failure of the link In dynamic routing, failure of the


disrupts the rerouting. link does not interrupt the rerouting.

Less Bandwidth is required in More Bandwidth is required in


Static Routing. Dynamic Routing.

Static Routing is difficult to Dynamic Routing is easy to


configure. configure.

Another name for static routing is Another name for dynamic routing
non-adaptive routing. is adaptive routing.

ROUTING ALGORITHMS
Understanding routing algorithms in computer networks is important for efficient
data transmission. These algorithms help find the best paths for data packets to
travel through networks.
Exploring these algorithms helps us understand how information moves quickly
and accurately in the digital world, making them essential tools in today's
networks.
Routing Algorithms in Computer Networks
To begin with, let us study the importance and example of routing algorithms in
computer networks:
Importance Of Routing Algorithms
Routing algorithms determine the path data takes within a computer network.
These algorithms ensure efficient and reliable data transmission throughout the
network. Understanding how routing decisions are made can significantly impact
how quickly and accurately data reaches its destination node.
Examples Of Routing Algorithms
One common example is the "shortest path" algorithm, where routers select the
most direct route to transmit data from the source to the destination. Another
technique is a "random walk," where routers randomly choose paths until
reaching the destination node successfully.
Classification Of Routing Algorithms
Let us study how the classification of routing algorithms is done:

Determining The Optimal Path


Routing algorithms in computer networks are categorized based on their method of
determining the optimal path. This classification is crucial for grasping each
algorithm's unique features and constraints.
By knowing these categories, network admins can choose the best routing
algorithm for their network.
Different routing algorithms utilize distinct approaches to find paths within a
network.
Common Classifications Based On Protocol
Distance vector algorithms such as RIP (Routing Information Protocol) calculate
routes based on the number of hops between nodes without considering other
metrics like traffic or speed.
On the other hand, link-state protocols like OSPF (Open Shortest Path First) build
an entire map of the network's topology before selecting paths based on various
criteria such as available bandwidth.

Adaptive Vs. Non-Adaptive Routing Algorithms


Let us study the differences and similarities between adaptive and non-adaptive
routing algorithms:
Adaptive Routing
Adaptive routing algorithms alter paths based on real-time network conditions.
They can reroute traffic dynamically, avoiding congested or faulty routes.
For example, an adaptive algorithm can redirect data through a less busy path if a
link becomes overloaded. Adaptive routing offers advantages such as improved
efficiency and fault tolerance.
These algorithms excel in networks with changing traffic patterns or unreliable
links. However, they might be complex to implement and require more processing
power.
Non-Adaptive Routing
Non-adaptive routing algorithms use fixed paths regardless of network changes.
Once a route is established, it remains unchanged until manually modified by the
administrator.
In contrast to adaptive algorithms that adjust to current conditions, non-adaptive
ones follow predetermined routes. The disadvantage of non-adaptive routing is its
inability to respond promptly to dynamic network situations.
While simpler and easier to manage than adaptive algorithms, they may lead to
suboptimal performance during periods of high congestion or failures.

You might also like