0% found this document useful (0 votes)
8 views29 pages

Routing All Concepts

This document covers the fundamentals of routing, including the components of routing tables, types of protocols, and the route selection process. It distinguishes between classful and classless routing protocols, highlighting their differences in handling subnet masks and routing updates. Key takeaways emphasize the importance of administrative distance, metrics, and the implications of using classful protocols in non-contiguous networks.

Uploaded by

Sipho Mofokeng
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)
8 views29 pages

Routing All Concepts

This document covers the fundamentals of routing, including the components of routing tables, types of protocols, and the route selection process. It distinguishes between classful and classless routing protocols, highlighting their differences in handling subnet masks and routing updates. Key takeaways emphasize the importance of administrative distance, metrics, and the implications of using classful protocols in non-contiguous networks.

Uploaded by

Sipho Mofokeng
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/ 29

ROUTING PART-1

Routing Table Basics 🚦


Routing is the process of forwarding packets between networks, using routing tables to determine the
best path.

Routing Table Components 📜


Destination Network & Subnet Mask
Next-Hop Router
Routing Metrics & Administrative Distance

Types of Protocols 🔗
Routed Protocols (L3 protocols that assign logical addresses): 🏷️
IP, IPX
Routing Protocols (Build routing tables dynamically): 🔄
RIP, IGRP, OSPF

Route Selection Process 📌


1️⃣ Prefix-Length (Longest Match First)
2️⃣ Metric (Best Path Within the Same Protocol)
3️⃣ Administrative Distance (Best Protocol When Multiple Exist)
📍 Example: If trying to reach 10.1.5.2/24, the router selects the most specific route:
✅ 10.1.5.0/24 (Preferred)
❌ 10.0.0.0/8
Administrative Distance vs. Metric ⚖️

Metric: Determines best route within a routing protocol (e.g., hop count in RIP, cost in OSPF).
Administrative Distance (AD): Determines best routing protocol when multiple provide the same
route (Lowest AD Wins).

Common Administrative Distances 📊


Protocol AD Value

🔗 Connected 0
🔧 Static 1

🏆 EIGRP Summary 5

🌍 External BGP 20

⚡ Internal EIGRP 90

📡 IGRP 100
🔄 OSPF 110

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 1/29
Protocol AD Value

🗺️ IS-IS 115

🔁 RIP 120
🏁 External EIGRP 170

🔄 Internal BGP 200

❓ Unknown 255 (Never Used)

💡 Key Takeaways:
Routers prefer more specific routes (longest prefix match).
Lower Administrative Distance means a more trusted route.
Metrics decide the best route within a single protocol.
Equal-cost routes can be load-balanced.

Viewing the Routing Table 🖥️


The routing table stores the active routes used by the router. You can view it using:

📌 Command:
bash

`Router# show ip route


`

Sample Output & Route Types 📜


nginx

`Gateway of last resort is 192.168.1.1 to network 0.0.0.0


C 192.168.1.0/24 is directly connected, Ethernet0
C 150.50.200.0 is directly connected, Loopback1
C 192.168.123.0 is directly connected, Serial0
R 10.0.0.0 [120/1] via 192.168.123.1, Serial0
S* 0.0.0.0/0 [1/0] via 192.168.1.1
`

Routing Protocol Labels 🏷️


🟢 C – Directly connected
🛠️ S – Static
🌍 S* – Default route
⚡ D – EIGRP
🔁 R – RIP
🔄 I – IGRP
📡 i – IS-IS
🔄 O – OSPF
Interpreting RIP Route Fields 🔍
Example: R 10.0.0.0 [120/1] via 192.168.123.1, Serial0

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 2/29
120 = Administrative Distance (AD)
1 = Metric (Hop Count)

Clearing the Routing Table 🧹


📌 Command:
bash

`Router# clear ip route *


`

This forces the routing protocols to repopulate the table.


💡 Key Takeaways:
The "show ip route" command displays the router's active routes.
Routes are categorized based on how they were learned.
RIP routes show AD and metric values.
Clearing routes forces a re-learn of the network paths.

Choosing the Best Route (Example) 🛣️


When multiple routes exist for a destination, the router selects the best route using three key criteria:

Selection Criteria 🎯
1️⃣ Prefix-Length (Most Specific Route Wins)
2️⃣ Metric (Lowest Within the Same Protocol Wins)
3️⃣ Administrative Distance (Lowest Across Protocols Wins)
Example Scenario: Routing to 192.168.111.5/24

Route Protocol AD Metric Next-Hop Interface

O 192.168.111.0/24 OSPF 110 58 192.168.131.1 Serial3


R 192.168.111.0/24 RIP 120 1 192.168.123.1 Serial0
R 192.168.111.0/24 RIP 120 5 192.168.5.2 Serial1
S 192.168.0.0/16 Static 1 0 10.1.1.1 N/A

Route Selection Process 🔍


✅ Step 1: Prefix-Length First
192.168.111.0/24 (OSPF & RIP) is more specific than 192.168.0.0/16 (Static).
Static route is ignored despite its lowest AD.

✅ Step 2: Metric Within RIP


RIP route with metric 5 is ignored in favor of metric 1.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 3/29
✅ Step 3: Administrative Distance (Lowest Wins)
OSPF (AD 110) is preferred over RIP (AD 120).

Final Selected Route ✅


OSPF route (192.168.111.0/24 via 192.168.131.1, Serial3) is chosen.

Key Takeaways 💡
Prefix-length (specificity) is always checked first.
Within a routing protocol, the best metric route is chosen.
Across different protocols, the lowest AD is preferred.
AD is only considered if prefix-length is the same.

Classful vs. Classless Routing Protocols 🌐


Routing protocols handle subnet masks differently, impacting how routers interpret network routes.

