RIP and EIGRP Overview
Routing Information Protocol (RIP)
- Concept: An industry-standard Distance Vector Interior Gateway Protocol (IGP) that uses “routing-by-rumour” logic to learn and share routes.
- Metric: Hop count. Each router in the path counts as 1 hop. Bandwidth is irrelevant.
- Maximum Hop Count: 15. A hop count of 16 is considered unreachable and will not be inserted into the routing table.
- Timers: Routing table updates are sent every 30 seconds by default.
- Message Types:
- Request: Asks RIP-enabled neighbors to send their routing table.
- Response: Sends the local router’s routing table to neighbors.
RIP Versions
| Feature | RIPv1 | RIPv2 |
|---|---|---|
| Addressing | Classful (No VLSM/CIDR support) | Classless (Supports VLSM/CIDR) |
| Subnet Mask in Updates | No (assumes /8, /16, or /24 based on class) | Yes (advertises exact prefix, e.g., /30) |
| Update Destination | Broadcast (255.255.255.255) |
Multicast (224.0.0.9) |
| Modern Use | Obsolete, do not use | Acceptable for small/simple networks |
RIP Configuration
Router(config)# router rip
Router(config-router)# version 2
Router(config-router)# no auto-summary
Router(config-router)# network 10.0.0.0
Router(config-router)# passive-interface GigabitEthernet2/0
Router(config-router)# default-information originate
Router(config-router)# maximum-paths 8
Router(config-router)# distance 85
Things to note:
- The
networkcommand in RIP is classful. Enteringnetwork 10.0.12.0automatically converts to10.0.0.0/8. - The
networkcommand does not tell the router which network to advertise. It tells the router to activate RIP on interfaces whose IP addresses fall within that classful range. The router will then advertise the actual interface prefix (e.g.,10.0.12.0/30), not the classful network. - Always use
version 2andno auto-summaryto prevent classful summarization. passive-interfacestops sending RIP advertisements out of a specific interface (reducing unnecessary traffic) but still advertises that interface’s network to other neighbors.default-information originateadvertises a locally configured static default route (0.0.0.0/0) to RIP neighbors.maximum-paths(1-32) controls Equal-Cost Multi-Path (ECMP) load balancing. Default is 4.distance(1-255) changes the Administrative Distance (AD). Default RIP AD is 120.
Enhanced Interior Gateway Routing Protocol (EIGRP)
- Concept: An advanced/hybrid distance vector IGP. Originally Cisco proprietary, now an open standard (though predominantly used on Cisco devices).
- Metric: Composite metric based primarily on Bandwidth (slowest link in the path) and Delay (sum of delays of all links in the path).
- K-Values: Metric weights. By default, K1 (bandwidth) = 1, K3 (delay) = 1. K2, K4, and K5 are 0 (unused).
- Hop Limit: None (supports very large networks).
- Update Destination: Multicast
224.0.0.10. - Load Balancing: Supports both Equal-Cost (ECMP, default 4 paths) and Unequal-Cost load balancing (traffic distributed proportionally based on bandwidth/metric).
EIGRP Router ID Selection
The Router ID is a unique 32-bit number (formatted as an IP address) identifying the router within the Autonomous System (AS). Priority order:
- Manually configured Router ID.
- Highest IP address on any configured Loopback interface.
- Highest IP address on any Physical interface.
EIGRP Configuration
Router(config)# router eigrp 1
Router(config-router)# no auto-summary
Router(config-router)# passive-interface GigabitEthernet2/0
Router(config-router)# network 10.0.0.0
Router(config-router)# network 172.16.1.0 0.0.0.15
Router(config-router)# eigrp router-id 1.1.1.1
Router(config-router)# distance 85
Things to note:
- The Autonomous System (AS) number (e.g.,
1) must match between neighboring routers to form an adjacency. - EIGRP
networkcommands can use wildcard masks for precise interface matching. - EIGRP routes are denoted by the letter D in the routing table.
- EIGRP has two AD values: 90 for internal routes, 170 for external routes (routes redistributed into EIGRP).
Wildcard Masks
- Concept: An “inverted” subnet mask used in EIGRP and OSPF
networkcommands to specify which interfaces should participate in the routing protocol. - Rules:
0in the wildcard mask = The corresponding bit must match the interface IP.1in the wildcard mask = The corresponding bit can be ignored (does not have to match).
- Calculation Shortcut: Subtract each octet of the subnet mask from
255.- Subnet Mask
255.255.255.240(/28) → Wildcard0.0.0.15 - Subnet Mask
255.255.255.128(/25) → Wildcard0.0.0.127 - Subnet Mask
255.252.0.0(/14) → Wildcard0.3.255.255 - Subnet Mask
255.255.255.255(/32) → Wildcard0.0.0.0(exact IP match)
- Subnet Mask
Route Selection & Administrative Distance (AD)
- Concept: When a router learns multiple paths to a destination, it must choose the best one to place in the routing table.
- Rule: AD is only used to break ties when multiple routes to the same destination network are received from different routing protocols.
- If routes are from the same routing protocol, the router uses the metric to choose the best path.
graph TD
A[Multiple routes to SAME destination?] -->|No| B[Install all routes to different destinations]
A -->|Yes| C[Routes from SAME routing protocol?]
C -->|Yes| D[Compare Metrics. Lowest metric wins.]
C -->|No| E[Compare Administrative Distance. Lowest AD wins.]
Verification Commands
Router# show ip protocols
Things to note: This command is universal for RIP, EIGRP, and OSPF. It displays:
- The active routing protocol and version/AS number.
- Timers and K-values (for EIGRP).
- Router ID.
- Auto-summary status.
- Maximum paths for ECMP.
- Networks activated via the
networkcommand. - Configured passive interfaces.
- Routing information sources (neighbors) and their AD.
Command Summary
| Task | RIP Command | EIGRP Command |
|---|---|---|
| Enter Config Mode | router rip |
router eigrp <AS> |
| Set Version | version 2 |
N/A |
| Disable Auto-Summary | no auto-summary |
no auto-summary |
| Activate on Interface | network <classful-ip> |
network <ip> <wildcard-mask> |
| Stop Sending Updates | passive-interface <int> |
passive-interface <int> |
| Advertise Default Route | default-information originate |
network 0.0.0.0 (or redistribute) |
| Set Max ECMP Paths | maximum-paths <1-32> |
maximum-paths <1-32> |
| Change Admin Distance | distance <1-255> |
distance <1-255> |
| Set Router ID | N/A | eigrp router-id <ip> |
| Verify | show ip protocols |
show ip protocols |
Common Misconceptions to Avoid:
- RIP
networkcommand: It does not advertise the network you type. It activates the protocol on interfaces matching that classful range, and advertises the interface’s actual subnet. - EIGRP Router ID: It is just a 32-bit identifier formatted like an IP address; it does not need to be a real, routable IP address on the router.
- Route Selection: Do not compare ADs for routes to different destinations, and do not compare ADs for routes from the same protocol (use metrics instead).