Ch. 16/mod.7 - Distance Vector Routing Protocols Part 1 of 2: Distance Vector Routing and RIP RIP Routing Process

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

10/23/2012

RIP routing process


Ch. 16\Mod.7 – Distance Vector Routing
Protocols
Part 1 of 2: Distance Vector Routing and
RIP
CCNA 1 version 3.0 • Request for Comments (RFC) 1058
• RIP has evolved over the years from a Classful Routing Protocol, RIP
Version 1 (RIP v1), to a Classless Routing Protocol, RIP Version 2
(RIP v2). RIP v2 enhancements include:
– Ability to carry additional packet routing information.
– Authentication mechanism to secure table updates.
– Supports variable length subnet masking (VLSM).

Configuring RIP Configuring RIP

RIP and IGRP:


• Classful network statements only
• IOS will take subnetted networks but will translate it into
the classful network for the running-config.

1
10/23/2012

Configuring RIP Triggered Extensions

interface serial 0
ip rip triggered

Triggered Extensions to RIP


Clarifications (This is for IGPs only and not EGPs such as BGP): • http://www.cisco.com/en/US/products/sw/iosswrel/ps1830/products_feature_gu
• The network command does two things: ide09186a008008746f.html
1. Determines which interfaces will participate in sending and receiving routing • There were two problems using RIP to connect to a WAN:
updates, as long as the interface IP address falls in the range of the network – Periodic broadcasting by RIP generally prevented WAN circuits from being
command. closed.
2. Determines which networks this router will announce as being directly – Even on fixed, point-to-point links, the overhead of periodic RIP
connected to in its routing updates to other routers. transmissions could seriously interrupt normal data transfer because of the
• The network numbers do not necessarily have to be based on the network quantity of information that hits the line every 30 seconds.
class, as it depends on the routing protocol. Network numbers are based on • To overcome these limitations, triggered extensions to RIP cause RIP to send
the network class for RIP, IGRP, and usually EIGRP, but can be more specific information on the WAN only when there has been an update to the routing
for OSPF, EIGRP and IS-IS. database.
• Periodic update packets are suppressed over the interface on which this
feature is enabled.

Triggered Extensions The RIPv1 Protocol

Data Link IP Packet UDP RIP


Frame Header Segment Message
interface serial 0 Header Header
ip rip triggered
RIP Message
Data Link Frame
 MAC Source Address
• RFC 2091, Triggered Extensions to RIP to Support Demand Circuits.  MAC Destination Address = Broadcast
• When triggered extensions to RIP are enabled, routing updates are transmitted
on the WAN only if one of the following occurs: IP Packet
– The router receives a specific request for a routing update. (Full database is  IP Source Address
sent.)  IP Destination Address = Broadcast: 255.255.255.255
– Information from another interface modifies the routing database. (Only  Protocol field = 17 for UDP
latest changes are sent)
– The interface comes up or goes down. (Partial database is sent.) UDP Segment
– The router is first powered on, to ensure that at least one update is sent.  Source Port number field = 520 for RIP Message
(Full database is sent.)
• You might want to enable this feature if you are using an on-demand circuit and RIP Message (Data portion of IP Packet):
you are charged for usage time. Fewer routing updates will incur lower usage  Routes: Network IP Address
costs.  Hops (metric)

2
10/23/2012

Data Link IP Packet UDP RIP


Frame Header Segment Message RIP v2 message format
Header Header

0 7 8 15 16 23 24 31
Command = 1 or 2 Version = 1 Must be zero
Address family identifier (2 = IP) Must be zero
IP Address (Network Address)
Must be zero
Must be zero
Metric (Hops)

Multiple Routes, up to a maximum of 25

Address family identifier (2 = IP) Must be zero


IP Address (Network Address)
Must be zero
Must be zero
Metric (Hops)
• Command: 1 signifying a Request or 2 signifying a Reply
• Version: 1 for RIP v 1 or 2 for RIP v 2 • All the extensions to the original protocol are carried in the unused
• Address Family Identifier: 2 signifying IP (only exception is for a Request for the Router’s full routing
fields.
table in which case it will be set to zero, later Semester in RIP v 2)
• IP Address: The address of the destination route, which may be a network address, a subnet address • The Address Family Identifier (AFI) field is set to two for IP. The only
of a host address. exception is a request for a full routing table of a router or host, in
• Metric: Hop count between 1 and 16. Note: With RIP the sending router increases the metric before
sending out the RIP message. which case it will be set to zero.
• Note: The routing table knows the next-hop-ip-address (via) from the source IP address of the packet.

RIP v2 message format Configuring RIP

RIP must be enabled and the networks specified. The remaining tasks are
optional. Among these optional tasks are:
• Applying offsets to routing metrics (Not commonly used)
• Adjusting timers
• Specifying a RIP version (RIPv1 or RIPv2)
• Enabling RIP authentication
• The Route Tag field provides a way to differentiate between internal and • Configuring route summarization on an interface
external routes.
• Verifying IP route summarization
• External routes are those that have been redistributed into the RIP v2.
• Disabling automatic route summarization (RIPv2)
• The Next Hop field contains the IP address of the next hop listed in the IP
• Running IGRP and RIP concurrently (Usually, redistributing, not concurrently.)
Address field.
• Metric indicates how many internetwork hops, between 1 and 15 for a valid • Disabling the validation of source IP addresses
route, or 16 for an unreachable route. • Enabling or disabling split horizon
• Connecting RIP to a WAN

3
10/23/2012

ip classless command Parent and Child Routes

• IP classless only affects the operation of the forwarding processes in RouterB#show ip route

IOS. IP classless does not affect the way the routing table is built. 172.16.0.0/24 is subnetted, 3 subnets
• This command concerns classless and classful routing behavior, R
C
172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0
172.16.2.0 is directly connected, Serial0
which is not the same as classless and classful routing protocols C 172.16.3.0 is directly connected, FastEthernet0
(later). C 192.168.1.0/24 is directly connected, Serial1
S 172.0.0.0/8 is directly connected, Serial1
S 160.0.0.0/4 is directly connected, Serial1
• To discuss this command, we will use information which is not in the S* 0.0.0.0/0 is directly connected, Serial1

curriculum.
Parent Route
• For more information: • Created automatically whenever there is a route with a mask greater
than the classful mask.
– The Routing Table: Part 1 or 2 - The Routing Table Structure
(PDF) • For non-VLSM routes, contains the mask of the child routes.
Child Routes
– The Routing Table: Part 2 or 2 - The Routing Table Lookup
Process (PDF) • Routes with masks greater than the default classful mask.

Lookup what? Parent and Child Routes

RouterB#show ip route RouterB#show ip route

172.16.0.0/24 is subnetted, 3 subnets 172.16.0.0/24 is subnetted, 3 subnets


R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0 R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0
C 172.16.2.0 is directly connected, Serial0 C 172.16.2.0 is directly connected, Serial0
C 172.16.3.0 is directly connected, FastEthernet0 C 172.16.3.0 is directly connected, FastEthernet0
C 192.168.1.0/24 is directly connected, Serial1 C 192.168.1.0/24 is directly connected, Serial1
S 172.0.0.0/8 is directly connected, Serial1 S 172.0.0.0/8 is directly connected, Serial1
S 160.0.0.0/4 is directly connected, Serial1 S 160.0.0.0/4 is directly connected, Serial1
S* 0.0.0.0/0 is directly connected, Serial1 S* 0.0.0.0/0 is directly connected, Serial1

