0% found this document useful (0 votes)
23 views6 pages

IP Routing Basics

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)
23 views6 pages

IP Routing Basics

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/ 6

5.

IP Routing Basics

1. Inter-Subnet Communication and IP Addressing


IP Address: It uniquely identifies a node (like a computer or network
device) on a network.

Each IP address is associated with a specific subnet, and these subnets


may be spread across different areas of a network or even globally.

Subnets and Communication: For different subnets to communicate,


network devices must forward IP packets between them. This is essential
for global networks where subnets are distributed widely.

2. Routes and Routing Devices


Routes: Routes are the paths or information that guide how packets should
be forwarded across a network.

Routing Devices: These are network devices, such as routers, that use
routing information to forward packets to the correct destination subnet.

IP Routing Table: Routers maintain a table (IP routing table) that stores all
the necessary routes and determines how packets are forwarded. It
includes information like the destination subnet, outbound interface, and
next-hop address.

3. Routing Information Components


A route contains several pieces of information:

Destination: Specifies the destination subnet.

Mask: Identifies the subnet when combined with the destination IP


address.

Outbound Interface: The router’s interface through which the packet will
exit.

Next Hop: The address of the next device the packet should be
forwarded to.

5. IP Routing Basics 1
4. IP Routing Table and Route-Based Forwarding
IP Routing Table: It’s a collection of routing entries that the router uses to
forward packets. The table contains only the best or optimal routes, not all
possible routes.

Route-Based Forwarding: When a router receives an IP packet, it looks at


the destination IP address and matches it to a route in its table to determine
the next hop and outbound interface.

5. Types of Routes
Direct Routes: Automatically generated by the router for subnets directly
connected to its interfaces. When an IP packet matches a direct route, the
router directly forwards the packet to the destination host using ARP entries
(Address Resolution Protocol) to resolve the MAC address.

Static Routes: Manually configured by network administrators for more


control over traffic paths.

Dynamic Routes: Learned through dynamic routing protocols like OSPF


(Open Shortest Path First), IS-IS (Intermediate System to Intermediate
System), or BGP (Border Gateway Protocol).

6. Optimal Route Selection


The router selects the optimal route based on the following:

Preference: Each routing protocol has a default preference value. A


lower value indicates a higher preference.

Cost (Metric): When multiple routes from the same protocol exist, the
router uses the route with the lowest cost as the optimal one.

For example, a static route may have a preference value of 60, while an
OSPF route may have a preference of 10. If both routes exist for the same
destination, the router will prefer the OSPF route due to its higher
preference (lower value).

7. Longest Matching Route Mechanism

5. IP Routing Basics 2
When a router receives an IP packet, it uses the longest matching
mechanism.

It compares the packet's destination IP address with all entries in the


routing table and selects the entry that matches the longest bit pattern.

This ensures that the router chooses the most specific route available for
forwarding.

8. Direct Route Details


Direct routes point to subnets that are directly connected to a router’s
interface.

When using a direct route, the router checks its ARP table to find the MAC
address corresponding to the destination IP address and forwards the
packet directly.

Not all direct routes are installed in the routing table; only those interfaces
that are physically and protocol-wise up are included.

9. Routing Table Fields


Each entry in the routing table includes:

Destination/Mask: Specifies the network address and subnet mask.

Protocol: Indicates the protocol that discovered the route (e.g., OSPF, BGP).

Preference: The preference value for selecting among routes from different
protocols.

Cost (Metric): The cost associated with the route for selecting among
routes from the same protocol.

Next Hop: The IP address of the next device to which the packet should be
forwarded.

Interface: The router’s outbound interface used to send the packet.

10. Default Routes


Definition: A default route is used when a router doesn’t have a specific
route for a destination in its IP routing table. It acts as a "catch-all" route for

5. IP Routing Basics 3
any IP packets that don’t match any other routing entries.

Format: The default route is represented as 0.0.0.0/0 in IPv4. It means that


if no other route matches, this route is used.

