RIP – Routing Information Protocol
Download
Report
Transcript RIP – Routing Information Protocol
RIP v1– Routing Information Protocol
• RIP Versions
– RIP v1 (original version, Doyle ch 5)
– RIP v2 (improved version, Doyle ch 7)
• Simple distance-vector protocol (aka BellmanFord algorithm)
• Use hop count metric to determine best path (does
not take other factors into account such as link
speed)
• Initially popular because “routed” implementation
bundled with BSD UNIX
• Original IP version adapted for other network
protocols such as Novell IPX
RIP – Message Format
• Two Message Types
– Request (sent by devices after initialization to request a
unicast copy of a neighbor’s routing table
– Response (sent by RIP speaking devices by
broadcasting every 30 seconds to IP 255.255.255.255)
• Send via UDP/520 up to 25 routes per packet that
include IP network, metric, but no subnet mask
RIP – Normal Operation
• For every active RIP interface
– Announce known RIP routes out RIP enabled interfaces
every 30s
– Process received RIP annoucements by placing routes
in routing table if better than existing route and add 1 to
the hop count
– Do not announce things learned on an interface out the
same interface (split horizon)
– Only announce if reachable with hop count <- 15
RIP Timers (Cisco Imp.)
Router rip
timers basic update invalid holddown flush
• Update 30s (when to broadcast response)
• Invalid 180s (when haven’t heard annoucements
for 180s, do not use)
• Holddown 180s (when neighbor increases metric
for a network, do not accept immediately
• Flush 240s (after invalid timer expires, mark as
unreachable metric 16 until time to flush)
Cisco Administrative Distance
• Routers can run multiple routing protocols
simultaneously
• Q: What to do when you have more than one route
for a network learned with different routing
protocols?
• A: Believe route with smallest administative
distance
• For example, RIP uses admin distance 120, static
uses 1, so static routes are more “believable”
RIP v2 improvements
• Will cover these later in Doyle ch 7
• Annoucements carry subnet masks therefore
supporting classful routing
• Subnets of classful nets do not need to all be
the same size, but can be variable length
(VLSM)
• Supports IP multicast on 224.0.0.9
• Supports MD5 authentication
Cisco RIP commands
•
•
•
•
•
•
•
Show ip protocols
Show ip route
Show ip route RIP
Show ip RIP database
Debug ip RIP
Debug ip RIP events
Debug ip routing
Sh ip protocols
R10#sh ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 14 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
Interface
Send Recv Triggered RIP Key-chain
Ethernet0/0
1 12
Ethernet0/0.11
1 12
Ethernet0/0.61
1 12
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
192.168.10.0
192.168.11.0
192.168.61.0
Routing Information Sources:
Gateway
Distance
Last Update
192.168.61.70
120
00:00:18
192.168.10.1
120 00:00:13
192.168.61.61
120
00:00:04
192.168.10.11
120
00:00:16
Gateway
Distance
Last Update
192.168.11.20
120
00:00:16
Distance: (default is 120)
Sh ip route
R10#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is 192.168.10.1 to network 0.0.0.0
R
R
192.168.91.0/24 [120/7] via 192.168.10.11, 00:00:25, Ethernet0/0
192.168.121.0/24 [120/1] via 192.168.10.11, 00:00:25, Ethernet0/0
R 192.168.31.0/24 [120/4] via 192.168.11.20,
00:00:23, Ethernet0/0.11
C
R
R
R
R
R
R
C
R
192.168.61.0/24 is directly connected, Ethernet0/0.61
192.168.90.0/24 [120/5] via 192.168.61.70, 00:00:02, Ethernet0/0.61
192.168.120.0/24 [120/2] via 192.168.10.11, 00:00:25, Ethernet0/0
192.168.30.0/24 [120/3] via 192.168.11.20, 00:00:23, Ethernet0/0.11
192.168.60.0/24 [120/1] via 192.168.61.61, 00:00:14, Ethernet0/0.61
192.168.110.0/24 [120/4] via 192.168.10.11, 00:00:25, Ethernet0/0
192.168.111.0/24 [120/3] via 192.168.10.11, 00:00:25, Ethernet0/0
192.168.10.0/24 is directly connected, Ethernet0/0
192.168.40.0/24 [120/5] via 192.168.61.61, 00:00:14, Ethernet0/0.61
[120/5] via 192.168.11.20, 00:00:23, Ethernet0/0.11
Debug ip routing
R10# term monitor
R10# debug ip routing
(plug in ethernet cable here)
R10(config)#int e0/0.61
R10(config-subif)#no shut
R10(config-subif)#
.Jan 20 17:00:12 EST: is_up: 1 state: 4 sub state: 1 line: 1
.Jan 20 17:00:12 EST: RT: closer admin distance for 192.168.61.0, flushing 1
routes
.Jan 20 17:00:12 EST: RT: add 192.168.61.0/24 via 0.0.0.0, connected metric
[0/0]
.Jan 20 17:00:12 EST: RT: interface Ethernet0/0.61 added to routing table
.Jan 20 17:00:12 EST: RT: add 192.168.40.0/24 via 192.168.61.61, rip
metric [120/5]
SNMP tools to troubleshoot RIP
• Assuming you are on a LINUX computer with
“snmpwalk” and “snmpnetstat” tools and your
router has a Read-Only community configured
named “public”
• ( snmp-server community public RO )
• Linux% snmpnetstat –r 192.168.30.30 public
• Linux% snmpwalk –v 1 –c public 192.168.30.30
More tools to debug RIP
• Use a sniffer like program such as Ethereal
to “sniff” the UDP/520 RIP packets on an
ethernet segment with RIP speakers
• Can also use older tools like TCPDUMP but
newer tools like Ethereal have better
decoding
Lab2 Notes
• We will start a new lab next week with a
new topology, subnetting, and more
complex RIP configuration
• Will leave topology unchanged for now at
least until first assignment due this Friday
1/21/05 7pm ET