Routing Table process matches: DA = 192.168.1.10


• The routing table process compares the left-most bits in the packet’s • 16 bits of 172.16.0.0 do not match, so child routes are not checked.
destination IP address with the left-most bits in the route in the routing table,
looking for a longest-bit-match. • 24 bits of 192.168.1.0/24 do match, so this route is used.
• The subnet mask of the route in the routing table specifies the minimum
number of left-most bits that must match.
• Before checking child routes, the classful mask of the parent route is used.
• For child routes the parent route’s mask is used.
• For VLSM routes, the mask is contained with the child route.

4
10/23/2012

Parent and Child Routes Parent and Child Routes

RouterB#show ip route RouterB#show ip route

172.16.0.0/24 is subnetted, 3 subnets 172.16.0.0/24 is subnetted, 3 subnets


R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0 R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0
C 172.16.2.0 is directly connected, Serial0 C 172.16.2.0 is directly connected, Serial0
C 172.16.3.0 is directly connected, FastEthernet0 C 172.16.3.0 is directly connected, FastEthernet0
C 192.168.1.0/24 is directly connected, Serial1 C 192.168.1.0/24 is directly connected, Serial1
S 172.0.0.0/8 is directly connected, Serial1 S 172.0.0.0/8 is directly connected, Serial1
S 160.0.0.0/4 is directly connected, Serial1 S 160.0.0.0/4 is directly connected, Serial1
S* 0.0.0.0/0 is directly connected, Serial1 S* 0.0.0.0/0 is directly connected, Serial1

DA = 172.16.2.1 DA = 32.1.1.10
• 16 bits of 172.16.0.0 do match, so child routes are checked. • 16 bits of 172.16.0.0 do not match, so child routes are not checked.
• 24 bits of 172.16.1.0 do not match, so continue to next child route. • 24 bits of 192.168.1.0/24 do not match, so this route is not used.
• 24 bits of 172.16.2.0 do match, so this route is used! • 8 bits of 172.0.0.0/8 do not match, so this route is not used.
• Mask of all child routes are /24 due to the subnet-mask of parent route • 4 bits of 160.0.0.0/4 do not match, so this route is not used.
• 0 bits of 0.0.0.0/0 does match, so this route is used!

Parent and Child Routes Classful Routing Behavior

RouterB#show ip route RouterB#show ip route

172.16.0.0/24 is subnetted, 3 subnets 172.16.0.0/24 is subnetted, 3 subnets


R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0 R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0
C 172.16.2.0 is directly connected, Serial0 C 172.16.2.0 is directly connected, Serial0
C 172.16.3.0 is directly connected, FastEthernet0 C 172.16.3.0 is directly connected, FastEthernet0
C 192.168.1.0/24 is directly connected, Serial1 C 192.168.1.0/24 is directly connected, Serial1
S 172.0.0.0/8 is directly connected, Serial1 S 172.0.0.0/8 is directly connected, Serial1
S 160.0.0.0/4 is directly connected, Serial1 S 160.0.0.0/4 is directly connected, Serial1
S* 0.0.0.0/0 is directly connected, Serial1 S* 0.0.0.0/0 is directly connected, Serial1

DA = 172.16.4.1 DA = 172.16.4.1
• 16 bits of 172.16.0.0 do match, so child routes are checked. Router(config)# no ip classless
• 24 bits of 172.16.1.0 do not match, so continue to next child route. • With classful routing behavior, if the child routes are checked but
• 24 bits of 172.16.2.0 do not match, so continue to next child route. there are no matches, the routing lookup process ends and the Packet
is dropped. (The packets get in, but they can’t get out!)
• 24 bits of 172.16.3.0 do not match, no more child routes.
• Supernet and default routes are not checked.
Now what??? It depends!
• Default with IOS 11.2 and prior

5
10/23/2012

Classless Routing Behavior Common RIP Configuration Issues

RouterB#show ip route Split Horizon


• The following command is used to disable split horizon:
172.16.0.0/24 is subnetted, 3 subnets
R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0 GAD(config-if)#no ip split-horizon
C 172.16.2.0 is directly connected, Serial0
C 172.16.3.0 is directly connected, FastEthernet0
C 192.168.1.0/24 is directly connected, Serial1 • The following command is used to enable (default) split horizon:
S 172.0.0.0/8 is directly connected, Serial1
GAD(config-if)#ip split-horizon
S 160.0.0.0/4 is directly connected, Serial1
S* 0.0.0.0/0 is directly connected, Serial1

DA = 172.16.4.1
Router(config)# ip classless
• With classless routing behavior, if the child routes are checked but
there are no matches, the routing lookup process continues with other
routes in the routing table, including supernet and default routes.
• 8 bits of 172.0.0.0/8 do match, so this route is used!
• Default with IOS 11.3 and later

Common RIP Configuration Issues Common RIP Configuration Issues

Holddown Timer Update Timer


• The ideal setting would be to set the timer just longer that the longest • The default RIP update interval in Cisco IOS is 30 seconds. This can
possible update time for the internetwork. be configured for longer intervals to conserve bandwidth, or for shorter
• To change the holddown timer: intervals to decrease convergence time.
Router(config-router)#timers basic update invalid • To change the update internal:
holddown flush [sleeptime] GAD(config-router)#update-timer seconds

6
10/23/2012

Common RIP Configuration Issues Common RIP Configuration Issues

router rip
passive-interface fastethernet 0/0

• Because RIP is a broadcast protocol, the network administrator may


have to configure RIP to exchange routing information in a non-
For RIP and IGRP, the passive interface command stops the router from broadcast network such as Frame Relay.
sending updates to a particular neighbor, but the router continues to • In this type of network, RIP needs to be told of other neighboring RIP
listen and use routing updates from that neighbor. (More later.) routers.
• Also used when there are no routers on that interface, such as stub • To do this use the router rip command:
LANs. Router(config-router)# neighbor ip address

Router(config-router)# passive-interface interface

Common RIP Configuration Issues Compatibility with RIP v1

• By default, the Cisco IOS software receives RIP Version 1 and Version NewYork

2 packets, but sends only Version 1 packets. interface fastethernet0/0


• The network administrator can configure the router to only receive and ip address 192.168.50.129 255.255.255.192
send Version 1 packets or the administrator can configure the router to ip rip send version 1
send only Version 2 packets. 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 router rip
to send both version 1 and 2
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.

7
10/23/2012

Verifying RIP configuration Verifying RIP configuration

• Also: show running-config

Troubleshooting RIP update issues Troubleshooting RIP update issues

Other commands to troubleshoot RIP:


• show ip rip database
• show ip protocols {summary}
• show ip route
• debug ip rip {events}
• show ip interface brief

8
10/23/2012

Load balancing with RIP Fast Switching and Process Switching