Classful Routing Protocols 🚦


🔹 Do not send subnet masks in routing updates.
🔹 A router makes decisions based on the major network:
If an interface exists in the same major network, it applies that interface's subnet mask.
If no interface belongs to the same major network, it uses the default classful subnet mask (A:
/8, B: /16, C: /24).
🔹 Subnet mask must remain consistent across the network.
🔹 Examples of major networks:
✅ Same Network: 10.3.1.0 & 10.5.5.0 → (Major Network: 10.0.0.0)
❌ Different Network: 10.1.4.5 & 11.1.4.4 → (Different major networks)

Classless Routing Protocols 🚀


✅ Send subnet mask information with routing updates.
✅ Support VLSM (Variable Length Subnet Masking), allowing different subnet sizes.
✅ Prevents misinterpretation of subnet masks.
✅ More efficient IP address utilization.
Example Scenario 📌

📡 Router B sends 10.2.0.0 to Router A using a classful protocol


If Router A has an interface in 10.0.0.0, it applies that interface's subnet mask (e.g., /16).
If Router A lacks an interface in 10.0.0.0, it assumes /8.

🔴 Potential Issue: If incorrect assumptions are made, routing errors can occur.
Diagram 🖥️
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 4/29
lua

`+------------+ +------------+
| Router A | <---> | Router B |
+------------+ +------------+
(10.4.0.0/16) (10.2.0.0)
`

Router B does not send the subnet mask.


Router A assumes a /16 mask (if 10.4.0.0 exists) or /8 (if no direct 10.0.0.0 interface).

Key Takeaways 💡
✅ Classful protocols: Do not send subnet masks, assume defaults.
✅ Classless protocols: Include subnet masks, support VLSM.
✅ Classful routing requires consistent subnet masks across networks.
✅ Using classless protocols (like OSPF, EIGRP) avoids misinterpretation.

Classful vs. Classless Routing Protocols (Continued) 🌍


Classful Routing Protocols 🚦
🔹 Do not send subnet masks in routing updates.
🔹 Do not support VLSM (Variable Length Subnet Masking).
🔹 Examples: RIPv1, IGRP.
🔹 Assume default classful subnet masks (A: /8, B: /16, C: /24).
Classless Routing Protocols 🚀

✅ Send subnet masks with routing updates.


✅ Support VLSM, allowing different subnet sizes.
✅ Examples: RIPv2, EIGRP, OSPF, IS-IS.
✅ More efficient IP utilization and prevents subnet misinterpretation.
IP Classless Command 🛠️
🔹 Routers can operate in classful or classless mode.
🔹 Classful mode (default in older IOS versions):
Drops packets if the destination is an unknown subnet of a known major network.
Ignores the default route in such cases.
Enable classful mode:

arduino

`Router(config)# no ip classless
`

🔹 Classless mode (default in IOS 12.0+):


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 5/29
Uses the default route if no matching subnet is found.
Ensures better network reachability.
Enable classless mode:

arduino

`Router(config)# ip classless
`

Key Takeaways 💡
✅ Classful routing does not support VLSM, while classless does.
✅ Classful routers may drop packets to unknown subnets, even with a default route.
✅ Classless mode (default in modern IOS) ensures better routing efficiency.
✅ Always use classless routing protocols for more flexible subnetting and scalability.

Limitations of Classful Routing (Example) 🚦


Classful Routing Issue Using RIPv1

🔹 Classful routing protocols (e.g., RIPv1) do not send subnet masks in updates.
🔹 Subnet masks are inferred based on the receiving interface.
🔹 Works only if subnets are contiguous and use the same mask.
🔹 Issues arise when networks are non-contiguous, causing incorrect summarization.
Example 1: Working Scenario ✅
✔ Networks are contiguous (10.1.0.0, 10.2.0.0, 10.3.0.0, etc.).
✔ All routers infer the correct subnet mask based on directly connected interfaces.
Router B's Routing Table Output:

shell

`RouterB# show ip route


Gateway of last resort is not set

10.0.0.0/16 is subnetted, 4 subnets


C 10.3.0.0 is directly connected, Serial0
C 10.4.0.0 is directly connected, Serial1
R 10.1.0.0 [120/1] via 10.3.5.1, 00:00:00, Serial0
R 10.2.0.0 [120/1] via 10.4.5.1, 00:00:00, Serial1
`

Example 2: Problematic Scenario ❌


🔴 Non-contiguous networks exist (192.168.123.0 and 192.168.111.0).
🔴 Router A and Router C consider themselves "border routers".
🔴 They summarize their subnets to 10.0.0.0/8 instead of 10.x.x.x.
🔴 Router B receives two summarized 10.0.0.0/8 routes, causing misrouting.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 6/29
Commands to Troubleshoot & Fix Issues 🛠️
1️⃣ View the Routing Table:
shell

`Router# show ip route


`

2️⃣ Enable Classless Routing (Prevents Incorrect Summarization):


shell

`Router(config)# ip classless
`

3️⃣ Upgrade to a Classless Routing Protocol (e.g., RIPv2, OSPF, or EIGRP):


shell

`Router(config)# router rip


Router(config-router)# version 2
Router(config-router)# no auto-summary
`

Diagram: Classful Routing Issue 🔍


🔹 Working Classful Scenario ✅
css

` [Router A] ---- 10.1.0.0/16 ---- [Router B] ---- 10.2.0.0/16 ---- [Router C]


`

✔ All networks belong to 10.0.0.0 major network


✔ Subnet masks are correctly inferred
🔴 Problematic Scenario ❌
less

` [Router A] ---- 10.1.0.0/16 ---- [Router B] ---- 10.2.0.0/16 ---- [Router C]


| |
192.168.123.0 192.168.111.0
`

