Thứ Bảy, 8 tháng 2, 2014

Tài liệu Configuring Distance Vector Protocols docx

Both ways of entering your statements is correct, but the latter is what the router
will use if you type in all of the specific subnets.
10.01. The CD contains a multimedia demonstration of an introduction to
basic IP routing protocol configuration.
CERTIFICATION OBJECTIVE 10.02
IP RIP
IP RIP (Routing Information Protocol) comes in two different versions: 1 and 2.
Version 1 is a distance vector protocol and is defined in RFC 1058. Version 2 is a
hybrid protocol and is defined in RFCs 1721 and 1722. The CCNA exam focuses on
version 1. However, you still need to know a few things about RIPv2, specifically its
characteristics. This section covers the basics of configuring and troubleshooting your
network using IP RIP.
Characteristics of RIPv1 and RIPv2
As you recall from the last chapter, RIP is a distance vector protocol. RIP is a very old
protocol and therefore is very stable; in other words, Cisco really doesn’t do that much
development on the protocol, unlike other, more advanced protocols. Therefore,
you can feel very safe that when you upgrade your IOS to a newer version, RIP will
function the same way that it did in the previous release. This section includes brief
overviews of both versions of RIP.
RIPv1
RIPv1 uses local broadcasts to share routing information. These updates are periodic in
nature, occurring, by default, every 30 seconds, with a hold-down period of 180 seconds.
Both versions of RIP use hop count as a metric, which is not always the best metric to use.
For instance, if you had two paths to reach a network, where one was a two-hop Ethernet
connection, and the other was a one-hop 64 Kbps WAN connection, RIP would use the
slower 64 Kbps connection because it has a lesser hop count value. You have to remember
this little tidbit when looking at how RIP will populate your router’s routing table. To
prevent packets from circling around a loop forever, both versions of RIP solve counting
to infinity by placing a hop count limit of 15 hops on packets. Any packet that reaches
the sixteenth hop will be dropped.
IP RIP
5
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:16 PM
Color profile: Generic CMYK printer profile
Composite Default screen
And as I mentioned in the last section, RIPv1 is a classful protocol. This is important
for configuring RIP and subnetting your IP addressing scheme: you can use only one
subnet mask value for a given Class A, B, or C network. For instance, if you have a Class
B network such as 172.16.0.0, you can subnet it with only one mask. As an example,
you couldn’t use 255.255.255.0 and 255.255.255.128 on 172.16.0.0—you can choose
only one.
Another interesting feature is that RIP supports up to six equal-cost paths to
a single destination, where all six paths can be placed in the routing table and
the router can load-balance across them. The
default is actually four paths, but this can be
increased up to a maximum of six. Remember
that an equal-cost path is where the hop count
value is the same. RIP will not load-balance
across unequal-cost paths.
Let’s look at Figure 10-2 to illustrate equal-
cost-path load balancing. In this example,
RouterA has two equal-cost paths to 10.0.0.0
(with a hop count of 1) via RouterB and RouterC. There are actually two advantages
of putting both of these paths in RouterA’s routing table:

First, the router can perform load balancing to 10.0.0.0, taking advantage of
the bandwidth on both of these links.