The following information is taken from Routing TCP/IP Volume I by Jeff Doyle.
• RIP is capable of load balancing over as many as six equal-cost paths,
with four paths being default. RIP performs what is referred to as
• Load sharing or Load balancing allows routers to take advantage of
“round robin” load balancing.
multiple paths to the same destination.
• This means that RIP takes turns forwarding packets over the parallel
• Equal-cost load balancing:
paths.
– Distributes packets equally among multiple paths with equal metrics
– RIP, IGRP, EIGRP, OSPF, IS-IS and BGP
• This is only part of the story…
• Unequal-cost load balancing:
– Distributes packets among multiple paths with different metrics,
inversely proportional to the cost of the routes.
– EIGRP
• Load sharing can be either:
– Per Destination (Fast Switching)
– Per Packet ( Process Switching)

Fast Switching Fast Switching


– Per Destination Load Balancing – Per Destination Load Balancing
Router(config-if)# ip route-cache Router(config-if)# ip route-cache

ping 10.0.0.2 ping 10.0.0.1 ping 10.0.0.2 ping 10.0.0.1

• The default for most interfaces is Fast Switching. Fast Switching


• Load balancing is distributed according to the destination IP address. 1. Router switches first packet to a particular destination, a routing table lookup
• Given two paths to the same network, all packets for one destination IP is performed and an exit interface is selected.
address will travel over the first path, all packets for a second destination will 2. The necessary data-link information to frame the packet for the selected
travel over the second path, all packets for the third destination will again travel interface is retrieved including any ARP cache information.
over the first path, and so on. 3. The route and data-link information is stored in fast switching cache.
• To enable fast switching: 4. The router uses the cache to look up subsequent packets.
Router(config-if)# ip route-cache 5. All other packets to the same destination are immediately switched out the
• To enable distributed or process switching: same interface without the router performing another routing table lookup,
Router(config-if)# no ip route-cache including any recursive lookups. (Also no ARP cache lookup).

9
10/23/2012

Process Switching
Which one?
– Per Packet Load Balancing
Router(config-if)#no ip route-cache Fast Switching Process Switching

ping 10.0.0.2 ping 10.0.0.1

ping 10.0.0.1 ping 10.0.0.2 ping 10.0.0.1


ping 10.0.0.2

Process Switching
• Given equal cost paths, per packet load sharing means that one packet to a
destination is sent over one link, the next packet to the same destination is
sent over the next link, and so on. Router(config-if)# ip route-cache Router(config-if)#no ip route-cache
• If the paths are unequal cost, the load balancing may be one packet over the
higher-cost link for every three packets over the lower-cost link, or similar Fast Switching or Process Switching
ratio. • Process switching (per packet load balancing) has a price, load
• With process switching, for every packet, the router performs a route table balancing may be distributed more evenly but the lower switching time
lookup and selects an interface, and looks up the data-link information. and processor utilization of fast switching are lost.
• To enable distributed or process switching:
Router(config-if)# no ip route-cache

Using debug ip packet with


Load balancing across multiple paths
Fast Switching and Process Switching
Router# debug ip packet
IP: s=192.168.3.2 (FastEthernet0), d=10.0.0.1 (Serial0/0), • Note: The example used in this section of the online curriculum is really
g=192.168.1.2, forward for IGRP/EIGRP and does not fit well in this section of RIP.
IP: s=192.168.3.2 (FastEthernet0), d=10.0.0.1 (Serial0/1), • By default, most IP routing protocols install a maximum of four parallel
g=192.168.2.2, forward routes in a routing table.
IP: s=192.168.3.2 (FastEthernet0), d=10.0.0.1 (Serial0/0),
g=192.168.1.2, forward
• Static routes always install six routes.
IP: s=192.168.3.2 (FastEthernet0), d=10.0.0.1 (Serial0/1), • The exception is BGP, which by default allows only one path to a
g=192.168.2.2, forward destination.
• The range of maximum paths is one to six paths. To change the
maximum number of parallel paths allowed, use the following
• debug ip packet can be used to observe packets sent command in router configuration mode:
and received and the interfaces that are involved.
Router(config-router)#maximum-paths [number]
• IMPORTANT: The debug ip packet command allows
only process switched packets to be observed. Fast switch
packets are not displayed (except for the first packet in the
flow).

10
10/23/2012

RIP and Administrative Distance RIP and Floating Static Routes

172.16.0.0/16
X

router rip
network 192.168.14.0
ip route 172.16.0.0 255.255.0.0 bri0/1 130

• Floating static routes are static routes which are used as backup
routes.
• They are only injected into the routing table when a route with a lower
administrative distance (dynamic or another static route) goes down.
• Should the route with the lower administrative distance come back up
then the floating static route is removed from the routing table.

Redistribute Static RIPv1 Labs – 3 Scenarios

172.16.0.0/16
• Read the following lab.
• In groups review the configurations and the outputs.
• Afterwards, we will discuss the this lab together, paying
RouterA
ip route 172.16.0.0 255.255.0.0 eth 0 particular attention to the Reflection sections.
RIP Router rip
redistribute static
network ….

• Redistributes static routes into the dynamic routing domain.


• 172.16.0.0/16 will be seen by other RIP routers as a
dynamic route learned via RIP.
• The default metric is 0, so B and D will have a hop count of
1, where C will have a hop count of 2.

11
10/23/2012

RIPv1 Labs – 3 Scenarios RIPv1 Labs – 3 Scenarios

Objective Setup
• In this lab, you will configure RIP routing in three different scenarios. • Use the 8 Steps to Success to help you configure the routers.
• At the end of each scenario, all hosts and all routers should be able to reach • Be sure your cabling is correct, as this causes more troubleshooting issues
(ping) each other. than anything else.
• If the routers have a startup-config already on them, erase it and reboot the
routers.
Scenario • Configure the routers to include hostnames and the proper interface
There are five separate classful networks. After configuring RIP, we want to view commands including IP addresses, subnet masks, etc.
the RIP update messages being sent and received by each router. • Each router should be able to ping the interface of the adjacent (neighboring)
router and the host on its LAN (Ethernet) interface.
• Scenario 1: Running RIPv1 on classful networks • Test and troubleshoot as necessary.
• Scenario 2: Running RIPv1 on subnets and between classful networks
Basic Configurations
• Scenario 3: Running RIPv1 on a stub network
• There is a Basic Configuration included for each scenario, but it does not
include clock rate, no shutdown and some other necessary commands.
These three scenarios can be done in sequence or separately. • Note: Even though some of the networks are in numerical order, obviously this
does not need to be the case. We only did this to make it easier to remember
where the networks originated from.

Scenario 1: Running RIPv1 on classful networks


RIPv1 Labs – 3 Scenarios
SanJose2
hostname SanJose2
interface ethernet 0
Optional: Keeping outputs from interrupting our inputs ip add 192.168.1.1 255.255.255.0
interface serial 0
ip add 192.168.2.1 255.255.255.0
Before we begin to configure RIP, lets configure the console 0 port to keep debug and other
output messages from interrupting our input. Use the following command on each router SanJose1
to keep the debug out from interfering with you command-line input: hostname SanJose1
interface ethernet 0
ip add 192.168.3.1 255.255.255.0
Router(config)# line console 0 interface serial 0
Router(config-line)# logging synchronous ip add 192.168.2.2 255.255.255.0
interface serial 1
ip add 192.168.4.2 255.255.255.0
Optional: Changing the default timeout
Baypointe
After 10 minutes, by default, if there is no input via the console, the user will be logged off. hostname Baypointe
interface ethernet 0
Although a good idea in production environment, in a lab environment this can be
ip add 192.168.5.1 255.255.255.0
somewhat annoying. To turn-off the automatic timeout feature, we use the command: interface serial 0
exec-timeout minutes [seconds], setting both the minutes and seconds to 0. ip add 192.168.4.1 255.255.255.0