🔴 10.1.0.0 and 10.2.0.0 are now separated by different major networks


🔴 Router A and Router C summarize to 10.0.0.0/8, causing incorrect routing
Key Takeaways 💡
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 7/29
✅ Classful routing works only with contiguous subnets.
✅ If non-contiguous subnets exist, classful protocols summarize incorrectly.
✅ Enable classless routing ( ) to prevent misrouting.
✅ Use RIPv2 or another classless routing protocol to ensure accurate updates.
`ip classless`

Limitations of Classful Routing (Example) 🚦


Issue: Incorrect Summarization & Load Balancing 🔄
🔹 Router B receives two equal-cost routes to 10.0.0.0/8 (via Router A & Router C).
🔹 Router B incorrectly load balances traffic between both paths.
🔹 Traffic to specific 10.x.x.x subnets may be misrouted.
Routing Table at Router B 🖥️

shell

`RouterB# show ip route


Gateway of last resort is not set
C 192.168.123.0 is directly connected, Serial0
C 192.168.111.0 is directly connected, Serial1
R 10.0.0.0 [120/1] via 192.168.123.1, 00:00:00, Serial0
[120/1] via 192.168.111.2, 00:00:00, Serial1
`

🔴 Router B now load balances between two incorrect summary routes.


Problem: Router A & C Reject Incorrect Summary Route ❌
🔹 Router B sends the incorrect summary route (10.0.0.0/8) to Router A & Router C.
🔹 Router A & C reject this route, as they already have directly connected 10.x.x.x subnets.
🔹 Result: The 10.1.0.0/16 and 10.2.0.0/16 networks cannot communicate.
Routing Table at Router A 🖥️

shell

`RouterA# show ip route


Gateway of last resort is not set
C 192.168.123.0 is directly connected, Serial0
10.0.0.0/16 is subnetted, 1 subnet
C 10.1.0.0 is directly connected, Ethernet0
`

🔴 Router A rejects the incorrect 10.0.0.0/8 summary route from Router B.


🔴 Same behavior happens at Router C.
Key Takeaways 💡
✅ Classful routing (e.g., RIPv1) causes incorrect summarization issues.
✅ Routers may mistakenly load balance traffic across incorrect paths.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 8/29
✅ Directly connected routes cause rejection of summarized routes, leading to network failures.
✅ Solution: Use a classless routing protocol (e.g., RIPv2, OSPF, or EIGRP).
✅ Disable auto-summarization:
shell

`Router(config)# router rip


Router(config-router)# version 2
Router(config-router)# no auto-summary
`

Static vs. Dynamic Routing 🛤️


1️⃣ Static Routing 🏗️ (Manual Configuration)
✔ Manually configured by an administrator.
✔ No automatic updates—must be changed manually when network topology changes.
✔ Low resource usage (CPU, RAM, and bandwidth).
✔ More secure (not shared with other routers).
✔ Not fault-tolerant—if a link fails, manual intervention is required.
✔ Administrative Distance (AD) = 1, always preferred unless adjusted (floating static route).
🔹 Example Command (Static Route):
shell

`Router(config)# ip route 192.168.2.0 255.255.255.0 10.1.1.2


`

2️⃣ Dynamic Routing 🔄 (Automated Learning)