And second, convergence is sped up if one of the paths fails. For example, if
the connection between RouterA and RouterB fails, RouterA can still access
network 10.0.0.0 via RouterB and has this information in its routing table;
therefore, convergence is instantaneous.
For these two reasons, many routing protocols support parallel paths to a single
destination. Some protocols, such as IGRP and EIGRP, even support unequal-cost
load balancing, which is discussed in the section "IGRP" of this chapter.
RIPv2
One thing you have to keep in the back of your mind when dealing with RIPv2
is that it is based on RIPv1 and is, at heart, a distance vector protocol with routing
enhancements built into it. Therefore, it is commonly called a hybrid protocol. I
pointed out some of the characteristics that both versions of RIP have in common
in the preceding section. This section focuses on the characteristics unique to RIPv2.
One major enhancement to RIPv2 pertains to how it deals with routing updates.
Instead of using broadcasts, RIPv2 uses multicasts. And to speed up convergence,
6
Chapter 10: Configuring Distance Vector Protocols
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
IP RIPv1, a classful
protocol, broadcasts updates every 30
seconds, and has a hold-down period
of 180 seconds. Hop count is used as
a metric.
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:16 PM
Color profile: Generic CMYK printer profile
Composite Default screen
RIPv2 supports triggered updates—when a change occurs, a RIPv2 router will
immediately propagate its routing information to its connected neighbors.
A second major enhancement that RIPv2 has is that it is a classless protocol. RIPv2
supports variable-length subnet masking (VLSM), which allows you to use more than
one subnet mask for a given class network number. VLSM allows you to maximize
the efficiency of your addressing design as well as to summarize routing information
to create very large, scalable networks. VLSM is discussed in Chapter 12.
As a third enhancement, RIPv2 supports authentication. You can restrict what
routers you want to participate in RIPv2. This is accomplished using a hashed
password value.
Even with all of these advanced characteristics, RIPv2 is still, at heart, a distance
vector protocol. It uses hop count as a metric, supports the same solutions to solve
routing loop problems, has a 15-hop count limit, and shares other characteristics of
these protocols.
IP RIP
7
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
FIGURE 10-2
Equal-cost load
balancing
RIPv2 is a hybrid
protocol, based on RIPv1. It uses
multicasts to disseminate routing
information and supports triggered
updates. Unlike RIPv1, RIPv2 supports
VLSM, which allows you to summarize
routing information. Otherwise, its
characteristics are like RIPv1.
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:17 PM
Color profile: Generic CMYK printer profile
Composite Default screen
Configuring IP RIP
As you will see in this section, configuring RIP is a very easy and straightforward
process. The basic configuration of RIP involves the following two commands:
Router(config)# router rip
Router(config-router)# network
IP_network_#
As explained in the preceding section, RIPv1 is
classful and RIPv2 is classless. However, whenever
you configure either version of RIP, the network
command assumes classful: You need to enter only
the Class A, B, or C network number, not the
subnets, as was discussed earlier in this chapter.
If you refer back to Figure 10-1, the router’s RIPv1
configuration would look like this:
Router(config)# router rip
Router(config-router)# network 172.16.0.0
Router(config-router)# network 192.168.1.0
10.02. The CD contains a multimedia demonstration of a basic RIP
configuration on a router.
Specifying RIP Version 1 and 2
By default, the IOS accepts both RIPv1 and RIPv2 routing updates; however, it generates
only RIPv1 updates. You can configure your router to

Accept and send RIPv1 only

Accept and send RIPv2 only

Use a combination of the two, depending on your interface configuration
To accomplish either of the first two items in the list, you need to set the version
in your RIP configuration:
Router(config)# router rip
Router(config-router)# version 1|2
When you specify the appropriate version number, your RIP routing process will
send and receive only the version packet type that you configured.
You can also control which version of RIP is running on an interface-by-interface
basis. For instance, you might have a bunch of new routers at your site that support
8
Chapter 10: Configuring Distance Vector Protocols
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
Use the
router rip
and
network
commands to configure RIP
routing. Remember to put in the class
address (not the subnetted network
number) in the
network
statement.
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:17 PM
Color profile: Generic CMYK printer profile
Composite Default screen
both versions and a remote office that understands only RIPv1. In this situation, you
can configure your routers to generate RIPv2 updates on all their LAN interfaces, but
for the remote access connection at the corporate site, you could set the interface to
run only RIPv1.
To control which version of RIP should handle generating updates on an interface,
use the following configuration:
Router(config)# interface
type
[
slot_#
/]
port_#
Router(config-router)# ip rip send version 1 | version 2 |
version 1 2
With the ip rip send command, you can
control which version of RIP the router should
use on the specified interface when generating
RIP updates. You can be specific by specifying
version 1 or 2, or you can specify both.
To control what version of RIP should be
used when receiving RIP updates, use the
following configuration:
Router(config)# interface
type
[
slot_#
/]
port_#
Router(config-router)# ip rip receive version 1 | version 2 |
version 1 2
10.03. The CD contains a multimedia demonstration of RIPv2 configuration
on a router.
Configuration Example
Let’s use a simple network example, shown in Figure 10-3, to illustrate configuring
RIPv1.Here’s RouterA’s configuration:
RouterA(config)# router rip
RouterA(config-router)# network 192.168.1.0
RouterA(config-router)# network 192.168.2.0
Here’s RouterB’s configuration:
RouterB(config)# router rip
RouterB(config-router)# network 192.168.2.0
RouterB(config-router)# network 192.168.3.0
As you can see, to configure RIP is very easy.
IP RIP
9
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
A Cisco router running
RIP, by default, generates only RIPv1
updates but processes received v1 and
v2 updates. Use the
version
command
to change the RIP version.
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:17 PM
Color profile: Generic CMYK printer profile
Composite Default screen
Troubleshooting IP RIP
Once you have configured IP RIP, you have a variety of commands available to view
and troubleshoot your configuration and operation of RIP:

show ip protocols

show ip route

debug ip rip
The following sections cover these commands in more depth.
One other important command to point out is the clear ip route * Privilege
EXEC mode command. This command clears and rebuilds the IP routing table. Any
time that you make a change to a routing protocol, you should clear and rebuild the
routing table with this command. You can replace the “*” with a specific network
number, if you choose to do so this will only clear the specified route from the routing
table. Please note that the clear command only clears dynamic routes: static and
connected routes cannot be cleared from the routing table with this command.
The show ip protocols Command
The show ip protocols command displays all of the IP routing protocols that you
have configured and are running on your router. Here’s an example of this command:
Router# show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 5 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 Key-chain
Ethernet0 1 1 2
Ethernet1 1 1 2
10
Chapter 10: Configuring Distance Vector Protocols
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
FIGURE 10-3
RIPv1
configuration
example
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:17 PM
Color profile: Generic CMYK printer profile
Composite Default screen
Routing for Networks:
192.168.1.0
192.168.2.0
Routing Information Sources:
Gateway Distance Last Update
192.168.2.2 120 00:00:22
Distance: (default is 120)
In this example, RIP is running on the router.
The routing update interval is 30 seconds, with
the next update being sent in 5 seconds. You
can see that two interfaces are participating:
ethernet0 and ethernet1. On these
interfaces, RIPv1 is being used to generate
updates and both versions are accepted if they
are received on these two interfaces. You can see
the two networks specified with the network
commands: 192.168.1.0 and 192.168.2.0. In this example, this router received an
update 22 seconds ago from a neighboring router: 192.168.2.2. And last, the default
administrative distance of RIP is 120.
10.04. The CD contains a multimedia demonstration of the
show ip
protocols
command for RIP on a router.
The show ip route Command
Your router keeps a list of the best paths to destinations in a routing table. There is
a separate routing table for each routed protocol. For instance, if you are running IP
and IPX, your router will have two routing tables: one for each. However, if you are
running two routing protocols for a single routed protocol, such as IP RIPv1 and IGRP,
your router will have only one routing table for IP.
To view the routing table, use the show ip route command:
Router# show 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, * - candidate default,
U - per-user static route, o - ODR,
T - traffic engineered route
IP RIP
11
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
RIP advertises routes
every 30 seconds. Its hold-down period
is 180 seconds, and its flush period is 240
seconds. Know the output of the
show
ip protocols
command.
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:17 PM
Color profile: Generic CMYK printer profile
Composite Default screen
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Ethernet0
R 172.16.2.0 [120/1] via 172.16.1.2, 00:00:21, Ethernet0
192.168.1.0/24 is subnetted, 2 subnets
C 192.168.1.0 is directly connected, Serial0
R 192.168.2.0/24 [120/2] via 192.168.1.2, 00:00:02, Serial2
In this example, you can see that there are
two types of routes in the routing table: R is for
RIP, and C is for a directly connected network.
For the RIP entries, you can see two numbers
in brackets: the administrative distance of the
route and the metric. For instance, 172.16.2.0
has an administrative distance of 120 and a hop
count of 1. Following this is the neighboring RIP router that advertised the route
(172.16.1.2), how long ago an update for this route was received from the neighbor
(21 seconds), and on which interface this update was learned (Ethernet0).
10.05. The CD contains a multimedia demonstration of the
show ip route
command for RIP on a router.
The debug ip rip Command
Remember that the show commands show a static display of what the router knows
and sometimes don’t display enough information concerning a specific issue or problem.
For instance, you might be looking at your routing table with the show ip route
command and expect a certain RIP route to be appearing from a connected neighbor,
but this network is not being shown. Unfortunately, the show ip route command
won’t tell you why a route is or isn’t in the routing table. However, you can resort to
debug commands to assist you in your troubleshooting.
For more detailed troubleshooting of IP RIP problems, you can use the debug
ip rip command, shown here:
Router# debug ip rip
RIP protocol debugging is on
Router#
00:12:16: RIP: received v1 update from 192.168.1.2 on Serial0
00:12:16: 192.168.2.0 in 1 hops
00:12:25: RIP: sending v1 update to 255.255.255.255 via Ethernet0
172.16.1.1)
00:12:26: network 192.168.1.0, metric 0
00:12:26: network 192.168.2.0, metric 1
12
Chapter 10: Configuring Distance Vector Protocols
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
Remember the output of
the
show ip route
command for the
RIP routing protocol.
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:18 PM
Color profile: Generic CMYK printer profile
Composite Default screen
This command displays the routing updates sent and received on the router’s
interfaces. In this code example, the router received an update from 192.168.1.2 on
Serial0. This update contained one network: 192.168.2.0. After this update, you
can see that your router generated a RIP update (local broadcast 255.255.255.255)
on its Ethernet0 interface. This update contains two networks: 192.168.1.0 and
192.168.2.0. Also notice the metrics associated with these routes: 192.168.1.0 is
connected to this router, while 192.168.2.0 is one hop away. When the neighboring
router connected to Ethernet0 receives this update, it will increment the hop
count by 1 for each route in the update.
When using debug commands, you must be at Privilege EXEC mode. To disable a
specific debug command, negate it with the no parameter. To turn off debugging for
all debug commands, use either the undebug all or no debug all command.
10.06. The CD contains a multimedia demonstration of the
debug ip rip
command for RIP on a router.
EXERCISE 10-1
ON THE CD
Configuring RIP
These last few sections dealt with configuring RIP on a router. This exercise will help
you reinforce this material for setting up and troubleshooting RIP. You’ll perform this lab
using Boson’s NetSim™ simulator. This exercise has you set IP RIP on the two routers
(2600 and 2500). You can find a picture of the network diagram for Boson’s NetSim™
simulator in the Introduction for this book. After starting the simulator, click on the
LabNavigator button. Next, double-click on Exercise 10-1 and click on the Load Lab
button. This will load the lab configuration based on Chapter 5’s and 7’s exercises.
1. On the 2600, verify that the fa0/0 and s0 interfaces are up. If not, bring
them up. Examine the IP addresses configured on the 2600 and look at its
routing table.
IP RIP
13
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
Be familiar with the
output of the
debug ip rip
command
and how to disable debug: preface the
debug
command with the
no
parameter or
use the
undebug all
or
no debug all
command.
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:18 PM
Color profile: Generic CMYK printer profile
Composite Default screen
At the top of the simulator in the menu bar, click on the eRouters icon
and choose 2600. On the 2600, use the show interfaces command to
verify your configuration. If fa0/0 and s0 are not up, go into the interfaces
(fa0/0 and s0) and enable them: configure terminal, interface
type
[
slot_#
/]
port_#
, no shutdown, and end. Use the show
interfaces command to verify that the IP addresses you configured
in Chapter 5 are still there. Use the show ip route command. You
should have two connected networks: 192.168.1.0 connected to fa0/0
and 192.168.2.0 connected to s0.
2. On the 2500, verify that the e0 and s0 interfaces are up. If not, bring them up.
Examine the IP addresses configured on the 2500 and look at its routing table.
At the top of the simulator in the menu bar, click on the eRouters icon and
choose 2500. On the 2500, Use the show interfaces command to verify
your configuration. If e0 and s0 are not up, go into the interfaces (e0 and s0)
and enable them: configure terminal, interface
type port_#
,
no shutdown, and end. Use the show interfaces command to verify
your configuration. Use the show interfaces command to verify that the
IP addresses you configured in Chapter 5 are still there. Use the show ip
route command. You should have two connected networks: 192.168.3.0
connected to e0 and 192.168.2.0 connected to s0.
3. Test connectivity between Host1 and the 2600. Test connectivity between
Host3 and the 2500. Test connectivity between Host3 and Host1.
At the top of the simulator in the menu bar, click on the eStations icon and
choose Host1. From Host1, ping the 2600 router (the default gateway): ping
192.168.1.1. The ping should be successful. At the top of the simulator in
the menu bar, click on the eStations icon and choose Host3. From the Host3,
ping the 2500 router (the default gateway): ping 192.168.3.1. The ping
should be successful. From the Host3, ping Host1: ping 192.168.1.10.
The ping should fail. Why? there is no route from the 2500 to this destination.
(Look at the 2500’s routing table: it doesn’t list 192.168.1.0/24.)
4. Access the 2500 and examine the routing table to see why the ping failed.
At the top of the simulator in the menu bar, click on the eRouters icon and
choose 2500. Examine the routing table: show ip route. Notice that it
doesn’t list 192.168.1.0/24, which explains why Host3 can’t reach Host1.
5. Enable RIP on the 2600 and 2500 routers.
At the top of the simulator in the menu bar, click on the eRouters icon and
choose 2600. On the 2600, execute the following: router rip, network
14
Chapter 10: Configuring Distance Vector Protocols
CertPrs8 / CCNA Cisco Certified Network Associate Study Guide / Deal / 222934-9 / Chapter 10
D:\omh\CertPrs8\934-9\ch10.vp
Monday, August 04, 2003 12:13:18 PM
Color profile: Generic CMYK printer profile
Composite Default screen

Không có nhận xét nào:

Đăng nhận xét