Application Scenarios: Default routes are typically used at the egress (exit)
points of networks, such as the edge routers of an enterprise network. For
instance, an egress router in an enterprise might have a default route
pointing to the ISP, allowing the router to forward traffic destined for any
external network.

11. Dynamic Routing Overview


Static Routes: These are manually configured and do not adapt
automatically to network changes. Any change in the network topology
requires manual updates, which is not feasible for large networks.

Dynamic Routing: Dynamic routing protocols automatically adjust to


changes in the network topology, making them suitable for networks with
many routers and subnets.

12. Classification of Dynamic Routing Protocols


Dynamic routing protocols are classified based on their algorithm and
application scope:

A. By Algorithm
Distance-Vector Routing Protocols: These use distance (hop count) and
direction (next hop) to determine the best route. Examples:

RIP (Routing Information Protocol): Uses hop count as the metric.

Link-State Routing Protocols: These maintain a map of the network’s


topology and determine the shortest path based on various metrics.
Examples:

OSPF (Open Shortest Path First)

IS-IS (Intermediate System to Intermediate System)

Path-Vector Protocol: BGP (Border Gateway Protocol) uses this algorithm.


It’s a modification of distance-vector and is used for inter-AS (Autonomous
System) routing.

5. IP Routing Basics 4
B. By Application Scope
Interior Gateway Protocols (IGPs): Operate within a single AS. Examples
include RIP, OSPF, and IS-IS.

Exterior Gateway Protocols (EGPs): Operate between different ASes. BGP


is the most commonly used EGP.

13. Advanced Routing Features


A. Route Recursion
Route recursion involves determining the next-hop address based on the
routing table until the final destination subnet is reached. It allows routers to
resolve a route recursively when it points to another route in the table.

B. Equal-Cost Multi-Path (ECMP) Routing


Equal-Cost Routes: When multiple routes to the same destination have the
same cost, routers can use all valid routes simultaneously to balance the
load across these paths. This is called load balancing and improves
network performance and redundancy.

C. Floating Routes
Floating Routes: These are backup routes that only become active when
the primary route fails. They are configured with a higher preference value
(lower priority) than the primary route.

5. Route Summarization and CIDR


A. CIDR (Classless Inter-Domain Routing)
Concept: CIDR uses variable-length subnet masks (VLSM) instead of the
fixed class-based addressing (Class A, B, C). CIDR allows more efficient
use of IP addresses and enables route summarization, reducing the number
of routing entries in the table.

Application: CIDR is used to group continuous IP addresses into


summarized routes, minimizing the IP routing table size.

B. Route Summarization

5. IP Routing Basics 5
Overview: It is a technique where specific routes with the same prefix are
aggregated into a single summarized route. This reduces the number of
entries in the routing table and improves device resource utilization.

Example: If a router has routes to 10.1.1.0/24 , 10.1.2.0/24 , and 10.1.3.0/24


with the same next hop, these routes can be summarized into one entry
(e.g., 10.1.0.0/22 ), reducing the table size.

6. Problems and Considerations in Route


Summarization
A. Routing Loops
Route summarization, if not done accurately, can cause routing loops.
Routing loops occur when packets are forwarded in circles due to incorrect
or ambiguous route information.

B. Black-Hole Routes
When summarizing routes, the router might use a Null0 interface as the
outbound interface. The Null0 interface is a logical interface that discards
packets, preventing them from being forwarded further. This is used to
prevent routing loops by acting as a "black hole" where packets are
dropped.

C. Accurate Route Summarization


To avoid issues like routing loops or traffic misdirection:

Ensure that the summary route covers only the intended specific routes
and does not include any unrelated routes.

Example: If summarizing routes from 172.16.1.0/24 to 172.16.31.0/24 ,


make sure the summarized route only includes these segments and not
extra ones.

By ensuring accurate summarization, you can optimize the routing table without
causing packet loss or misrouting.

5. IP Routing Basics 6

You might also like