RIP(Routing Information Protocol)
- Directly Connected Routes: AD = 0 (most trusted)
- Static Routes: AD = 1
- EIGRP (Internal): AD = 90
- OSPF: AD = 110
- RIP: AD = 120 (less trusted compared to OSPF and EIGRP)
Feature | RIP v1 | RIP v2 | RIPng |
---|---|---|---|
Protocol Type | Distance Vector | Distance Vector | Distance Vector |
Metric | Hop Count | Hop Count | Hop Count |
Max Hop Count | 15 | 15 | 15 |
Updates | Broadcast (255.255.255.255) | Multicast (224.0.0.9) | Multicast (FF02::9) |
Addressing | IPv4 | IPv4 | IPv6 |
Authentication | None | Supports authentication | None |
Subnet Mask | Classful (no subnet mask support) | Classless (supports subnet masks) | Classless (supports IPv6 prefix) |
Administrative Distance | 120 | 120 | 120 |
Timers | Update: 30s, Timeout: 180s, Flush: 240s | Update: 30s, Timeout: 180s, Flush: 240s | Update: 30s, Timeout: 180s, Flush: 240s |
Loop Prevention | Split Horizon, Route Poisoning, Hold-Down Timers | Split Horizon, Route Poisoning, Hold-Down Timers | Split Horizon, Route Poisoning, Hold-Down Timers |
RFC | RFC 1058 | RFC 2453 | RFC 2080 |
Key Points
- RIP v1: Simple, classful routing protocol using broadcast for updates.
- RIP v2: Enhanced version with support for subnet masks, authentication, and multicast updates.
- RIPng: Adaptation of RIPv2 for IPv6, using multicast for updates and supporting IPv6 addressing.
Structure of a RIP Packet Header
Command:
- Purpose: Specifies the type of message (e.g., request or response).
- Values: 1 for request, 2 for response.
Version:
- Purpose: Indicates the RIP version (1 or 2).
- Values: 1 for RIP v1, 2 for RIP v2.
Address Family Identifier (AFI):
- Purpose: Specifies the type of address (usually IP).
- Values: 2 for IP.
IP Address:
- Purpose: The destination IP address for the route.
Metric:
- Purpose: The hop count to the destination.
- Values: 1 to 15 (with 16 indicating an unreachable destination).
Example of a RIP Packet Header
Field | Value |
---|---|
Command | 2 (Response) |
Version | 2 (RIP v2) |
Address Family Identifier | 2 (IP) |
IP Address | 192.168.1.0 |
Metric | 1 |
The multicast address information for RIP versions :
RIP v1
- Broadcast Address: RIP v1 does not use multicast. Instead, it uses broadcast to send updates to all hosts on the network. The broadcast address used is 255.255.255.255.
RIP v2
- Multicast Address: RIP v2 uses the multicast address 224.0.0.9. This address is reserved for all RIPv2-speaking routers, reducing unnecessary load on hosts that are not running RIP.
RIPng
- Multicast Address: RIPng (RIP next generation) for IPv6 uses the multicast address FF02::9. This address is used for sending RIPng updates to all RIPng-enabled routers on the local link.
Distance Vector Algorithm in Ring Topology
Initialization:
- Each router initializes its routing table with the cost to reach directly connected neighbors and sets the cost to reach itself as zero.
- Example:
- R1: R1 (0), R2 (1), R4 (1)
- R2: R2 (0), R1 (1), R3 (1)
- R3: R3 (0), R2 (1), R4 (1)
- R4: R4 (0), R1 (1), R3 (1)
Periodic Updates:
- Routers periodically exchange their routing tables with their immediate neighbors.
- Example:
- R1 sends its table to R2 and R4.
- R2 sends its table to R1 and R3.
- R3 sends its table to R2 and R4.
- R4 sends its table to R1 and R3.
Distance Calculation:
- Upon receiving updates, each router calculates the cost to reach each destination through each of its neighbors.
- Example:
- R1 receives R2's table: R2 (0), R1 (1), R3 (1)
- R1 calculates: R3 via R2 = 1 (to R2) + 1 (R2 to R3) = 2
- R1 updates its table: R1 (0), R2 (1), R3 (2), R4 (1)
Table Update:
- If a shorter path to a destination is found, the router updates its routing table with the new path and cost.
- Example:
- R1's table after updates: R1 (0), R2 (1), R3 (2), R4 (1)
Propagation:
- This process continues until all routers have consistent routing tables.
- Example:
- Final tables:
- R1: R1 (0), R2 (1), R3 (2), R4 (1)
- R2: R2 (0), R1 (1), R3 (1), R4 (2)
- R3: R3 (0), R2 (1), R4 (1), R1 (2)
- R4: R4 (0), R1 (1), R3 (1), R2 (2)
- Final tables:
RIP Configuration for Ring Topology
Here is a basic RIP configuration for each router:
R1 Configuration:
router rip
version 2
network 192.168.1.0
network 192.168.4.0
no auto-summary
R2 Configuration:
router rip
version 2
network 192.168.1.0
network 192.168.2.0
no auto-summary
R3 Configuration:
router rip
version 2
network 192.168.2.0
network 192.168.3.0
no auto-summary
R4 Configuration:
router rip
version 2
network 192.168.3.0
network 192.168.4.0
no auto-summary
Advantages of RIPv2 and RIPng
RIPv2:
- Classless Routing: Supports subnet masks, allowing for more efficient use of IP addresses.
- Authentication: Provides security features to authenticate routing updates.
- Multicast Updates: Uses multicast instead of broadcast, reducing unnecessary traffic.
RIPng:
- IPv6 Support: Designed for IPv6, accommodating the larger address space and other features of IPv6.
- Operational Similarities: Operates similarly to RIPv2 but tailored for IPv6 routing.
In this ring topology, RIPv2 and RIPng would perform better due to their support for more modern network features and improved efficiency in routing updates.
What are Different Types of RIP Timers?
- Update timer: The default timing for routing information being exchanged by the routers operating RIP is 30 seconds. Using an Update timer, the routers exchange their routing table periodically.
- Invalid timer: If no update comes until 180 seconds, then the destination router considers it invalid. In this scenario, the destination router mark hop counts as 16 for that router.
- Hold down timer: This is the time for which the router waits for a neighbor router to respond. If the router isn’t able to respond within a given time then it is declared dead. It is 180 seconds by default.
- Flush time: It is the time after which the entry of the route will be flushed if it doesn’t respond within the flush time. It is 60 seconds by default. This timer starts after the route has been declared invalid and after 60 seconds i.e time will be 180 + 60 = 240 seconds.
What is split horizon in RIP?
Split horizon is a technique used in RIP to prevent routing loops. It ensures that a router does not advertise a route back to the router from which it was learned.
What is route poisoning in RIP?
Route poisoning is a method used in RIP to mark a route as unreachable by setting its hop count to 16. This helps inform other routers about a failed route quickly.
RIP version 1: classful protocol updates are broadcast no support for summarization no authentication support
RIP version 2: classless protocol updates are multicast to address 224.0.0.9 support for VLSM and summarization (major network boundary) MD5 authentication support Supports Triggered updates and Route tags
Troubleshooting Commands
1. show ip protocols
2. show ip route
3. debug ip rip
4. debug ip rip events
5. debug ip rip database
RIP Config Sample :
R3(config)# router rip
R3(config-router)# network 10.10.10.0
R3(config-router)# network 172.16.10.4
R3(config-router)# network 172.16.10.0
R3(config-router)# version 2
R3(config-router)# no auto-summary
Comments
Post a Comment