Router(config)# line console 0


Router(config-line)# exec-timeout 0 0

12
10/23/2012

Scenario 1: Running RIPv1 on classful networks Scenario 1: Running RIPv1 on classful networks

Objective: Running RIPv1 on classful networks Here are the commands for each router:

This scenario is the same one we used in the network discovery lab, with the same SanJose2#configure terminal
configurations and the same outputs. The concepts specific to this scenario will become Enter configuration commands, one per line. End with CNTL/Z.
more clear when we view the differences between this scenario and Scenario 2: Running SanJose2(config)#router rip
RIPv1 on subnets and between classful networks. SanJose2(config-router)#network 192.168.1.0
SanJose2(config-router)#network 192.168.2.0
Step 1 – Configuring RIP
Baypointe#configure terminal
First, lets enable RIP on each router. Enter configuration commands, one per line. End with CNTL/Z.
Baypointe(config)#router rip
From global configuration you will enter the command (the default is RIPv1): Baypointe(config-router)#network 192.168.4.0
Router(config)#router rip Baypointe(config-router)#network 192.168.5.0

Once you are in the Router RIP configuration sub-mode, all you need to do is enter the SanJose1#configure terminal
classful network address for each directly connected network, using the network Enter configuration commands, one per line. End with CNTL/Z.
command. SanJose1(config)#router rip
Router(config-router)#network directly-connected-classful-network- SanJose1(config-router)#network 192.168.2.0
address SanJose1(config-router)#network 192.168.3.0
SanJose1(config-router)#network 192.168.4.0

Step 2 – Understanding the network command


Scenario 1: Running RIPv1 on classful networks
SENDING RIP MESSAGES
Each router will begin to send RIP update message out each interface belonging to one of the network
statements. LISTENING FOR RIP MESSAGES
SanJose2(config)#router rip Routers will also listen for RIP messages on each interface belonging to one of the
SanJose2(config-router)#network 192.168.1.0 network statements.
SanJose2(config-router)#network 192.168.2.0

For example, SanJose2 to will listen for RIP update messages on Ethernet 0
For example, SanJose2 to will send out RIP update messages on Ethernet 0 because that interface has an because that interface has an IP address that belong to the network
IP address that belong to the network 192.168.1.0, and on Serial 0 because that interface has an IP
address that belongs to the network 192.168.2.0.
192.168.1.0, and also listen for RIP update messages on Serial 0 because that
interface has an IP address that belongs to the network 192.168.2.0.
Just because a router has a directly connected network does not mean it will automatically include that
network in its routing updates to neighboring routers. The network command also tells the RIP to As RIP messages are received router, will add those networks in the messages to
include these networks in its updates to adjacent neighbors. their routing tables:
To view the RIP messages being sent and received use the debug ip rip command. If the RIP message contains a network not currently in the routing table.
If the RIP message contains a network with a better metric (fewer hops) than an
SanJose2# debug ip rip
entry currently in the routing table.
RIP protocol debugging is on

SanJose2 SanJose2
01:03:27: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (192.168.1.1) 01:10:56: RIP: received v1 update from 192.168.2.2 on Serial0
01:03:27: network 192.168.2.0, metric 1
01:03:27: RIP: sending v1 update to 255.255.255.255 via Serial0 (192.168.2.1)
01:10:56: 192.168.4.0 in 1 hops
01:03:27: network 192.168.1.0, metric 1 01:10:56: 192.168.3.0 in 1 hops

13
10/23/2012

SanJose2
Scenario 1: Running RIPv1 on classful networks 01:30:45: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (192.168.1.1)
01:30:45: network 192.168.4.0, metric 2
01:30:45: network 192.168.5.0, metric 3
01:30:45: network 192.168.2.0, metric 1
01:30:45: network 192.168.3.0, metric 2
Step 3 – Viewing the debug ip rip output and the routing tables 01:30:45: RIP: sending v1 update to 255.255.255.255 via Serial0 (192.168.2.1)
01:30:45: network 192.168.1.0, metric 1
SanJose2#
Remember that SanJose1 will learn routes to networks from SanJose2. It 01:30:50: RIP: received v1 update from 192.168.2.2 on Serial0
01:30:50: 192.168.4.0 in 1 hops
will then send that information to Baypointe, telling Baypointe that it is 01:30:50: 192.168.5.0 in 2 hops
the next hop to get to those networks, and incrementing the metric (hop 01:30:50: 192.168.3.0 in 1 hops
count) by one. SanJose2#

SanJose2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
After convergence, each router will continue to send its RIP update <omitted>
messages out the appropriate interfaces every 30 seconds. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
Lets look at the debug messages and the routing table for each router:
R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:10, Serial0
R 192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:10, Serial0
C 192.168.1.0/24 is directly connected, Ethernet0
C 192.168.2.0/24 is directly connected, Serial0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:10, Serial0
SanJose2#

SanJose1 Baypointe
01:33:05: RIP: received v1 update from 192.168.4.1 on Serial1 01:34:53: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (192.168.5.1)
01:33:05: 192.168.5.0 in 1 hops 01:34:53: network 192.168.4.0, metric 1
SanJose1# 01:34:53: network 192.168.1.0, metric 3
01:33:07: RIP: received v1 update from 192.168.2.1 on Serial0 01:34:53: network 192.168.2.0, metric 2
01:33:07: 192.168.1.0 in 1 hops 01:34:53: network 192.168.3.0, metric 2
01:33:08: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (192.168.3.1) 01:34:53: RIP: sending v1 update to 255.255.255.255 via Serial0 (192.168.4.1)
01:33:08: network 192.168.4.0, metric 1 01:34:53: network 192.168.5.0, metric 1
01:33:08: network 192.168.5.0, metric 2 Baypointe#
01:33:08: network 192.168.1.0, metric 2 01:34:56: RIP: received v1 update from 192.168.4.2 on Serial0
01:33:08: network 192.168.2.0, metric 1 01:34:56: 192.168.1.0 in 2 hops
01:33:08: RIP: sending v1 update to 255.255.255.255 via Serial0 (192.168.2.2) 01:34:56: 192.168.2.0 in 1 hops
01:33:08: network 192.168.4.0, metric 1 01:34:56: 192.168.3.0 in 1 hops
01:33:08: network 192.168.5.0, metric 2
01:33:08: network 192.168.3.0, metric 1 Baypointe#show ip route
01:33:08: RIP: sending v1 update to 255.255.255.255 via Serial1 (192.168.4.2) Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
01:33:08: network 192.168.1.0, metric 2 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
01:33:08: network 192.168.2.0, metric 1 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
01:33:08: network 192.168.3.0, metric 1 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
SanJose1#show ip route U - per-user static route, o - ODR
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP Gateway of last resort is not set
<omitted>
Gateway of last resort is not set C 192.168.4.0/24 is directly connected, Serial0
C 192.168.4.0/24 is directly connected, Serial1 C 192.168.5.0/24 is directly connected, Ethernet0
R 192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:12, Serial1 R 192.168.1.0/24 [120/2] via 192.168.4.2, 00:00:23, Serial0
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:10, Serial0 R 192.168.2.0/24 [120/1] via 192.168.4.2, 00:00:23, Serial0
C 192.168.2.0/24 is directly connected, Serial0 R 192.168.3.0/24 [120/1] via 192.168.4.2, 00:00:23, Serial0
C 192.168.3.0/24 is directly connected, Ethernet0