✔ Routers exchange routing information automatically.
✔ Self-updating—adjusts to network topology changes.
✔ Uses CPU, RAM, and bandwidth for updates.
✔ Supports multiple paths—can find an alternate route if a link fails.
✔ Examples of dynamic routing protocols:
RIP (Routing Information Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
OSPF (Open Shortest Path First)

🔹 Example Command (Enabling RIP):


shell

`Router(config)# router rip


Router(config-router)# network 192.168.1.0
Router(config-router)# network 192.168.2.0
`

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 9/29
Key Difference: Routing Protocols vs. Routed Protocols

📌 Routed Protocols (Layer 3): Assign logical addresses & enable communication (e.g., IP).
📌 Routing Protocols: Build & maintain routing tables (e.g., RIP, OSPF, EIGRP).
🛠️ When to Use What?
✅ Use Static Routing for small networks or specific, secure routes.
✅ Use Dynamic Routing for large, complex, and scalable networks.
✅ Combine both using floating static routes for backup paths.

Static vs. Dynamic Routing: Pros & Cons 🚦


🔹 Static Routing
✔ Advantages:
✅ Low CPU & Memory Usage – No processing overhead.
✅ No Bandwidth Usage – No routing updates sent.
✅ Granular Traffic Control – Admin decides routing paths.
❌ Disadvantages:
❌ Manual Configuration – Every change requires manual updates.
❌ No Fault Tolerance – If a link fails, no automatic rerouting.
❌ Not Scalable – Becomes impractical in large networks.
📌 Best For: Small, stable networks or specific routes where security is a priority.
🔹 Dynamic Routing
✔ Advantages:
✅ Easier for Large Networks – Automatically updates routes.
✅ Fault Tolerance – Can reroute traffic if a link fails.
✅ Supports Load Balancing – Distributes traffic over multiple paths.
❌ Disadvantages:
❌ Consumes Bandwidth – Routing updates are shared between routers.
❌ Higher CPU & RAM Usage – Requires processing power.
❌ Less Admin Control – Routing protocol decides the best path.
📌 Best For: Large, complex, and scalable networks requiring automatic routing updates.
🔍 Choosing Between Static & Dynamic Routing
✅ Use Static Routing for small networks with fixed paths.
✅ Use Dynamic Routing for large, scalable networks with frequent changes.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 10/29
✅ Combine Both using floating static routes for redundancy.

Dynamic Routing Categories 🛤️


Dynamic routing protocols are categorized into:
1️⃣
Distance-Vector Protocols (RIP, IGRP)
2️⃣ Link-State Protocols (OSPF, IS-IS)
🔹 EIGRP is a hybrid protocol with both characteristics.
📌 Distance-Vector Routing Protocols
✔ Key Characteristics:
🔄 Periodic Updates – Sends the entire routing table at intervals.
🐌 Slow Convergence – Takes longer to adapt to network changes.
🔁 Prone to Routing Loops – Trusts neighbors blindly ("routing by rumor").
🔢 Metric Calculation: Uses a distance-based metric.
📏 Bellman-Ford Algorithm – Determines the shortest path.
✔ How It Works:
1️⃣ A router advertises directly connected networks to its neighbors.
2️⃣ Neighbors add received routes to their tables.
3️⃣ Full routing tables are forwarded periodically (e.g., RIP = every 30s, IGRP = every 90s).
4️⃣ Routers depend on neighbors’ updates without independent verification.
✔ Disadvantages:
🕒 Slow Convergence – Takes time to stabilize after network changes.
🔄 Routing Loops – Can create infinite loops due to outdated updates.
📡 High Bandwidth Usage – Full routing table is sent frequently.
✔ Metrics Used:
RIP: Hop Count 🚏
IGRP: Bandwidth + Delay ⚡

📌 Best For: Small networks with simple topologies.

Link-State Routing Protocols 🌐


Link-state protocols address the convergence and loop issues of distance-vector protocols. They
maintain three separate tables:

1. Neighbor Table: Lists all neighbors and the interfaces they are connected to.
2. Topology Table: Stores a map of all links in the area, with each link's status.
3. Shortest-Path Table (Routing Table): Stores the best route to each destination.

📌 Key Features of Link-State Protocols


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 11/29
✔ Routing Information:
Routers send updates advertising the state of their directly connected links.
All routers within the same area share identical topology tables.

✔ How it Works:
1️⃣ Link-State Advertisements (LSAs): When the state of a link changes (e.g., interface failure), only the
change is advertised to all routers.
2️⃣ Topology Table: Contains information about every link's state.
3️⃣ Shortest-Path Table: Stores the best path to each destination, calculated using Dijkstra's
algorithm.
✔ Advantages:
⚡ Fast Convergence: Routers update quickly in response to changes.
🔄 No Routing Loops: Because all routers have the same topology table, loops are prevented.
📉 Efficient Bandwidth Usage: Only the changes to links are sent, reducing bandwidth
consumption.

✔ Disadvantages:
🧠 Higher Resource Usage: Requires more CPU and RAM due to maintaining three tables.
✔ Metric:
Typically based on bandwidth (lower cost = better route).

📌 Best For: Larger networks with complex topologies requiring quick adaptation and efficient routing.

Configuring Static Routes 🔧


Static routes are manually configured routes used to specify the path to a destination network. Here's
how you configure basic and advanced static routes:

📌 Basic Static Route Configuration


The syntax for a static route is:
`Router(config)# ip route [destination_network] [subnet_mask] [next-hop]`

Example:

RouterA adding a static route to 172.18.0.0/16 via RouterB:

bash

`RouterA(config)# ip route 172.18.0.0 255.255.0.0 172.17.1.2


`

RouterB adding a static route to 172.16.0.0/16 via RouterA:

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 12/29
bash

`RouterB(config)# ip route 172.16.0.0 255.255.0.0 172.17.1.1


`

Removing a static route:

bash

`RouterA(config)# no ip route 172.18.0.0 255.255.0.0 172.17.1.2


`

Using Exit-Interface for Point-to-Point Links:

RouterA routing to 172.18.0.0/16 via fa0/1:

bash

`RouterA(config)# ip route 172.18.0.0 255.255.0.0 fa0/1


`

RouterB routing to 172.16.0.0/16 via fa0/0:

bash

`RouterB(config)# ip route 172.16.0.0 255.255.0.0 fa0/0


`

📌 Advanced Static Routes


Floating Static Route:
Change the Administrative Distance (AD) to create a backup route (used only if there are no
other routes with a lesser AD).
Example (AD 250):

bash

`RouterA(config)# ip route 172.18.0.0 255.255.0.0 172.17.1.2 250


`

Permanent Static Route:


Ensure the static route remains in the routing table, even if the next-hop interface goes down:

bash

`RouterA(config)# ip route 172.18.0.0 255.255.0.0 172.17.1.2 permanent


`

Discarding Traffic:
Direct traffic to a null interface to discard it:

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 13/29
bash

`RouterA(config)# ip route 10.0.0.0 255.0.0.0 null0


`

📌 Default Routes
A default route (gateway of last resort) forwards traffic to unknown destinations.

To configure a default route:

bash

`RouterA(config)# ip route 0.0.0.0 0.0.0.0 172.17.1.2


`

This is used when no specific route is available for a destination network.

⚙️ Summary
Static routes offer granular control and low overhead but lack fault tolerance.
They can be configured with specific next-hop IPs or exit interfaces.
Advanced options like floating static routes, permanent routes, and discard routes provide
flexibility.

RIP (Routing Information Protocol) 🌐


RIP is a Distance Vector routing protocol used primarily on smaller networks. It is one of the oldest
routing protocols, supporting both IP and IPX routing. Below are the key features and characteristics:

📌 Key Features of RIP:


Distance Vector Protocol:
RIP is a classic Distance Vector protocol, meaning it uses the Bellman-Ford algorithm to determine
the best route based on a distance metric (hopcount).

Periodic Updates:
RIP sends full routing table updates every 30 seconds.
Metric:
RIP uses hopcount as its metric. The maximum hopcount is 15, and a route with a hopcount of 16
is considered unreachable (infinity metric).
Load Balancing:
RIP supports load balancing across multiple paths (up to 4 paths) with the same hopcount, though
this can lead to congestion on slower links due to equal traffic distribution.
UDP Port 520:
RIP operates on UDP port 520.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 14/29
📌 RIP Characteristics:
Routing Protocol Type: Distance Vector
Administrative Distance: 120 (higher than static and most dynamic protocols)
Maximum Hopcount: 15 hops (anything greater is unreachable)
Protocols Supported: IP and IPX routing
Convergence: RIP can experience slow convergence due to its periodic full-table updates.
Load Balancing Limitation: It can load balance only when the hopcount is equal, which can lead
to performance issues (e.g., slower links congesting faster links in equal metric cases).

⚙️ Summary
RIP is best for smaller networks due to its simplicity but limited scalability.
Its periodic updates, hopcount-based metric, and maximum hopcount of 15 limit its effectiveness
in larger, more complex networks.

RIP Versions (RIPv1 vs RIPv2) 🔄


RIP has two main versions: RIPv1 and RIPv2, each with key differences in functionality and support for
advanced features.

📌 RIPv1 (Version 1):


Classful: Does not include subnet mask in updates; doesn't support Variable Length Subnet Masks
(VLSMs).
Network Contiguity: Networks must be contiguous and have the same subnet mask across
subnets of a major network.
Broadcast Updates: Sends updates via broadcast (255.255.255.255).
Limitations: Unable to support discontiguous networks due to lack of subnet mask information in
updates.

📌 RIPv2 (Version 2):


Classless: Includes subnet mask in updates, fully supporting VLSMs (allowing discontiguous
networks).
Multicast Updates: Sends updates via multicast (224.0.0.9), reducing network overhead.
Enhanced Features:
Supports encrypted authentication between routers.
Allows route tagging.
Interoperability with RIPv1:
RIPv1 routers send only RIPv1 packets but can receive both RIPv1 and RIPv2.
RIPv2 routers send and receive only RIPv2 packets.

📌 Key Differences:
RIPv1: Classful, broadcasts updates, lacks VLSM support.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 15/29
RIPv2: Classless, multicast updates, supports VLSMs, and additional security features
(authentication).

⚙️ Configuration Note
By default, Cisco devices use RIPv1 unless RIPv2 is manually configured.

RIPv1 Basic Configuration 🛠️


Configuring RIP on Cisco routers involves enabling the RIP process and specifying which networks to
advertise. Here’s a step-by-step guide:

📌 Configuration Steps on Router A:


1. Enable RIP Routing Protocol:

bash

`Router(config)# router rip


`

2. Advertise Networks: Specify the directly connected networks (using classful network boundaries,
no subnet mask):

bash

`Router(config-router)# network 172.16.0.0


Router(config-router)# network 172.17.0.0
`

📌 Configuration Steps on Router B:


1. Enable RIP Routing Protocol:

bash

`Router(config)# router rip


`

2. Advertise Networks:

bash

`Router(config-router)# network 172.17.0.0


Router(config-router)# network 172.18.0.0
`

📊 Routing Table Example:


Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 16/29
Router A’s Routing Table:

bash

`RouterA# show ip route


C 172.16.0.0 is directly connected, Ethernet0
C 172.17.0.0 is directly connected, Serial0
R 172.18.0.0 [120/1] via 172.17.1.2, 00:00:00, Serial0
`

Router B’s Routing Table:

bash

`RouterB# show ip route


C 172.17.0.0 is directly connected, Serial0
C 172.18.0.0 is directly connected, Ethernet0
R 172.16.0.0 [120/1] via 172.17.1.1, 00:00:00, Serial0
`

📌 Key Points:
`router rip`:Enables RIP routing protocol.
`network [network address]`: Specifies which directly connected networks to advertise.
Classful routing: RIP advertises networks based on classful boundaries (no subnet mask).

Limitations of RIPv1 🚫
RIPv1 has limitations due to its classful nature, which restricts its ability to handle non-contiguous
subnets and lack of subnet mask information in routing updates. Below is a summary of these
limitations.

📌 Issue 1: Contiguous Subnets Example


In cases where networks are contiguous and use the same subnet mask, RIPv1 can still work
despite subnetting.
RIPv1 does not include the subnet mask in updates, so it relies on the classful network
boundaries.

Example:

Router A sends a routing update for `10.1.0.0`, and Router B applies the subnet mask of its
directly connected interface to interpret the route. This works as long as the networks are
contiguous.

📌 Issue 2: Non-Contiguous Subnets


When networks are no longer contiguous, such as when they are separated by different subnets
(e.g., `10.1.0.0` and `10.2.0.0` separated by `192.168.123.0`), RIPv1 has issues.
RIPv1 summarizes routes to the classful boundaries, leading to inaccurate routing information.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 17/29
Example:

Router A sends a summarized route `10.0.0.0/8` to Router B because it considers itself a border
router (since `10.1.0.0` and `192.168.123.0` don’t belong to the same classful network).
Router B receives the `10.0.0.0` route without knowing the exact subnet mask, leading to the
inaccurate installation of routes.

📌 Routing Table Example on Router B:


bash

`RouterB# show ip route


Gateway of last resort is not set
10.0.0.0/16 is subnetted, 4 subnets
C 10.3.0.0 is directly connected, Serial0
C 10.4.0.0 is directly connected, Serial1
R 10.1.0.0 [120/1] via 10.3.5.1, 00:00:00, Serial0
R 10.2.0.0 [120/1] via 10.4.5.1, 00:00:00, Serial1
`

📌 Key Limitations of RIPv1:


Classful Routing: Does not support VLSM (Variable Length Subnet Masking).
No Subnet Mask: RIPv1 does not send subnet masks in its updates.
Route Summarization: Automatically summarizes routes to classful boundaries, which can cause
routing issues.
Inability to Handle Non-Contiguous Networks: Causes problems when networks are separated
by different subnets.

📊 Diagram:
The below diagram shows how RIP v1 would summarize routes:

plaintext

` Router A Router B Router C


| | |
10.1.0.0/16 10.0.0.0/8 10.2.0.0/16
(Directly (Summarized) (Summarized)
Connected) to Classful
Boundary
`

💡 Note: In this scenario, Router A and Router C send summarized `10.0.0.0/8` routes to Router B,
which leads to incorrect route installation.

Limitations of RIPv1 (continued) 🚫


As the RIPv1 routing table updates continue, several issues arise, particularly when handling
summarized routes and load balancing.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 18/29
📌 Routing Table Updates and Load Balancing
Router B’s Routing Table after receiving the summarized `10.0.0.0/8` route:
Router B installs two equal-metric routes for `10.0.0.0`, one via Router A and the other via
Router C.
Load balancing occurs, where Router B splits traffic evenly between these two routes, even
though they lead to the same summarized network, causing inefficiency and congestion.

Example:

bash

`RouterB# show ip route


Gateway of last resort is not set
C 192.168.123.0 is directly connected, Serial0
C 192.168.111.0 is directly connected, Serial1
R 10.0.0.0 [120/1] via 192.168.123.1, 00:00:00, Serial0
[120/1] via 192.168.111.2, 00:00:00, Serial1
`

📌 Communication Breakdown Between Routers A and C


Router A and Router C receive the summarized `10.0.0.0/8` route from Router B.
Since they already have more specific routes (such as `10.1.0.0/16` and `10.2.0.0/16`), they
reject the summarized route.
As a result, communication is broken for networks `10.1.0.0` and `10.2.0.0` between Router A
and Router C.

Router A’s Routing Table Example:

bash

`RouterA# show ip route


Gateway of last resort is not set
C 192.168.123.0 is directly connected, Serial0
10.0.0.0/16 is subnetted, 1 subnet
C 10.1.0.0 is directly connected, Ethernet0
`

📌 Key Issues with RIPv1:


Load Balancing Problem: Equal-metric routes to the same summarized network lead to inefficient
load balancing, causing network congestion.
Route Rejection: Routers that have specific routes will reject summarized routes, preventing
communication between networks (e.g., `10.1.0.0/16` and `10.2.0.0/16`).
Classful Summarization: The automatic summarization at classful boundaries results in broken
communications and inefficient routing.

💡 Solution Tip: Consider upgrading to RIPv2 to handle VLSM and more accurate route
summarization, avoiding these issues.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 19/29
RIPv2 Configuration 🔧
RIPv2 overcomes the limitations of RIPv1 by supporting classless routing, which includes the subnet
mask in routing updates.

📌 Steps to Configure RIPv2:


1. Enable RIPv2 on the router:
Enter the global configuration mode and enable RIP version 2:

bash

`Router(config)# router rip


Router(config-router)# version 2
`

2. Configure RIP networks:


Specify the networks to be advertised using RIPv2 (still at classful boundaries):

bash

`RouterA(config-router)# network 10.0.0.0


RouterA(config-router)# network 192.168.123.0
`

3. Default Behavior:
By default, RIPv2 still performs auto-summarization at classful boundaries, similar to RIPv1.
4. Disable Auto-Summarization (if necessary):
To avoid auto-summarization and allow RIPv2 to advertise subnetted networks, use the
following command:

bash

`RouterA(config-router)# no auto-summary
`

5. Result:
Once auto-summary is disabled, RIPv2 will send updates including subnetted networks and
their corresponding subnet masks, ensuring accurate network advertisements.

📌 Example Configuration on Router A:


bash

`RouterA(config)# router rip


RouterA(config-router)# version 2
RouterA(config-router)# network 10.0.0.0
RouterA(config-router)# network 192.168.123.0
RouterA(config-router)# no auto-summary
`

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 20/29
📌 Key Points:
RIPv2 includes the subnet mask in updates, allowing classless routing.
Auto-summary is enabled by default, which may cause summarization issues at classful
boundaries.
Disabling auto-summary ensures RIPv2 behaves properly with subnetted networks.

💡 Tip: Disabling auto-summary is critical when using VLSM (Variable Length Subnet Masking) to
ensure accurate routing.

RIP Timers ⏱️
RIP uses four basic timers to manage the state of routes in the routing table. These timers control how
routing information is updated, invalidated, and removed.

📌 RIP Timers:
1. Update Timer (default: 30 seconds)
Controls how frequently the router sends routing updates.
2. Invalid Timer (default: 180 seconds)
Determines how long a route remains valid without new updates. If no update is received, the
route is marked as invalid (metric of 16) and placed in a hold-down state.
3. Hold-down Timer (default: 180 seconds)
Defines how long RIP suppresses a route marked as invalid. The router will not accept any
updates for that route until the hold-down timer expires.
4. Flush Timer (default: 240 seconds)
Specifies how long a route remains in the routing table before being flushed if no updates are
received. This timer runs concurrently with the invalid timer, and the route is flushed 60
seconds after being invalidated.

📌 Key Points:
Timer Synchronization: All RIP routers must have identical timers to avoid network instability.
Invalid Timer: Marks a route as invalid if no updates are received within the specified time.
Hold-down Timer: Prevents the acceptance of new, potentially incorrect updates for routes in
hold-down.
Flush Timer: Removes routes from the routing table after being invalid for a set duration.

💡 Tip: Adjusting timers can help optimize network stability, but they must be consistent across all
routers.

RIP Timers Configuration and Example ⏱️


This section explains how RIP timers work and how to configure them on a router.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 21/29
📌 Example of RIP Timer Behavior:
Router A receives a RIP update from Router B for the network 172.18.0.0.
Router A adds the network to its routing table:

arduino

`RouterA# show ip route


C 172.16.0.0 is directly connected, Ethernet0
C 172.17.0.0 is directly connected, Serial0
R 172.18.0.0 [120/1] via 172.17.1.2, 00:00:00, Serial0
`

Timers Activated:
Invalid Timer: Starts at 180 seconds.
Flush Timer: Starts at 240 seconds.
If no update is received:
Invalid Timer: Marks the route as invalid.
Hold-down Timer: The route enters the hold-down state (180 seconds).
Flush Timer: After 240 seconds, the route is removed from the routing table.

📌 Configuring RIP Timers:


To configure the RIP timers, you can use the following commands:

1. Change Timer Values:

shell

`Router(config)# router rip


Router(config-router)# timers basic 20 120 120 160
`

This command sets:


Update Timer: 20 seconds
Invalid Timer: 120 seconds
Hold-down Timer: 120 seconds
Flush Timer: 160 seconds
2. Reset to Default Timers:

shell

`Router(config-router)# no timers basic


`

📌 Key Points:
Invalid Timer (180s default): Marks a route as invalid if no updates are received.
Hold-down Timer (180s default): Prevents new updates for invalid routes until the timer expires.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 22/29
Flush Timer (240s default): Removes invalid routes after the timer expires.
Timer Synchronization: All routers in the RIP network must have the same timer settings.

💡 Tip: Adjusting RIP timers can help improve network stability and performance based on your specific
requirements.

RIP Loop Avoidance Mechanisms 🔄


RIP, being a Distance Vector protocol, is prone to routing loops. Here's a simple explanation of how
loops can happen and the mechanisms to prevent them.

💡 Problem - Counting to Infinity:


Scenario: If the 172.18.0.0 network fails:
1. Router B will send an update to Router A saying the network is unreachable (metric = 16).
2. But if Router A sends an update to Router B before that, Router A thinks it can reach
172.18.0.0 via Router B (1 hop).
3. Router B now believes it can reach 172.18.0.0 via Router A (2 hops).
4. Both routers keep incrementing the hop count until it reaches 16, marking the network as
unreachable. This is known as "counting to infinity."

🔒 Loop Avoidance Mechanisms:


1. Split-Horizon:
Prevents a router from sending a routing update back through the same interface from which
it learned the route.
Example: Router A won't send the 172.18.0.0 update back to Router B, as it learned it from
Router B.
Enabled by default on Cisco Routers.
2. Route-Poisoning:
Works with Split-Horizon by immediately advertising an unreachable network (metric = 16)
without waiting for the next update.
Prevents routers from propagating invalid routes.
3. Hold-Down Timers:
Prevents RIP from accepting updates for a route in a hold-down state until the timer expires.
Example: If Router A sends an update with a higher metric (e.g., 1 hop for 172.18.0.0) than
Router B's current metric (0 hops), the route will enter a hold-down state.
Prevents routers from quickly accepting bad routes during a network failure.

📌 Key Points:
Split-Horizon: Stops routing updates from being sent back to the router where the route was
learned.
Route-Poisoning: Instantly marks failed routes as unreachable.
Hold-Down Timers: Stops RIP from accepting new updates for a failed route during a failure
recovery period.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 23/29
These mechanisms work together to prevent loops and improve RIP stability.

RIP Passive Interfaces 🛑


You can control which router interfaces participate in the RIP process. The passive-interface command
is used to prevent routing updates from being sent on specific interfaces, while still allowing the router
to receive updates.

💡 Example Scenario:
Router C does not want to send RIP updates on Serial0 but still wants to listen for updates from
Router B.

🔧 Commands:
1. Prevent Updates on a Specific Interface:
Use `passive-interface` to stop updates from being sent out on a specific interface, but still
receive updates.
Command Example:

arduino

`RouterC(config)# router rip


RouterC(config-router)# network 10.4.0.0
RouterC(config-router)# network 10.2.0.0
RouterC(config-router)# passive-interface s0
`

2. Make All Interfaces Passive and Enable Updates on Specific Interfaces:


Use `passive-interface default` to make all interfaces passive.
Use `no passive-interface` to enable updates on specific interfaces.
Command Example:

scss

`RouterC(config)# router rip


RouterC(config-router)# network 10.4.0.0
RouterC(config-router)# network 10.2.0.0
RouterC(config-router)# passive-interface default
RouterC(config-router)# no passive-interface e0
`

📌 Key Points:
Passive Interface: Prevents updates from being sent out a specific interface, while still receiving
them.
Passive-Interface Default: Makes all interfaces passive by default.
No Passive-Interface: Re-enables updates on selected interfaces.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 24/29
RIP Neighbors 🏘️
RIP updates are usually sent as broadcasts (RIPv1) or multicasts (RIPv2). However, you can configure RIP
to unicast updates to specific neighbors for more control over the routing updates.

💡 Example Scenario:
Router B sends RIP updates as unicast to specific neighbors (Router A and Router C), but still
broadcasts or multicasts to all other routers.

🔧 Commands:
1. Configure Neighbors:
Use `neighbor` command to unicast RIP updates to specific neighbors.
Command Example:

arduino

`RouterB(config)# router rip


RouterB(config-router)# network 10.3.0.0
RouterB(config-router)# network 10.4.0.0
RouterB(config-router)# neighbor 10.3.5.1
RouterB(config-router)# neighbor 10.4.5.1
`

2. Prevent Broadcast/Multicast Updates (With Passive Interfaces):


Use `passive-interface` to stop RIP updates from being broadcasted or multicasted on
specific interfaces, while allowing unicast updates to neighbors.
Command Example:

arduino

`RouterB(config)# router rip


RouterB(config-router)# passive-interface s0
RouterB(config-router)# passive-interface s1
RouterB(config-router)# neighbor 10.3.5.1
RouterB(config-router)# neighbor 10.4.5.1
`

📌 Key Points:
Neighbor Command: Unicasts RIP updates to specified neighbors.
Passive Interface: Prevents RIP updates from being broadcasted or multicasted, allowing unicast
updates to neighbors.

RIPv2 Authentication 🔐
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 25/29
RIPv2 supports authentication to secure routing updates between routers. Here's a summary of how to
configure it:

💡 Steps for Configuring RIPv2 Authentication:


1. Create a Key Chain:
Configure a shared authentication key (key-string) between routers.
Command Example:

arduino

`RouterA(config)# key chain MYCHAIN


RouterA(config-keychain)# key 1
RouterA(config-keychain-key)# key-string MYPASSWORD
RouterB(config)# key chain MYCHAIN
RouterB(config-keychain)# key 1
RouterB(config-keychain-key)# key-string MYPASSWORD
`

2. Apply the Key Chain to Interfaces:


Apply the created key chain on the interfaces that connect the routers.
Command Example:

arduino

`RouterA(config)# interface s0
RouterA(config-if)# ip rip authentication key-chain MYCHAIN
RouterB(config)# interface s0
RouterB(config-if)# ip rip authentication key-chain MYCHAIN
`

3. Choose the Authentication Mode (Text or MD5):


By default, the authentication key is sent in clear text, but you can configure MD5 encryption
for more security.
Command Example for Text Mode:

scss

`RouterA(config)# interface s0
RouterA(config-if)# ip rip authentication mode text
`

Command Example for MD5 Encryption:

arduino

`RouterA(config)# interface s0
RouterA(config-if)# ip rip authentication mode md5
`

📌 Key Points:
Key Chain: Shared authentication key between routers.
Key-String: Specifies the password used for authentication.
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 26/29
Authentication Mode: Can be clear text or MD5 encryption (must be the same on both routers).
Interface Configuration: Apply the key chain to interfaces that connect the routers.

Altering RIP’s Metric 🔄


To control which path RIP uses for routing, you can adjust the metric for specific routes. Here's how to
alter the metric in RIP:

💡 Steps to Alter RIP’s Metric:


1. Create an Access List on Router B:
Define the route you wish to adjust using an access list.
Command Example:

arduino

`RouterB(config)# ip access-list standard MYLIST


RouterB(config-std-nacl)# permit 192.168.100.0 0.0.0.255
`

2. Apply the Metric Offset to the Route on Router B:


Increase the metric for a specific route from Router C.
Command Example:

arduino

`RouterB(config)# router rip


RouterB(config-router)# offset-list MYLIST in 4 s1
`

This command increases the metric by 4 for the 192.168.100.0 network received via Router C
on Serial 1, making Router A's route preferred.
3. Alternatively, Adjust the Metric on Router C:
You can also change the metric on Router C by advertising a higher metric for the route.
Command Example:

arduino

`RouterC(config)# ip access-list standard MYLIST


RouterC(config-std-nacl)# permit 192.168.100.0 0.0.0.255
RouterC(config)# router rip
RouterC(config-router)# offset-list MYLIST out 4 s0
`

📌 Key Points:
Access List: Defines which route to alter.
Offset-List: Adjusts the metric for the specified route.
Inbound/Outbound: The metric change can be applied inbound (on the receiving router) or
outbound (on the advertising router).
Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 27/29
Interoperating between RIPv1 and RIPv2 🔄
RIPv1 and RIPv2 can interoperate with some configuration changes. Here’s how to configure them for
compatibility:

💡 Key Configuration Steps:


1. Default Behavior:
RIPv1 Routers:
Send only Version 1 updates.
Receive both Version 1 and 2 updates.
RIPv2 Routers:
Send and receive only Version 2 updates.
2. Configuring Router A (RIPv1) to Send RIPv2 Updates:
Command Example:

arduino

`RouterA(config)# interface s0
RouterA(config-if)# ip rip send version 2
`

3. Configuring Router B (RIPv2) to Accept RIPv1 Updates:


Command Example:

arduino

`RouterB(config)# interface s0
RouterB(config-if)# ip rip receive version 1
`

4. Configuring Router B to Accept Both Versions Simultaneously:


Command Example:

arduino

`RouterB(config)# interface s0
RouterB(config-if)# ip rip receive version 1 2
`

5. Configuring RIPv2 to Send Broadcast Updates:


Command Example:

arduino

`RouterB(config)# interface s0
RouterB(config-if)# ip rip v2-broadcast
`

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 28/29
📌 Key Points:
Per-Interface Configuration: The version of RIP is set on each interface individually.
Version Compatibility: Configuring either router to send or receive different RIP versions ensures
interoperability.

Troubleshooting RIP 🔧
To troubleshoot and gather information on RIP, use the following commands to check the protocol's
settings and routing database:

💡 Key Commands for Troubleshooting:


1. Viewing RIP Protocol Information:
Command: `show ip protocols`
Output Includes:
RIP update timers (e.g., sending every 30 seconds).
Invalid, hold-down, and flush timers.
Version control settings for sending/receiving updates.
Routing networks and redistributing protocols.
Interfaces and their respective RIP settings.
2. Viewing RIP Routing Database:
Command: `show ip rip database`
Output Includes:
All routes in the RIP database, not just those in the routing table.
Route details, including metric, next hop, and update timestamps.
Information about network summarization.

📌 Key Points:
The `show ip protocols` command provides an overview of RIP timers, version settings, and
routing information.
The `show ip rip database` command reveals all RIP entries, including those not yet in the routing
table.

Printed using ChatGPT to PDF, powered by PDFCrowd HTML to PDF API. 29/29

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy