Вы находитесь на странице: 1из 39

Ch.

4 – RIPv2

CCNP 1 version 3.0


Rick Graziani
Cabrillo College
Note to instructors

• If you have downloaded this presentation from the Cisco Networking


Academy Community FTP Center, this may not be my latest version of
this PowerPoint.
• For the latest PowerPoints for all my CCNA, CCNP, and Wireless
classes, please go to my web site:
http://www.cabrillo.cc.ca.us/~rgraziani/
• The username is cisco and the password is perlman for all of
my materials.
• If you have any questions on any of my materials or the curriculum,
please feel free to email me at graziani@cabrillo.edu (I really don’t
mind helping.) Also, if you run across any typos or errors in my
presentations, please let me know.
• I will add “(Updated – date)” next to each presentation on my web site
that has been updated since these have been uploaded to the FTP
center.
Thanks! Rick
Rick Graziani graziani@cabrillo.edu 2
Overview

Rick Graziani graziani@cabrillo.edu 3


Classless Routing Protocols

“The true characteristic of a classless routing protocol is the ability to


carry subnet masks in their route advertisements.” Jeff Doyle, Routing
TCP/IP

Benefits:
• All-zeros and all-ones subnets
– - Although some vendors, like Cisco, can also handle this with
classful routing protocols.
• VLSM
– Can have discontiguous subnets
– Better IP addressing allocation
• CIDR
– More control over route summarization

Rick Graziani graziani@cabrillo.edu


Classless Routing Protocols

Classless Routing Protocols:


• RIPv2
• EIGRP
• OSPF
• IS-IS
• BGPv4

Rick Graziani graziani@cabrillo.edu


Few RIP facts

• RIP still working on routers and hosts The Grim Router


today.
• IP RIP derived from RIP by Xerox for its
XNS protocol stack.
• Initially implemented in Berkeley UNIX
routed program.
• RIPv1 – Charles Hedrick, RFC 1058,
1988
• RIPv2 – Gary Malkin, RFC 1723, 1994
• RIPng for IPv6 – Gary Malkin, RFC 2080,
1997 (proposed standard), extension to
RIPv2 message format.

Rick Graziani graziani@cabrillo.edu


RIP version 1

• Classful Routing Protocol, sent over UDP port 520


• Does not include the subnet mask in the routing updates.
• Automatic summarization done at major network boundaries.
• Updates sent as broadcasts unless the neighbor command is uses
which sends them as unicasts.
0 1 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| command (1) | version (1) | must be zero (2) |
+---------------+---------------+-------------------------------+
| address family identifier (2) | must be zero (2) |
+-------------------------------+-------------------------------+
| IP address (4) |
+---------------------------------------------------------------+
| must be zero (4) |
+---------------------------------------------------------------+
| must be zero (4) |
+---------------------------------------------------------------+
| metric (4) |
+---------------------------------------------------------------+

Rick Graziani graziani@cabrillo.edu


RIP version 2

• Classless Routing Protocol, sent over UDP port 520


• Includes the subnet mask in the routing updates.
• Automatic summarization at major network boundaries can be disabled.
• Updates sent as multicasts unless the neighbor command is uses which
sends them as unicasts.
0 1 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| command (1) | version (1) | must be zero (2) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address Family Identifier (2) | Route Tag (2) |
+-------------------------------+-------------------------------+
| IP Address (4) |
+---------------------------------------------------------------+
| Subnet Mask (4) |
+---------------------------------------------------------------+
| Next Hop (4) |
+---------------------------------------------------------------+
| Metric (4) |
+---------------------------------------------------------------+

Rick Graziani graziani@cabrillo.edu


RIP v2 operation

• All of the operational procedures, timers,


and stability functions of RIP v1 remain the
same in RIP v2, with the exception of the
broadcast updates.
• RIP v2 updates use reserved Class D
address 224.0.0.9.
Rick Graziani graziani@cabrillo.edu 9
Issues addressed by RIP v2

The following four features are the most significant new features added to
RIP v2:
• Authentication of the transmitting RIP v2 node to other RIP v2
nodes
• Subnet Masks – RIP v2 allocates a 4-octet field to associate a subnet
mask to a destination IP address.
• Next Hop IP addresses – The inclusion of a Next Hop identification
field helps make RIP v2 more efficient than RIP v1 by preventing
unnecessary hops.
• Multicasting RIP v2 messages – Multicasting is a technique for
simultaneously advertising routing information to multiple RIP or RIP
v2 devices.
Rick Graziani graziani@cabrillo.edu 10
RIP v2 message format

• All the extensions to the original protocol are carried in the unused
fields.
• The Address Family Identifier (AFI) field is set to two for IP. The only
exception is a request for a full routing table of a router or host, in
which case it will be set to zero.

Rick Graziani graziani@cabrillo.edu 11


RIP v2 message format

• The Route Tag field provides a way to differentiate between internal and
external routes. (Not used by RIP, but can be used by BGP – later.)
• External routes are those that have been redistributed into the RIP v2.
• The Next Hop field contains the IP address of a better next hop IP address if
one exists. Next hop on same subnet, that is metrically closer to the
destination than the advertising router. (Rather than an IP redirect message)
• Metric indicates how many internetwork hops, between 1 and 15 for a valid
route, or 16 for an unreachable route.
Rick Graziani graziani@cabrillo.edu 12
Compatibility with RIP v1

RFC 1723 defines a compatibility switch with four settings, which allows
versions 1 and 2 to interoperate:
2. RIP v1, in which only RIP v1 messages are transmitted
3. RIP v1 Compatibility, which causes RIP v2 to broadcast its messages
instead of multicast them so that RIP v1 may receive them
4. RIP v2, in which RIP v2 messages are multicast to destination
address 224.0.0.9
5. None, in which no updates are sent

• RFC 1723 recommends that switches be configurable on a per-


interface basis. (coming soon)

Rick Graziani graziani@cabrillo.edu 13


Classless route lookups

• Classful routing behavior, no ip classless, and


classless routing behavior, the ip classless global
commands.
• This will be discussed in our presentation on “The Routing
Table.” There is a dierence
Rick Graziani graziani@cabrillo.edu 14
Classless route lookups

• Route aggregation and supernetting.


• A much greater benefit of having a subnet mask associated with each
route is being able to use variable-length subnet masking (VLSM)
and to summarize a group of major network addresses with a single
aggregate address.
– Greater detail in Module 5, EIGRP

Rick Graziani graziani@cabrillo.edu 15


Classless routing protocols

• The true defining characteristic of classless routing protocols is the


capability to carry subnet masks in their route advertisements.
• “One benefit of having a mask associated with each route is that the
all-zeros and all-ones subnets are now available for use.”
– Cisco allows the all-zeros and all-ones subnets to be used with
classful routing protocols.

Rick Graziani graziani@cabrillo.edu 16


Authentication

Authentication is
supported by
modifying what
would normally be
the first route entry
of the RIP message

• A security concern with any routing protocol is the possibility of a router


accepting invalid routing updates.
• The Authentication Type for simple password authentication is two,
0x0002,
• The remaining 16 octets carry an alphanumeric password of up to 16
characters.
• Configuration is coming!
Rick Graziani graziani@cabrillo.edu 17
Authentication

• RFC 1723 describes only simple password authentication


• Cisco IOS provides the option of using MD5 authentication instead of
simple password authentication.
• Cisco uses the first and last route entry spaces for MD5 authentication
purposes.
• MD5 computes a 128-bit hash value from a plain text message of
arbitrary length and a password.
Rick Graziani graziani@cabrillo.edu 18
Authentication

Rick Graziani graziani@cabrillo.edu 19


MD5 Authentication (FYI)
http://www.cisco.com/en/US/tech/tk713/tk507/technologies_tech_note09186a00800b4131.shtml

1 2

3 4

5 6

Rick Graziani graziani@cabrillo.edu 20


Limitations of RIPv2

• Slow convergence and the need of holddown timers to


reduce the possibility of routing loops.

Note: See CCNA 2 for review if needed.

Rick Graziani graziani@cabrillo.edu 21


Limitations of RIPv2

• RIPv2 continues to rely on counting to infinity as a means


of resolving certain error conditions within the network.
• Dependent upon holddown timers.
• Triggered updates are also helpful.

Note: See CCNA 2 for review if needed.


Rick Graziani graziani@cabrillo.edu 22
Limitations of RIPv2

• Perhaps the single greatest limitation that RIPv2 inherited from RIP is that its
interpretation of infinity remained at 16.

• Redistributed RIPv2 static cost metrics. (later in redistribution)


– The default value of 1 is just like RIP.
– This metric remains constant, and can only be changed by the
administrator.
– However, the default value can be manually adjusted by the network
administrator.
Rick Graziani graziani@cabrillo.edu 23
Basic RIPv2 configuration

Other:
For RIP and IGRP, the passive interface command stops the router from
sending updates to a particular neighbor, but the router continues to
listen and use routing updates from that neighbor. (More later.)
Router(config-router)# passive-interface interface

Default behavior of version 1 restored:


Router(config-router)# no version
Rick Graziani graziani@cabrillo.edu 24
Compatibility with RIP v1
NewYork

interface fastethernet0/0
ip address 192.168.50.129 255.255.255.192
ip rip send version 1
ip rip receive version 1
RIPv2
interface fastethernet0/1
ip address 172.25.150.193 255.255.255.240
ip rip send version 1 2

• Interface FastEthernet0/0 is interface fastethernet0/2


configured to send and receive
ip address 172.25.150.225 225.255.255.240
RIP v1 updates.
• FastEthernet0/1 is configured
to send both version 1 and 2 router rip
updates. version 2
• FastEthernet0/2 has no special network 172.25.0.0
configuration and therefore network 192.168.50.0
sends and receives version 2
by default.

Rick Graziani graziani@cabrillo.edu 25


Discontiguous subnets and classless
routing

router rip
version 2
no auto-summary

• RIP v1 always uses automatic summarization.


• The default behavior of RIP v2 is to summarize at network
boundaries the same as RIP v1.

Rick Graziani graziani@cabrillo.edu 26


Configuring authentication

Router(config)#key chain Romeo


Router(config-keychain)#key 1
Router(config-keychain-key)#key-string Juliet
The password must be the same on both routers (Juliet), but the name of the key
(Romeo) can be different.

Router(config)#interface fastethernet 0/0


Router(config-if)#ip rip authentication key-chain Romeo
Router(config-if)#ip rip authentication mode md5

• If the command ip rip authentication mode md5 is not added, the interface will
use the default clear text authentication. Although clear text authentication may be
necessary to communicate with some RIP v2 implementations, for security concerns use
the more secure MD5 authentication whenever possible.

Rick Graziani graziani@cabrillo.edu 27


Show commands

Rick Graziani graziani@cabrillo.edu 28


show ip rip database
Router# show ip rip database
172.19.0.0/16 auto-summary
172.19.64.0/24 directly connected, Ethernet0
172.19.65.0/24
[1] via 172.19.70.36, 00:00:17, Serial1
[2] via 172.19.67.38, 00:00:25, Serial0
172.19.67.0/24 directly connected, Serial0
172.19.67.38/32 directly connected, Serial0
172.19.70.0/24 directly connected, Serial1
172.19.86.0/24[1] via 172.19.67.38, 00:00:25, Serial0
[1] via 172.19.70.36, 00:00:17, Serial1

• The show ip rip database command to check summary address


entries in the RIP database.
• These entries will appear in the database if there are only relevant
child or specific routes being summarized.
• When the last child route for a summary address becomes invalid, the
summary address is also removed from the routing table.
Router#show ip rip database
Rick Graziani graziani@cabrillo.edu 29
Show commands

Rick Graziani graziani@cabrillo.edu 30


Debug commands

Rick Graziani graziani@cabrillo.edu 31


Summary

Rick Graziani graziani@cabrillo.edu 32


RIPv2 Example

Scenario: 207.0.0.0/16
207.1.0.0/16
Internet
• Discontiguous subnets static route to
207.2.0.0/16
207.3.0.0/16
etc.
• VLSM 10.0.0.0/8 207.0.0.0/8

• CIDR .1
.1 e0

ISP
• Supernet to 207.0.0.0/8 .25 s0 s1 .21

With the default


auto-summary on 192.168.4.24/30
ISP, it will load 192.168.4.20/30
balance for all
packets destined for 172.30.200.32/28
172.30.0.0/16 Lo2
.26 s0 s0 .22 `
172.30.200.16/28
Lo1
Lo0
172.30.2.0/24
.1 SantaCruz1 SantaCruz2 Lo0
.1
.1 e0 .1 e0 172.30.110.0/24

172.30.1.0/24 172.30.100.0/24
Rick Graziani graziani@cabrillo.edu
SantaCruz1 RIPv2 Example
router rip
network 172.30.0.0 207.0.0.0/16
207.1.0.0/16
network 192.168.4.0 Internet 207.2.0.0/16
static route to 207.3.0.0/16
version 2 etc.
10.0.0.0/8 207.0.0.0/8
no auto-summary
.1 e0
.1
SantaCruz2 ISP
.25 s0 s1 .21
router rip
network 172.30.0.0
network 192.168.4.0 192.168.4.24/30
version 2 192.168.4.20/30

no auto-summary
172.30.200.32/28
Lo2
ISP .26 s0 s0 .22 `
172.30.200.16/28
Lo1
Lo0
router rip .1 SantaCruz1 SantaCruz2 Lo0
172.30.2.0/24 .1
redistribute static .1 e0 .1 e0 172.30.110.0/24

network 10.0.0.0
172.30.1.0/24 172.30.100.0/24
network 192.168.4.0
version 2
no auto-summary

ip route 207.0.0.0 255.0.0.0 null0

Rick Graziani graziani@cabrillo.edu


SantaCruz2#show ip route
Examining a Routing Table
172.30.0.0/16 is variably subnetted, 6 subnets, 2 masks
C 172.30.200.32/28 is directly connected, Loopback2
C 172.30.200.16/28 is directly connected, Loopback1
R 172.30.2.0/24 [120/2] via 192.168.4.21, 00:00:21, Serial0
R 172.30.1.0/24 [120/2] via 192.168.4.21, 00:00:21, Serial0
C 172.30.100.0/24 is directly connected, Ethernet0
C 172.30.110.0/24 is directly connected, Loopback0
192.168.4.0/30 is subnetted, 2 subnets
R 192.168.4.24 [120/1] via 192.168.4.21, 00:00:21, Serial0
207.0.0.0/16
C 192.168.4.20 is directly connected, Serial0 207.1.0.0/16
Internet 207.2.0.0/16
R 10.0.0.0/8 [120/1] via 192.168.4.21, 00:00:21, Serial0 207.3.0.0/16
static route to
etc.
R 207.0.0.0/8 [120/1] via 192.168.4.21, 00:00:21, 10.0.0.0/8
Serial0 207.0.0.0/8
.1 e0
.1
ISP
.25 s0 s1 .21
Supernet, classless routing protcols
will route supernets (CIDR)
192.168.4.24/30
192.168.4.20/30

172.30.200.32/28
Lo2
.26 s0 s0 .22 `
172.30.200.16/28
Lo1
Lo0
.1 SantaCruz1 SantaCruz2 Lo0
172.30.2.0/24 .1
.1 e0 .1 e0 172.30.110.0/24

172.30.1.0/24 172.30.100.0/24
Rick Graziani graziani@cabrillo.edu
RIPv2: Sending and Receiving Updates

ISP(config)# line console 0


ISP(config-line)# logging synchronous
ISP#debug ip rip
RIP protocol debugging is on
ISP#01:23:34: RIP: received v2 update from 192.168.4.22 on Serial1
01:23:34: 172.30.100.0/24 -> 0.0.0.0 in 1 hops
01:23:34: 172.30.110.0/24 -> 0.0.0.0 in 1 hops
ISP# Includes mask
01:23:38: RIP: received v2 update from 192.168.4.26 on Serial0
01:23:38: 172.30.2.0/24 -> 0.0.0.0 in 1 hops
01:23:38: 172.30.1.0/24 -> 0.0.0.0 in 1 hops multicast
ISP#
01:24:31: RIP: sending v2 update to 224.0.0.9 via Ethernet0 (10.0.0.1)
01:24:31: 172.30.2.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 172.30.1.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 172.30.100.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 172.30.110.0/24 -> 0.0.0.0, metric 2, tag 0
01:24:31: 192.168.4.24/30 -> 0.0.0.0, metric 1, tag 0
01:24:31: 192.168.4.20/30 -> 0.0.0.0, metric 1, tag 0
<text omitted>

Rick Graziani graziani@cabrillo.edu


Adding a default Routes to RIPv2
207.0.0.0/16
ISP 207.1.0.0/16
Internet 207.2.0.0/16
router rip static route to 207.3.0.0/16
etc.
10.0.0.0/8 207.0.0.0/8
redistribute static
.1 e0
network 10.0.0.0 .1
ISP
network 192.168.4.0 .25 s0 s1 .21

version 2
no auto-summary 192.168.4.24/30
192.168.4.20/30
default-information originate
172.30.200.32/28
Lo2
172.30.200.16/28
ip route 207.0.0.0 255.0.0.0 null0 .26 s0 s0 .22 Lo1 `
Lo0
.1 SantaCruz1 SantaCruz2 Lo0
ip route 0.0.0.0 0.0.0.0 10.0.0.2 172.30.2.0/24 .1
172.30.110.0/24
.1 e0 .1 e0
etherenet0
172.30.1.0/24 172.30.100.0/24

Rick Graziani graziani@cabrillo.edu


Other RIPv2 Commands

Router(config-router)# neighbor ip-address


Defines a neighboring router with which to exchange unicast routing
information. (RIPv1 or RIPv2)

Router(config-if)# ip rip send|receive version 1 | 2 | 1 2


Configures an interface to send/receive RIP Version 1 and/or Version 2 packets

Router(config-if)# ip summary-address rip ip_address


ip_network_mask
Specifies the IP address and network mask that identify the routes to be
summarized.

Authentication and other nice configuration commands and examples:


http://www.cisco.com/en/US/products/sw/iosswrel/ps1831/products_configurati
on_guide_chapter09186a00800d97f7.html

Rick Graziani graziani@cabrillo.edu


Ch.4 – RIPv2

CCNP 1 version 3.0


Rick Graziani
Cabrillo College

Вам также может понравиться