14
10/23/2012

Scenario 2: Running RIPv1 on subnets and between


Scenario 1: Running RIPv1 on classful networks classful networks
SanJose2
Note: This lab has some hostname SanJose2
NOTE: At this point all routers should be able to ping all networks. We will discuss RIP much interface ethernet 0
important information regarding ip add 172.30.1.1 255.255.255.0
more in the chapter on Routing Protocols (RIP).
RIP and boundary routers! interface serial 0
ip add 172.30.2.1 255.255.255.0
Step 4 – Turning-off debug
SanJose1
Don’t forget to turn-off debug when you are done collecting the output. hostname SanJose1
interface ethernet 0
ip add 172.30.3.1 255.255.255.0
Router# undebug all interface serial 0
or ip add 172.30.2.2 255.255.255.0
Baypointe# undebug ip rip interface serial 1
ip add 192.168.4.9 255.255.255.252

Step 5 – Reflections
Baypointe
• For each router compare the RIP received messages with its routing table. Now you see hostname Baypointe
how the information is entered into the routing table. interface ethernet 0
• Cisco IOS uses split horizon with poison reverse, however this information is not ip add 192.168.5.1 255.255.255.0
displayed with debug ip rip command. interface serial 0
• You will notice that the routers send RIP messages out their stub Ethernet interfaces, ip add 192.168.4.10 255.255.255.252
even though there are no routers out there to receive those messages. This does take up
unnecessary bandwidth on the link; so later we will see how to keep those RIP messages
from going out those interfaces.

Scenario 2: Running RIPv1 on subnets and between Scenario 2: Running RIPv1 on subnets and between
classful networks classful networks

Objective: Running RIPv1 on subnets and between classful networks


Step 1 – Configuring RIP
In this scenario we will see how subnetted routes are distributed with the same classful
network. We will also see how RIPv1 automatically summarizes between classful Once again, lets enable RIP on each router.
network boundaries. You will notice that SanJose1 and SanJose2 have subnets
belonging to the 172.30.0.0 network, but Baypointe does not.
Once you are in the Router RIP configuration sub-mode, all you need to do
Making changes between Scenario 1 and Scenario 2 is enter the classful network address for each directly connected
network, using the network command. If a router has multiple
Be sure to change the IP addressing as displayed in the diagram and Basic Configuration interfaces on the same classful network, you will only need to enter a
section for Scenario 2. Sometimes when changing the IP address on a serial single command enabling RIP on all interfaces for that network.
interface, you may need to reset that interface by doing a shutdown, wait for the
LINK-5-CHANGED message, then follow it with a no shutdown command.
Router(config-router)#network directly-connected-
If you have just completed Scenario 1, lets remove RIP by issuing the following command classful-network-address
on each router:

Router(config)# no router rip

15
10/23/2012

Here are the commands for each router: Scenario 2: Running RIPv1 on subnets and between
SanJose2#configure terminal
classful networks
Enter configuration commands, one per line. End with CNTL/Z.
SanJose2(config)#router rip Question: What would happen if you entered a network statement that
SanJose2(config-router)#network 172.30.0.0
was a subnet? For example:
Notice we only used a single network statement for SanJose2, which includes both interfaces, on different SanJose2(config)#router rip
subnets, of the 172.30.0.0 major network. SanJose2(config-router)#network 172.30.1.0
SanJose1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Answer: The IOS would automatically convert it to a classful network
SanJose1(config)#router rip
statement:
SanJose1(config-router)#network 172.30.0.0
SanJose1(config-router)#network 192.168.4.0 SanJose2#show running-config
router rip
Again, notice that we only used a single network statement for SanJose1, which includes both interfaces, on
different subnets, of the 172.30.0.0 major network. network 172.30.0.0

Baypointe#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Baypointe(config)#router rip
Baypointe(config-router)#network 192.168.4.0
Baypointe(config-router)#network 192.168.5.0

Step 2 – Viewing the debug ip rip output and the routing tables
SanJose2
Scenario 2: Running RIPv1 on subnets and between
SanJose2# debug ip rip classful networks
00:14:10: RIP: received v1 update from 172.30.2.2 on Serial0
00:14:10: 172.30.3.0 in 1 hops
00:14:10: 192.168.4.0 in 1 hops Reflections
00:14:10: 192.168.5.0 in 2 hops
SanJose2# • IMPORTANT INFORMATION: RIPv1 is a classful routing protocol. Classful routing
00:14:29: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (172.30.1.1) protocols do not send the subnet mask with network in routing updates, ie. 172.30.1.0 is
00:14:29: subnet 172.30.2.0, metric 1 sent by SanJose1 to SanJose2 without any subnet mask information.
00:14:29: subnet 172.30.3.0, metric 2
00:14:29: network 192.168.4.0, metric 2 • QUESTION: Notice that SanJose2 is receiving the subnet 172.30.3.0 from SanJose1,
00:14:29: network 192.168.5.0, metric 3 which is put in the routing table under the parent network (classful network) of 172.30.0.0
00:14:29: RIP: sending v1 update to 255.255.255.255 via Serial0 (172.30.2.1) with the /24 subnet mask (172.30.0.0/24 is subnetted, 3 subnets). Also notice that the
00:14:29: subnet 172.30.1.0, metric 1 RIP message received from SanJose1 was “172.30.3.0 in 1 hops” but did not include a
SanJose2#
00:14:39: RIP: received v1 update from 172.30.2.2 on Serial0
subnet mask for the subnet. How does SanJose2 know that this subnet has a /24
00:14:39: 172.30.3.0 in 1 hops (255.255.255.0) subnet mask?
00:14:39: 192.168.4.0 in 1 hops • ANSWER: SanJose2 received this information on an interface belonging to the same
00:14:39: 192.168.5.0 in 2 hops classful network as the incoming 172.30.3.0 update. The IP address that SanJose1
SanJose2# undebug all
received the “172.30.3.0 in 1 hops” message was on (Serial 0) with an IP address of
SanJose2#show ip route 172.30.2.1 and a subnet mask of 255.255.255.0. SanJose2 uses its own subnet mask
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP and applies it to this and all other 172.30.0.0 subnets it receives on this interface. The
<omitted> 172.30.3.0 network is placed with the other 172.30.0.0 /24 subnets in the routing table.
Gateway of last resort is not set
172.30.0.0/24 is subnetted, 3 subnets • Routers running RIPv1 are limited to using the same subnet mask for all subnets with the
C 172.30.2.0 is directly connected, Serial0 same classful network. Classless routing protocols like RIPv2 allow the same major
R 172.30.3.0 [120/1] via 172.30.2.2, 00:00:08, Serial0 (classful) network to use different subnet masks on different subnets. This is known as
C 172.30.1.0 is directly connected, Ethernet0 VLSM (Variable Length Subnet Masks) and is discussed later (Cabrillo’s CCNA Sem 2
R 192.168.4.0/24 [120/1] via 172.30.2.2, 00:00:08, Serial0
R 192.168.5.0/24 [120/2] via 172.30.2.2, 00:00:08, Serial0
course and the CCNP Advanced Routing).

16
10/23/2012

SanJose1
SanJose1#debug ip rip Scenario 2: Running RIPv1 on subnets and between
RIP protocol debugging is on
SanJose1# classful networks
00:17:52: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (172.30.3.1)
00:17:52: subnet 172.30.2.0, metric 1
00:17:52: subnet 172.30.1.0, metric 2 Reflections
00:17:52: network 192.168.4.0, metric 1
00:17:52: network 192.168.5.0, metric 2 • The same subnet route information applies with routes sent from
00:17:52: RIP: sending v1 update to 255.255.255.255 via Serial0 (172.30.2.2)
00:17:52: subnet 172.30.3.0, metric 1
SanJose2 to SanJose1 (see Reflections for SanJose2).
00:17:52:
00:17:52:
network 192.168.4.0, metric 1
network 192.168.5.0, metric 2
• SanJose1 knows that the 172.30.1.0 update has a subnet mask of /24
00:17:52: RIP: sending v1 update to 255.255.255.255 via Serial1 (192.168.4.9) because it received it on an interface with a /24 subnet mask (Serial 0,
00:17:52: network 172.30.0.0, metric 1
SanJose1#
172.30.3.2 255.255.255.0).
00:18:10: RIP: received v1 update from 172.30.2.1 on Serial0
00:18:10: 172.30.1.0 in 1 hops
SanJose1#
00:18:12: RIP: received v1 update from 192.168.4.10 on Serial1
00:18:12: 192.168.5.0 in 1 hops
SanJose1# undebug all
SanJose1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
<omitted>
Gateway of last resort is not set
172.30.0.0/24 is subnetted, 3 subnets
C 172.30.2.0 is directly connected, Serial0
C 172.30.3.0 is directly connected, Ethernet0
R 172.30.1.0 [120/1] via 172.30.2.1, 00:00:14, Serial0
192.168.4.0/30 is subnetted, 1 subnets
C 192.168.4.8 is directly connected, Serial1
R 192.168.5.0/24 [120/1] via 192.168.4.10, 00:00:10, Serial1

SanJose1#debug ip rip
RIP protocol debugging is on
Scenario 2: Running RIPv1 on subnets and between
SanJose1# classful networks
00:17:52: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (172.30.3.1)
00:17:52: subnet 172.30.2.0, metric 1
00:17:52: subnet 172.30.1.0, metric 2 More Reflections
00:17:52: network 192.168.4.0, metric 1
00:17:52: network 192.168.5.0, metric 2 • IMPORTANT INFORMATION: Notice the RIP update being sent out Serial 1:
00:17:52: RIP: sending v1 update to 255.255.255.255 via Serial0 (172.30.2.2) RIP: sending v1 update to 255.255.255.255 via Serial1 (192.168.4.9)
00:17:52: subnet 172.30.3.0, metric 1
network 172.30.0.0, metric 1
00:17:52: network 192.168.4.0, metric 1
00:17:52: network 192.168.5.0, metric 2
00:17:52: RIP: sending v1 update to 255.255.255.255 via Serial1 (192.168.4.9) • Compare that to the same information for the 172.30.0.0 network being sent out
00:17:52: network 172.30.0.0, metric 1
SanJose1#
Serial 0 & Ethernet 0:
00:18:10: RIP: received v1 update from 172.30.2.1 on Serial0 RIP: sending v1 update to 255.255.255.255 via Serial0 (172.30.2.2)
00:18:10: 172.30.1.0 in 1 hops subnet 172.30.3.0, metric 1
SanJose1#
00:18:12: RIP: received v1 update from 192.168.4.10 on Serial1
00:18:12: 192.168.5.0 in 1 hops • Notice that the 172.30.0.0 subnets are being summarized to their classful
SanJose1# undebug all network address of 172.30.0.0 when sent out Serial 1 to Baypointe.
SanJose1#show ip route • RIP automatically summarizes RIP updates between classful networks.
Codes: <omitted> Because the 172.30.0.0 update is being sent out an interface (Serial 1) on a
Gateway of last resort is not set different classful network (192.168.4.0), RIP sends out only a single update for
172.30.0.0/24 is subnetted, 3 subnets
the entire classful network instead of all of the different subnets. This is similar
C 172.30.2.0 is directly connected, Serial0
C 172.30.3.0 is directly connected, Ethernet0 to what we did with summarizing several static routes into a single static route.
R 172.30.1.0 [120/1] via 172.30.2.1, 00:00:14, Serial0 • A router like SanJose1, which has an interface in more than one classful
192.168.4.0/30 is subnetted, 1 subnets
network is sometimes called a “boundary router” in RIP. Boundary routers
C 192.168.4.8 is directly connected, Serial1
R 192.168.5.0/24 [120/1] via 192.168.4.10, 00:00:10, Serial1
automatically summarize RIP subnets from one classful network to the other.

17
10/23/2012

Scenario 2: Running RIPv1 on subnets and between Baypointe


Baypointe#debug ip rip
classful networks RIP protocol debugging is on
Baypointe#
00:20:09: RIP: received v1 update from 192.168.4.9 on Serial0
More Reflections (continued)
00:20:09: 172.30.0.0 in 1 hops
• How is this an advantage? Fewer updates sent and received, resulting in less Baypointe#
bandwidth used for routing updates between SanJose1 and Baypointe. Just as 00:20:24: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (192.168.5.1)
importantly, Baypointe will now only have a single route for the 172.30.0.0/16 00:20:24: network 172.30.0.0, metric 2
network, no matter how many subnets there are or how it is subnetted. This will 00:20:24: network 192.168.4.0, metric 1
result in faster lookup process in the routing table for Baypointe. 00:20:24: RIP: sending v1 update to 255.255.255.255 via Serial0 (192.168.4.10)
• What do you expect to see in Baypointe’s received RIP messages and its 00:20:24: network 192.168.5.0, metric 1
Baypointe#
routing table? That’s right, only a single 172.30.0.0 network via SanJose1.
Baypointe#undebug all
• Are there any disadvantages? Yes, discontinguous networks. We will see Baypointe#show ip route
this later, but the idea here is what if Baypointe had another connection via Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
Serial 1 to another router, SantaCruz1 on 192.168.4.12/30 subnet, which also <omitted>
has other 172.30.0.0/24 subnets (172.30.4.0/24, 172.30.5.0/24, etc.). Gateway of last resort is not set
Baypointe would also receive the same 172.30.0.0 network from SantaCruz1 as
well. Baypointe would not know how to reach the specific subnet, and R 172.30.0.0/16 [120/1] via 192.168.4.9, 00:00:11, Serial0
mistakenly load-balance the packets between the two routers. We will see an 192.168.4.0/30 is subnetted, 1 subnets
example of this later this semester. C 192.168.4.8 is directly connected, Serial0
C 192.168.5.0/24 is directly connected, Ethernet0

Scenario 2: Running RIPv1 on subnets and between Scenario 3: Running RIPv1 on a stub network
classful networks SanJose2
hostname SanJose2
interface ethernet 0
Reflections ip add 172.30.1.1 255.255.255.0
• Notice that Baypointe is only receiving the classful summary of the 172.30.0.0 interface serial 0
ip add 172.30.2.1 255.255.255.0
subnets:
RIP: received v1 update from 192.168.4.9 on Serial0 SanJose1
172.30.0.0 in 1 hops hostname SanJose1
interface ethernet 0
• SanJose1 automatically summarized the subnets into a single classful update. ip add 172.30.3.1 255.255.255.0
• This keeps Baypointe’s routing table smaller, resulting in faster routing table interface serial 0
ip add 172.30.2.2 255.255.255.0
lookups. interface serial 1
• This also isolates any changes in the 172.30.0.0 network on SanJose1 and ip add 192.168.4.9 255.255.255.252
SanJose2 from affecting Baypointe. In other words, SanJose1 and SanJose2
Baypointe
can add and delete 172.30.0.0/24 subnets without affecting Baypointe’s routing hostname Baypointe
table, as Baypointe doesn’t care. Baypointe will send all packets destined for interface ethernet 0
the 172.30.0.0/16 network to SanJose1. Baypointe’s routing table: ip add 192.168.5.1 255.255.255.0
R 172.30.0.0/16 [120/1] via 192.168.4.9, 00:00:11, Serial0 interface serial 0
ip add 192.168.4.10 255.255.255.252

Also, the subnet mask scheme could be changed (i.e. to /27) on the 172.30.0.0
network without affecting Baypointe’s routing table or the RIP update sent to
Baypointe by SanJose1.

18
10/23/2012

Objective: Running RIPv1 on a stub network


Making changes between Scenario 2 and Scenario 3
In this scenario we will modify Scenario 2 to only run RIP between SanJose1 and SanJose2. Scenario 3 is a
very common situation for many companies. It is very common that a company will want to run a
dynamic routing protocol (RIPv1 in our case) within their own network, but find in unnecessary to run a Be sure to change the IP addressing as displayed in the diagram and Basic
dynamic routing protocol between their company and their ISP. Configuration section for Scenario 3. Sometimes when changing the IP address
on a serial interface, you may need to reset that interface by doing a shutdown,
For Scenario 3 let us assume that Baypointe is the ISP for our Company XYZ, which consists of the wait for the LINK-5-CHANGED message, then follow it with a no shutdown
SanJose1 and SanJose2 routers using the 172.30.0.0/16 major network, subnetted with a /24 mask. command.
Company XYZ is a stub network, meaning there is only one way in and out of the 172.30.0.0/16 network, in
via SanJose1 (a.k.a. the entrance router) and out via Baypointe (the ISP). It is doesn’t make sense for If you have just completed Scenario 2, lets remove RIP by issuing the following
SanJose1 to send Baypointe the RIP update of 172.30.0.0 every 30 seconds, because Baypointe has no command on each router:
other way to get there. RIP update message from SanJose1 to Baypointe, if RIP were configured:
RIP: received v1 update from 192.168.4.9 on Serial0
172.30.0.0 in 1 hops Router(config)# no router rip
Instead, it makes more sense for Baypointe to have a static route configured for the 172.30.0.0/16 network via
SanJose1.

Well, how about traffic from Company XYZ towards the Internet? It makes no sense for Baypointe to send
more than the 120,000 summarized Internet routes to SanJose1. All SanJose1 needs to know is that if it
is not in the 172.30.0.0 network then send it to the ISP, Baypointe. This is the same for all other
Company XYZ routers (only SanJose2 in our case), that they would send all traffic with destination IP
addresses other than 172.30.0.0 to SanJose1 who would forward them on to Baypointe. Let’s see how
to configure this.

Step 1 – Configuring RIP on SanJose1 and SanJose2 Step 2 - Configuring the default static route on SanJose1

Here are the commands for each router: On SanJose1, let’s configure a static default route, sending all default traffic, packets with
destination IP addresses which do not match a specific route in the routing table, to
Baypointe.
SanJose2#configure terminal SanJose1(config)# ip route 0.0.0.0 0.0.0.0 serial 1
Enter configuration commands, one per line. End with CNTL/Z.
SanJose2(config)#router rip Notice, since the exit interface is a point-to-point serial interface we chose to use the exit-
interface instead of a intermediate-address (next-hop-ip address), saving the router from
SanJose2(config-router)#network 172.30.0.0
having to do a recursive lookup. However, using an intermediate-address (next-hop-ip-
address) would have worked also.
SanJose1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Previous to IOS version 12.1, SanJose1 would propagate, send, this default route
automatically via RIP with its RIP updates to all other routers (in this case SanJose2).
SanJose1(config)#router rip
SanJose2 and all other routers will receive this default route via RIP and forward to all
SanJose1(config-router)#network 172.30.0.0 other routers in the RIP routing domain.

Notice that we are only including the 172.30.0.0 interfaces, networks, for SanJose1. However, with IOS 12.1 and later, we need to enter the default-information originate
We will not be exchanging RIP updates with Baypointe via the 192.168.4.0/30 command on Baypointe, the router with the static default route. This will tell SanJose1 to
include the static default route with its RIP updates to SanJose2.
network.
SanJose1(config)#router rip
SanJose1(config-router)#default-information originate

19
10/23/2012

Step 3 - Configuring the static route on Baypointe for the 172.30.0.0/16 network SanJose1
SanJose1#debug ip rip
RIP protocol debugging is on
Since Baypointe and SanJose1 are not exchanging RIP updates, we need to configure a static SanJose1#
route on Baypointe for the 172.30.0.0/16 network. This will send all 172.30.0.0/16 traffic, 02:09:10: RIP: received v1 update from 172.30.2.1 on Serial0
packets with destination IP addresses of 172.30.x.x, to SanJose1. 02:09:10: 172.30.1.0 in 1 hops
SanJose1#
02:09:29: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (172.30.3.1)
Baypointe(config)# ip route 172.30.0.0 255.255.0.0 serial 0 02:09:29: subnet 172.30.2.0, metric 1
02:09:29: subnet 172.30.1.0, metric 2
02:09:29: default, metric 1
Once again, notice, since the exit interface is a point-to-point serial interface we chose to use
02:09:29: RIP: sending v1 update to 255.255.255.255 via Serial0 (172.30.2.2)
the exit-interface instead of a intermediate-address (next-hop-ip address), saving the 02:09:29: subnet 172.30.3.0, metric 1
router from having to do a recursive lookup. However, using an intermediate-address 02:09:29: default, metric 1
(next-hop-ip-address) would have worked also. SanJose1#
SanJose1#undebug all

SanJose1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
<omitted>
Gateway of last resort is 0.0.0.0 to network 0.0.0.0

172.30.0.0/24 is subnetted, 3 subnets


C 172.30.2.0 is directly connected, Serial0
C 172.30.3.0 is directly connected, Ethernet0
R 172.30.1.0 [120/1] via 172.30.2.1, 00:00:13, Serial0
192.168.4.0/30 is subnetted, 1 subnets
C 192.168.4.8 is directly connected, Serial1
S* 0.0.0.0/0 is directly connected, Serial1

SanJose2
Scenario 3: Running RIPv1 on a stub network SanJose2#debug ip rip
RIP protocol debugging is on
SanJose2#
02:07:06: RIP: received v1 update from 172.30.2.2 on Serial0
02:07:06: 172.30.3.0 in 1 hops
Reflections
02:07:07: 0.0.0.0 in 1 hops
• Notice that the static default route is being propagated by SanJose1 to SanJose2#
02:07:23: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (172.30.1.1)
other routers (SanJose2) via RIP.
02:07:23: subnet 172.30.2.0, metric 1
• Notice the static route in the routing table and the “Gateway of last 02:07:23: subnet 172.30.3.0, metric 2

resort.” 02:07:23: default, metric 2


02:07:23: RIP: sending v1 update to 255.255.255.255 via Serial0 (172.30.2.1)
02:07:23: subnet 172.30.1.0, metric 1
SanJose2#
SanJose2#undebug all

SanJose2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
<omitted>
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is 172.30.2.2 to network 0.0.0.0
172.30.0.0/24 is subnetted, 3 subnets
C 172.30.2.0 is directly connected, Serial0
R 172.30.3.0 [120/1] via 172.30.2.2, 00:00:22, Serial0
C 172.30.1.0 is directly connected, Ethernet0
R* 0.0.0.0/0 [120/1] via 172.30.2.2, 00:00:22, Serial0

20
10/23/2012

Baypointe
Scenario 3: Running RIPv1 on a stub network
No RIP messages, as we are not running RIP.

Baypointe#show ip route
Reflections Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
• Notice that SanJose2 is receiving the default route from SanJose1. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
• SanJose2 forwards that default route out Ethernet 0, a RIP enabled N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
interface, although there are no other routers on that segment. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
• Notice the default route in the routing table and that it was learned via U - per-user static route, o - ODR
RIP.
Gateway of last resort is not set
• Notice the “Gateway of last resort”
S 172.30.0.0/16 is directly connected, Serial0
192.168.4.0/30 is subnetted, 1 subnets
C 192.168.4.8 is directly connected, Serial0
C 192.168.5.0/24 is directly connected, Ethernet0

Reflections
• Notice that RIP is not being used on Baypointe. The only routes that are
not directly-connected is the static route.

A Few Final Notes


Scenario 3: Running RIPv1 on a stub network
RIP uses broadcasts
show ip protocols command • Notice that RIPv1 sends out its RIP updates via an IP broadcast.
02:07:23: RIP: sending v1 update to 255.255.255.255 via Ethernet0
SanJose2 router from Scenario 3. (172.30.1.1)
All devices on the segment will see these RIP updates.
SanJose2#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 11 seconds The passive-interface command
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is • How can you keep a RIP update from being sent out an interface which does not have any
Incoming update filter list for all interfaces is other routers? (i.e The Ethernet interfaces in our network.)
Redistributing: rip
Default version control: send version 1, receive any version
• Because the network statement includes all interfaces which have an IP address on that
Interface Send Recv Key-chain classful network, by default RIP will send out updates out each one of those interfaces.
Ethernet0 1 1 2 • Do keep RIP from sending updates out an interface which does not have any other routers,
Serial0 1 1 2 you can use the passive-interface command.
Routing for Networks:
172.30.0.0 • The passive-interface command allows the interface to receive RIP updates on the
Routing Information Sources: interface, but does not send RIP updates out that interface.
Gateway
172.30.2.2
Distance
120
Last Update
00:00:04
• For example, to keep SanJose2 from sending out RIP updates out Ethernet 0, you can do
Distance: (default is 120) the following:
SanJose2# SanJose2(config)#router rip
SanJose2(config-router)#network 172.30.0.0
Be sure to understand this command. We will examine it again when we take a closer look at RIPv1,
RIPv2 and IGRP. Take a look at the items in bold and make sure you understand them. SanJose2(config-router)#passive-interface Ethernet 0

21
10/23/2012

What is with the /30 network? How can I remove a single network from RIP?
• /30 or 255.255.255.252 subnet masks are quite common on serial links.
• A /30 subnet mask helps maximize the hosts addresses, which is perfect for a point-to- Instead of using the following command to remove all networks from RIP:
point serial link, allowing the following for each subnet: Router(config)# no router rip
– 1 network address
– 2 host addresses You can specify just the network you wish to remove by using the no network command, for
– 1 broadcast address example:
IP Class: C IP Address: 192.168.4.0
Mask Bits: 6 Subnet Mask: 255.255.255.252
Router(config)#router rip
Subnets: 62+1 IP Major Net: 192.168.4.0 Router(config-router)#no network 172.30.0.0
Hosts/Subnet: 2 Major Net Bcast: 192.168.4.255
Subnets for Fixed Length Subnet Masking
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Debug ip routing - FYI
No. Subnet Hosts Hosts Broadcast Address From
To Address
0 192.168.4.0 192.168.4.1 192.168.4.2 192.168.4.3
1 192.168.4.4 192.168.4.5 192.168.4.6 192.168.4.7  If you wish to see what is happening in the router’s routing table process, you can use
2 192.168.4.8 192.168.4.9 192.168.4.10 192.168.4.11 the debug ip routing command:
3 192.168.4.12 192.168.4.13 192.168.4.14 192.168.4.15
4 192.168.4.16 192.168.4.17 192.168.4.18 192.168.4.19 SanJose2#debug ip routing
5 192.168.4.20 192.168.4.21 192.168.4.22 192.168.4.23
IP routing debugging is on
6 192.168.4.24 192.168.4.25 192.168.4.26 192.168.4.27
7 192.168.4.28 192.168.4.29 192.168.4.30 192.168.4.31 SanJose2#conf t
8 192.168.4.32 192.168.4.33 192.168.4.34 192.168.4.35 Enter configuration commands, one per line. End with CNTL/Z.
9 192.168.4.36 192.168.4.37 192.168.4.38 192.168.4.39 SanJose2(config)#router rip
<omitted> SanJose2(config-router)#network 172.30.0.0
61 192.168.4.244 192.168.4.245 192.168.4.246 192.168.4.247
SanJose2(config-router)#
62 192.168.4.248 192.168.4.249 192.168.4.250 192.168.4.251
63 192.168.4.252 192.168.4.253 192.168.4.254 192.168.4.255 00:15:03: RT: add 172.30.3.0/24 via 172.30.2.2, rip metric [120/1]
00:15:03: RT: add 0.0.0.0/0 via 172.30.2.2, rip metric [120/1]
00:15:03: RT: default path is now 0.0.0.0 via 172.30.2.2
00:15:03: RT: new default network 0.0.0.0

End of Part I

• End of Part I
• See Part II for IGRP

22

You might also like