Routing
Routing
network or system to another. It involves analyzing the various routes available, determining the most
efficient route, and forwarding the data or information accordingly. Routing is essential in network
communication as it helps to ensure that data or information gets to its destination quickly and reliably.
There are different types of routing protocols, including distance-vector protocols, link-state protocols,
and path-vector protocols, which are used to facilitate the routing process.
Distance vector routing is a type of routing algorithm in which routers exchange information about the
routes to their neighbors. Each router maintains a table containing the distance and direction to every
other router in the network, and periodically shares this information with its neighbors.
Distance vector routing works by using a distance metric, such as hop count or latency, to determine the
best path to a particular destination. Routers exchange information about their respective distances to
destinations and use that information to update their routing tables. The routers then use these tables to
forward data packets toward their destination.
Distance vector routing has some advantages, such as being simpler and requiring less computing power
than other routing algorithms. However, it also has some limitations, such as slower convergence times
and the possibility of routing loops. To address these issues, various enhancements have been
developed, such as split horizon, poison reverse, and triggered updates.
Link state routing is a type of routing algorithm that uses a detailed, up-to-date map of the entire
network to calculate the shortest path to a destination. Unlike distance vector routing, which relies on
exchanging information about routes with neighbors, link state routing creates a complete map, or "link
state," of the network. Each router then uses this map to calculate the shortest path independently.
Link state routers maintain three key pieces of information: the cost or weight of each link or path, a map
of all the nodes in the network and their connections, and the shortest path to each possible
destination. Routers periodically exchange information about their links with other routers using special
packets called Link State Advertisements (LSAs).
Using the collected LSAs from other routers, a router can build a picture that shows the whole network
to enable more informed routing decisions. By considering all possible paths, and with the
understanding of the costs associated with each, a router can choose the most efficient way to reach the
destination.
Link-state routing provides some benefits such as scalability, fast convergence times, and the avoidance
of routing loops. However, it can require significant resources to maintain the link-state database, and
the initial setup process can take more time compared to distance vector routing.
Path vector routing is a type of routing algorithm that is used to determine paths in complex networks
such as the Internet. It is a hybrid routing algorithm that combines aspects of distance vector routing and
link state routing. Path vector routing is also known as BGP, or Border Gateway Protocol, which is the
routing protocol used in the Internet.
Path vector routing works by sharing not only the next hop but also the entire path between any two
routers. Each router maintains a routing table that includes paths to destination networks, along with a
list of the Autonomous Systems (AS) it has passed through and the policy that should be applied to reach
the destination network.
The path vector routing protocol is used in large enterprise networks and the Internet, where scalability
is essential, and routing decisions need to be made based on various policies, such as security and
administrative policies. Path vector routing is used between border routers, which are specialized routers
located at the edge of the network that connect it to other networks.
Path vector routing provides more control over routing decisions, faster convergence times and
improved resilience to failures. As a result, it is used in mission-critical networks, where fast and reliable
communication is essential. However, it is more complex and requires more resources than other routing
algorithms and may result in issues such as routing loops or blackholes if the configuration is not set up
correctly.
The routing process involves forwarding data packets from one network to another network using
routers, which operate at layer 3 of the OSI model. Here's a step-by-step explanation of the routing
process:
1. The source device sends a data packet to another device on a different network.
2. The source device checks if the destination IP address is on the same network as its own IP address.
3. If the destination is on the same network, the packet is sent directly to the destination device. If not,
the packet is sent to the default gateway (router) of the source device.
4. The router receives the packet from the source device and checks the destination IP address of the
packet.
5. The router looks up its routing table to determine the best path to forward the packet to reach the
destination.
6. If the router knows the direct path to the destination network, it forwards the packet to the next
router in the path towards the destination. If not, it forwards the packet to the default gateway of the
next router.
7. The packet continues to be forwarded from router to router until it reaches the destination network.
8. Once the packet reaches the destination network, it is delivered to the destination device.
9. The destination device receives the packet and the data is processed and delivered to the application
layer.
Overall, the routing process involves determining the best path for a data packet to reach its destination
across the internet using routers and routing protocols. This process is critical for enabling
communication between devices on different networks.
Metrics are used in routing to determine the best path for forwarding packets between networks. Here
are explanations of some of the common metrics used in routing:
1. Hop count: This metric is simply the number of routers that a packet must traverse in order to
reach its destination. Routing protocols with lower hop count will be preferred because it
indicates less potential for latency, failure, or congestion.
2. Bandwidth: This metric refers to the amount of data a link can carry per unit time. With
bandwidth metrics, routers favor paths with high bandwidth because they permit faster
transmission rates and lower latency.
3. Delay: This metric quantifies how long it takes for a packet to traverse the network path from
source to destination and is measured in milliseconds. Routers will prefer paths with lower delay
because it reflects faster packet delivery.
4. Reliability: This metric measures the probability of a link or router failing, which could lead to
packet loss. Routers choose paths with high reliability to minimize the risk of lost packets.
5. Load: This metric measures the amount of traffic passing through a link or a router. Routers favor
paths with lower traffic loads to prevent packet loss and minimize latency.
Different routing protocols use different combinations of metrics to determine the best path for
forwarding packets. For example, the Routing Information Protocol (RIP) uses hop count, whereas the
Open Shortest Path First (OSPF) protocol uses bandwidth, delay, and hop count.
Distance vector multicast routing is a type of routing protocol used to determine the best path for
multicast traffic to reach its destination across a network. This protocol determines routes based on
distance vectors, which contain information about the distance to each destination and the next hop
router to reach each destination.
In distance vector multicast routing, each router maintains a routing table that includes the following
information:
- A list of neighboring routers to which the router can forward multicast traffic.
- The multicast group entries should also include the incoming interface used to receive traffic from the
source, and the outgoing interfaces to forward traffic towards the destinations.
Each router communicates with its neighboring routers to exchange information about multicast groups,
distances, and next hop routers using a multicast routing protocol such as the Internet Group
Management Protocol (IGMP). These updates allow the routers to modify their routing tables and make
better routing decisions to reduce the amount of multicast flooding and duplicate packets.
The distance vector multicast routing protocol uses the Bellman-Ford algorithm to calculate the best
path for multicast traffic. The routers periodically broadcast their multicast routing tables to their
neighboring routers, and each router uses this information to update its own routing table. The
algorithm ensures that the routers converge to the correct multicast forwarding topology quickly.
Examples of distance vector multicast routing protocols include Distance Vector Multicast Routing
Protocol (DVMRP) and Protocol Independent Multicast-Dense Mode (PIM-DM).
Distance Vector Multicast Routing Protocol (DVMRP) is a routing protocol used to route multicast traffic
across a network. It works by building multicast distribution trees based on a distance vector algorithm.
DVMRP is a multicast routing protocol that is based on the Routing Information Protocol version 2
(RIPv2).
1. Multicast groups: The source of a multicast data stream sends the data to a specific multicast
group address. The multicast group address is used to identify the destination of the data
stream.
2. Routers: The routers on the network exchange multicast routing tables using the DVMRP
protocol. Each router maintains a multicast routing table that contains information about
multicast groups and the best path to reach them.
3. Forwarding trees: DVMRP uses a shared tree or a source tree to forward multicast traffic. A
shared tree architecture uses a single unicast path to forward all multicast streams to all
multicast receivers. A source tree architecture uses a different path for each source of multicast
traffic.
4. Pruning: DVMRP allows routers to prune multicast trees to reduce the amount of traffic sent
over the network. Routers will prune branches of the multicast tree that do not have any
receivers.
2. Router at the source adds the multicast group address to its multicast routing table.
3. Router at the source floods the multicast data to all connected networks.
4. Routers receiving the data adds the source of the multicast stream to their multicast routing table.
5. Routers on the network use the multicast routing table to forward data to other networks that have
receivers.
6. Routers prune branches of the multicast tree that do not have any active receivers.
DVMRP is used primarily in small to medium-sized networks and is not widely used in large-scale
networks due to its scalability issues. It’s also important to note that DVMRP is primarily used in IPv4
networks and is not supported in IPv6 networks, which use other protocols such as PIM-SM.
Protocol Independent Multicast (PIM) is a multicast routing protocol designed to efficiently route
multicast traffic across a network. PIM works by building a multicast distribution tree using a multicast
setup protocol, where source and receivers for a multicast group are located in multiple subnets or
networks.
PIM is also a multicast routing protocol that can be classified into three modes of operation:
1. PIM Sparse Mode (PIM-SM): PIM-SM multicast distribution tree is built on-demand, based on
the distribution of active multicast sources and receivers. The router builds the shortest path
tree (SPT) whenever a multicast data stream initiates from a source. Once the tree is built,
multicast traffic is optimized onto the shortest path (SPT-pruning) towards the receivers by the
network. PIM-SM is used in large-scale networks and is scalable.
2. PIM Dense Mode (PIM-DM): PIM-DM floods multicast data from the source throughout the
network, and then prune the distribution tree to remove branches without receivers. It is
suitable for small dense networks where bandwidth is not an issue. PIM-DM is built on top of
the Distance-Vector Multicast Routing Protocol (DVMRP).
2. The first-hop router forwards the multicast data to all connected links. If another router receives
the multicast data stream, it adds the source and multicast group IP to its multicast routing
table.
3. PIM routers on the network then exchange information about multicast sources and receivers
using a multicast setup protocol such as Bootstrap Router (BSR) protocol or Auto-Rendezvous
Point (RP) or using static configuration.
4. The information is used to create a multicast distribution tree, which represents the most
efficient path for multicast traffic to reach all receivers.
5. The multicast distribution tree is pruned to remove branches without receivers, reducing the
amount of multicast traffic on the network.
6. PIM routers optimize the multicast traffic path using the shared Shortest Path Tree (SPT) or the
Source Tree.
PIM supports both shared trees and source trees in constructing the multicast distribution tree. It
dynamically adjusts the size of the distribution tree based on changes of multicast sources and receivers
in the network. The protocol does not depend on a specific Layer 2 (L2) network topology, like IGMP, and
can work with both dense and sparse multicast environments, depending on the mode of operation
used.
IPv6 (Internet Protocol version 6) is the successor to IPv4, the standard protocol for internet
communication. IPv6 was created to address the shortcomings of IPv4, including a limited number of
available IP addresses and the increased demand for devices to be connected to the internet.
IPv6 uses a 128-bit address space, which provides significantly more addresses than IPv4’s 32-bit address
space. This allows for a virtually unlimited number of devices to be connected to the internet.
Some features of IPv6 include:
1. Larger Address Space: As mentioned, IPv6 uses a 128-bit address space compared to IPv4’s 32-
bit address space. This provides approximately 340 undecillion addresses, which is more than
enough for every device on the planet to have its own unique IP address.
2. Simplified Header: IPv6 has a simpler header than IPv4, which increases efficiency. This is
because most of the optional fields in the IPv4 header have been removed.
4. Improved Security: IPv6 includes built-in support for IPsec, which provides better security than
IPv4. This ensures that all communication between devices is encrypted, providing better privacy
and preventing unauthorized access.
5. Quality of Service (QoS): IPv6 includes support for QoS, which is used to prioritize network traffic
based on its importance. This helps to ensure that critical data, such as voice and video, are
given priority over less critical data.
6. Mobility: IPv6 includes built-in support for mobile devices, making it easier for them to connect
to the internet. This includes features such as Mobile IPv6, which allows a mobile device to
maintain its IP address even when moving to a different network.
In summary, IPv6 is the successor to IPv4 and is designed to provide more IP addresses, improve
efficiency, increase security, and support mobile devices. It is essential for the continued growth and
development of the internet.