Uploaded by HD kid

ccna2-RIPv1Lab

advertisement
CCNA: Semester 2
Configuring RIPv1
Objective
In this lab, you will configure RIP routing in three different scenarios. At the end of each scenario, all hosts and
all routers should be able to reach (ping) each other.
Scenario
There are five separate classful networks. After configuring RIP, we want to view the RIP update messages
being sent and received by each router.
Scenario 1: Running RIPv1 on classful networks
Scenario 2: Running RIPv1 on subnets and between classful networks
Scenario 3: Running RIPv1 on a stub network
These three scenarios can be done in sequence or separately.
Setup
•
•
•
•
Use the 8 Steps to Success to help you configure the routers.
Be sure your cabling is correct, as this causes more troubleshooting issues than anything else.
If the routers have a startup-config already on them, erase it and reboot the routers.
Configure the routers to include hostnames and the proper interface commands including IP addresses,
subnet masks, etc. Each router should be able to ping the interface of the adjacent (neighboring) router
and the host on its LAN (Ethernet) interface. Test and troubleshoot as necessary.
Basic Configurations
• There is a Basic Configuration included for each scenario, but it does not include clock rate, no
shutdown and some other necessary commands.
• 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.
Optional: Keeping outputs from interrupting our inputs
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 to keep the debug out from interfering
with you command-line input:
Router(config)# line console 0
Router(config-line)# logging synchronous
Optional: Changing the default timeout
After 10 minutes, by default, if there is no input via the console, the user will be logged off. Although a good
idea in production environment, in a lab environment this can be somewhat annoying. To turn-off the automatic
timeout feature, we use the command: exec-timeout minutes [seconds], setting both the minutes and seconds to
0.
Router(config)# line console 0
Router(config-line)# exec-timeout 0 0
1
Scenario 1: Running RIPv1 on classful networks
Basic Configuration
SanJose2
hostname SanJose2
interface ethernet 0
ip add 192.168.1.1 255.255.255.0
interface serial 0
ip add 192.168.2.1 255.255.255.0
SanJose1
hostname SanJose1
interface ethernet 0
ip add 192.168.3.1 255.255.255.0
interface serial 0
ip add 192.168.2.2 255.255.255.0
interface serial 1
ip add 192.168.4.2 255.255.255.0
Baypointe
hostname Baypointe
interface ethernet 0
ip add 192.168.5.1 255.255.255.0
interface serial 0
ip add 192.168.4.1 255.255.255.0
2
Objective: Running RIPv1 on classful networks
This scenario is the same one we used in the network discovery lab, with the same configurations and the same
outputs. The concepts specific to this scenario will become more clear when we view the differences between
this scenario and Scenario 2: Running RIPv1 on subnets and between classful networks.
Step 1 – Configuring RIP
First, lets enable RIP on each router.
From global configuration you will enter the command (the default is RIPv1):
Router(config)#router rip
Once you are in the Router RIP configuration sub-mode, all you need to do is enter the classful network address
for each directly connected network, using the network command.
Router(config-router)#network directly-connected-classful-network-address
Here are the commands for each router:
SanJose2#configure terminal
Enter configuration commands, one per line.
SanJose2(config)#router rip
SanJose2(config-router)#network 192.168.1.0
SanJose2(config-router)#network 192.168.2.0
End with CNTL/Z.
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
SanJose1#configure terminal
Enter configuration commands, one per line.
SanJose1(config)#router rip
SanJose1(config-router)#network 192.168.2.0
SanJose1(config-router)#network 192.168.3.0
SanJose1(config-router)#network 192.168.4.0
End with CNTL/Z.
Step 2 – Understanding the network command
SENDING RIP MESSAGES
Each router will begin to send RIP update message out each interface belonging to one of the network
statements.
SanJose2(config)#router rip
SanJose2(config-router)#network 192.168.1.0
SanJose2(config-router)#network 192.168.2.0
•
•
For example, SanJose2 to will send out RIP update messages on Ethernet 0 because that interface has
an 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.
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
include these networks in its updates to adjacent neighbors.
3
To view the RIP messages being sent and received use the debug ip rip command.
SanJose2# debug ip rip
RIP protocol debugging is on
SanJose2
01:03:27: RIP: sending v1 update to
01:03:27:
network 192.168.2.0,
01:03:27: RIP: sending v1 update to
01:03:27:
network 192.168.1.0,
255.255.255.255 via Ethernet0 (192.168.1.1)
metric 1
255.255.255.255 via Serial0 (192.168.2.1)
metric 1
LISTENING FOR RIP MESSAGES
Routers will also listen for RIP messages on each interface belonging to one of the network statements.
•
•
For example, SanJose2 to will listen for RIP update messages on Ethernet 0 because that interface has
an IP address that belong to the network 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.
As RIP messages are received router, will add those networks in the messages to their routing tables:
o If the RIP message contains a network not currently in the routing table.
o If the RIP message contains a network with a better metric (fewer hops) than an entry currently
in the routing table.
SanJose2
01:10:56: RIP: received v1 update from 192.168.2.2 on Serial0
01:10:56:
192.168.4.0 in 1 hops
01:10:56:
192.168.3.0 in 1 hops
Step 3 – Viewing the debug ip rip output and the routing tables
Remember that SanJose1 will learn routes to networks from SanJose2. It will then send that information to
Baypointe, telling Baypointe that it is the next hop to get to those networks, and incrementing the metric (hop
count) by one.
After convergence, each router will continue to send its RIP update messages out the appropriate interfaces
every 30 seconds.
Lets look at the debug messages and the routing table for each router:
4
SanJose2
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
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#
01:30:50: RIP: received v1 update from 192.168.2.2 on Serial0
01:30:50:
192.168.4.0 in 1 hops
01:30:50:
192.168.5.0 in 2 hops
01:30:50:
192.168.3.0 in 1 hops
SanJose2#
SanJose2#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
Gateway of last resort is not set
R
192.168.4.0/24
R
192.168.5.0/24
C
192.168.1.0/24
C
192.168.2.0/24
R
192.168.3.0/24
SanJose2#
[120/1] via
[120/2] via
is directly
is directly
[120/1] via
192.168.2.2, 00:00:10, Serial0
192.168.2.2, 00:00:10, Serial0
connected, Ethernet0
connected, Serial0
192.168.2.2, 00:00:10, Serial0
5
SanJose1
01:33:05:
01:33:05:
SanJose1#
01:33:07:
01:33:07:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
01:33:08:
SanJose1#
RIP: received v1 update from 192.168.4.1 on Serial1
192.168.5.0 in 1 hops
RIP: received v1 update from 192.168.2.1 on Serial0
192.168.1.0 in 1 hops
RIP: sending v1 update to 255.255.255.255 via Ethernet0 (192.168.3.1)
network 192.168.4.0, metric 1
network 192.168.5.0, metric 2
network 192.168.1.0, metric 2
network 192.168.2.0, metric 1
RIP: sending v1 update to 255.255.255.255 via Serial0 (192.168.2.2)
network 192.168.4.0, metric 1
network 192.168.5.0, metric 2
network 192.168.3.0, metric 1
RIP: sending v1 update to 255.255.255.255 via Serial1 (192.168.4.2)
network 192.168.1.0, metric 2
network 192.168.2.0, metric 1
network 192.168.3.0, metric 1
SanJose1#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
Gateway of last resort is not set
C
192.168.4.0/24
R
192.168.5.0/24
R
192.168.1.0/24
C
192.168.2.0/24
C
192.168.3.0/24
SanJose1#
is directly
[120/1] via
[120/1] via
is directly
is directly
connected, Serial1
192.168.4.1, 00:00:12, Serial1
192.168.2.1, 00:00:10, Serial0
connected, Serial0
connected, Ethernet0
6
Baypointe
01:34:53: RIP:
01:34:53:
01:34:53:
01:34:53:
01:34:53:
01:34:53: RIP:
01:34:53:
Baypointe#
01:34:56: RIP:
01:34:56:
01:34:56:
01:34:56:
Baypointe#
sending
network
network
network
network
sending
network
v1 update to
192.168.4.0,
192.168.1.0,
192.168.2.0,
192.168.3.0,
v1 update to
192.168.5.0,
received v1
192.168.1.0
192.168.2.0
192.168.3.0
255.255.255.255 via Ethernet0 (192.168.5.1)
metric 1
metric 3
metric 2
metric 2
255.255.255.255 via Serial0 (192.168.4.1)
metric 1
update from 192.168.4.2 on Serial0
in 2 hops
in 1 hops
in 1 hops
Baypointe#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
Gateway of last resort is not set
C
192.168.4.0/24
C
192.168.5.0/24
R
192.168.1.0/24
R
192.168.2.0/24
R
192.168.3.0/24
Baypointe#
is directly
is directly
[120/2] via
[120/1] via
[120/1] via
connected, Serial0
connected, Ethernet0
192.168.4.2, 00:00:23, Serial0
192.168.4.2, 00:00:23, Serial0
192.168.4.2, 00:00:23, Serial0
NOTE: At this point all routers should be able to ping all networks. We will discuss RIP much more in the
chapter on Routing Protocols (RIP).
Step 4 – Turning-off debug
Don’t forget to turn-off debug when you are done collecting the output.
Router# undebug all
or
Baypointe# undebug ip rip
Step 5 – Reflections
•
•
•
For each router compare the RIP received messages with its routing table. Now you see how the
information is entered into the routing table.
Cisco IOS uses split horizon with poison reverse, however this information is not displayed with debug
ip rip command.
You will notice that the routers send RIP messages out their stub Ethernet interfaces, 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.
7
Scenario 2: Running RIPv1 on subnets and between classful networks
Basic Configuration
SanJose2
hostname SanJose2
interface ethernet 0
ip add 172.30.1.1 255.255.255.0
interface serial 0
ip add 172.30.2.1 255.255.255.0
SanJose1
hostname SanJose1
interface ethernet 0
ip add 172.30.3.1 255.255.255.0
interface serial 0
ip add 172.30.2.2 255.255.255.0
interface serial 1
ip add 192.168.4.9 255.255.255.252
Baypointe
hostname Baypointe
interface ethernet 0
ip add 192.168.5.1 255.255.255.0
interface serial 0
ip add 192.168.4.10 255.255.255.252
8
Objective: Running RIPv1 on subnets and between classful networks
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 network boundaries. You will notice that SanJose1
and SanJose2 have subnets belonging to the 172.30.0.0 network, but Baypointe does not.
Making changes between Scenario 1 and Scenario 2
Be sure to change the IP addressing as displayed in the diagram and Basic Configuration section for Scenario
2. Sometimes when changing the IP address on a serial 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.
If you have just completed Scenario 1, lets remove RIP by issuing the following command on each router:
Router(config)# no router rip
Step 1 – Configuring RIP
Once again, lets enable RIP on each router.
Once you are in the Router RIP configuration sub-mode, all you need to do is enter the classful network
address for each directly connected network, using the network command. If a router has multiple interfaces on
the same classful network, you will only need to enter a single command enabling RIP on all interfaces for that
network.
Router(config-router)#network directly-connected-classful-network-address
Here are the commands for each router:
SanJose2#configure terminal
Enter configuration commands, one per line.
SanJose2(config)#router rip
SanJose2(config-router)#network 172.30.0.0
End with CNTL/Z.
Notice we only used a single network statement for SanJose2, which includes both interfaces, on
different subnets, of the 172.30.0.0 major network.
SanJose1#configure terminal
Enter configuration commands, one per line.
SanJose1(config)#router rip
SanJose1(config-router)#network 172.30.0.0
SanJose1(config-router)#network 192.168.4.0
End with CNTL/Z.
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.
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
Question: What would happen if you entered a network statement that was a subnet? For example:
SanJose2(config)#router rip
SanJose2(config-router)#network 172.30.1.0
Answer: The IOS would automatically convert it to a classful network statement:
SanJose2#show running-config
router rip
network 172.30.0.0
9
Step 2 – Viewing the debug ip rip output and the routing tables
SanJose2
SanJose2#
00:14:10:
00:14:10:
00:14:10:
00:14:10:
SanJose2#
00:14:29:
00:14:29:
00:14:29:
00:14:29:
00:14:29:
00:14:29:
00:14:29:
SanJose2#
00:14:39:
00:14:39:
00:14:39:
00:14:39:
SanJose2#
debug ip rip
RIP: received v1 update from 172.30.2.2 on Serial0
172.30.3.0 in 1 hops
192.168.4.0 in 1 hops
192.168.5.0 in 2 hops
RIP: sending
subnet
subnet
network
network
RIP: sending
subnet
v1 update to 255.255.255.255 via Ethernet0 (172.30.1.1)
172.30.2.0, metric 1
172.30.3.0, metric 2
192.168.4.0, metric 2
192.168.5.0, metric 3
v1 update to 255.255.255.255 via Serial0 (172.30.2.1)
172.30.1.0, metric 1
RIP: received v1 update from 172.30.2.2 on Serial0
172.30.3.0 in 1 hops
192.168.4.0 in 1 hops
192.168.5.0 in 2 hops
undebug all
SanJose2#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
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
R
172.30.3.0 [120/1] via 172.30.2.2, 00:00:08, Serial0
C
172.30.1.0 is directly connected, Ethernet0
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
SanJose2#
Reflections
• IMPORTANT INFORMATION: RIPv1 is a classful routing protocol. Classful routing protocols do not
send the subnet mask with network in routing updates, ie. 172.30.1.0 is sent by SanJose1 to SanJose2
without any subnet mask information.
• IMPORTANT QUESTION: Notice that SanJose2 is receiving the subnet 172.30.3.0 from SanJose1,
which is put in the routing table under the parent network (classful network) of 172.30.0.0 with the /24
subnet mask (172.30.0.0/24 is subnetted, 3 subnets). Also notice that the RIP message received from
SanJose1 was “172.30.3.0 in 1 hops” but did not include a subnet mask for the subnet. How does
SanJose2 know that this subnet has a /24 (255.255.255.0) subnet mask?
• IMPORTANT ANSWER: SanJose2 received this information on an interface belonging to the same
classful network as the incoming 172.30.3.0 update. The IP address that SanJose1 received the
“172.30.3.0 in 1 hops” message was on (Serial 0) with an IP address of 172.30.2.1 and a subnet mask
of 255.255.255.0. SanJose2 uses its own subnet mask and applies it to this and all other 172.30.0.0
subnets it receives on this interface. The 172.30.3.0 network is placed with the other 172.30.0.0 /24
subnets in the routing table.
• Routers running RIPv1 are limited to using the same subnet mask for all subnets with the same classful
network. Classless routing protocols like RIPv2 allow the same major (classful) network to use different
subnet masks on different subnets. This is known as VLSM (Variable Length Subnet Masks) and is
discussed later (Cabrillo’s CCNA Sem 2 course and the CCNP Advanced Routing).
10
SanJose1
SanJose1#debug ip rip
RIP protocol debugging is on
SanJose1#
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
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 Serial0 (172.30.2.2)
00:17:52:
subnet 172.30.3.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)
00:17:52:
network 172.30.0.0, metric 1
SanJose1#
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
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
Gateway of last resort is not set
172.30.0.0/24 is subnetted, 3 subnets
172.30.2.0 is directly connected, Serial0
172.30.3.0 is directly connected, Ethernet0
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#
C
C
R
Reflections
• The same subnet route information applies with routes sent from SanJose2 to SanJose1 (see
Reflections for SanJose2). SanJose1 knows that the 172.30.1.0 update has a subnet mask of /24
because it received it on an interface with a /24 subnet mask (Serial 0, 172.30.3.2 255.255.255.0).
11
SanJose1#debug ip rip
RIP protocol debugging is on
SanJose1#
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
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 Serial0 (172.30.2.2)
00:17:52:
subnet 172.30.3.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)
00:17:52:
network 172.30.0.0, metric 1
SanJose1#
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: <omitted>
Gateway of last resort is not set
172.30.0.0/24 is subnetted, 3 subnets
172.30.2.0 is directly connected, Serial0
172.30.3.0 is directly connected, Ethernet0
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#
C
C
R
More Reflections
• IMPORTANT INFORMATION: Notice the RIP update being sent out Serial 1:
RIP: sending v1 update to 255.255.255.255 via Serial1 (192.168.4.9)
network 172.30.0.0, metric 1
• Compare that to the same information for the 172.30.0.0 network being sent out Serial 0 & Ethernet 0:
RIP: sending v1 update to 255.255.255.255 via Serial0 (172.30.2.2)
subnet 172.30.3.0, metric 1
• Notice that the 172.30.0.0 subnets are being summarized to their classful network address of
172.30.0.0 when sent out Serial 1 to Baypointe.
• RIP automatically summarizes RIP updates between classful networks. Because the 172.30.0.0 update
is being sent out an interface (Serial 1) on a different classful network (192.168.4.0), RIP sends out only
a single update for the entire classful network instead of all of the different subnets. This is similar to
what we did with summarizing several static routes into a single static route.
• A router like SanJose1, which has an interface in more than one classful network is sometimes called a
“boundary router” in RIP. Boundary routers automatically summarize RIP subnets from one classful
network to the other.
• How is this an advantage? Fewer updates sent and received, resulting in less bandwidth used for
routing updates between SanJose1 and Baypointe. Just as importantly, Baypointe will now only have a
single route for the 172.30.0.0/16 network, no matter how many subnets there are or how it is
subnetted. This will result in faster lookup process in the routing table for Baypointe.
• What do you expect to see in Baypointe’s received RIP messages and its routing table? That’s right,
only a single 172.30.0.0 network via SanJose1.
• Are there any disadvantages? Yes, discontinguous networks. We will see this later, but the idea here
is what if Baypointe had another connection via Serial 1 to another router, SantaCruz1 on
192.168.4.12/30 subnet, which also has other 172.30.0.0/24 subnets (172.30.4.0/24, 172.30.5.0/24,
12
etc.). 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 mistakenly load-balance the packets between the
two routers. We will see an example of this later this semester.
13
Baypointe
Baypointe#debug ip rip
RIP protocol debugging is on
Baypointe#
00:20:09: RIP: received v1 update from 192.168.4.9 on Serial0
00:20:09:
172.30.0.0 in 1 hops
Baypointe#
Baypointe#
00:20:24: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (192.168.5.1)
00:20:24:
network 172.30.0.0, metric 2
00:20:24:
network 192.168.4.0, metric 1
00:20:24: RIP: sending v1 update to 255.255.255.255 via Serial0 (192.168.4.10)
00:20:24:
network 192.168.5.0, metric 1
Baypointe#
Baypointe#undebug all
Baypointe#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
Gateway of last resort is not set
R
172.30.0.0/16 [120/1] via 192.168.4.9, 00:00:11, 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
Baypointe#
Reflections
•
•
•
•
•
Notice that Baypointe is only receiving the classful summary of the 172.30.0.0 subnets:
RIP: received v1 update from 192.168.4.9 on Serial0
172.30.0.0 in 1 hops
SanJose1 automatically summarized the subnets into a single classful update.
This keeps Baypointe’s routing table smaller, resulting in faster routing table lookups.
This also isolates any changes in the 172.30.0.0 network on SanJose1 and SanJose2 from affecting
Baypointe. In other words, SanJose1 and SanJose2 can add and delete 172.30.0.0/24 subnets without
affecting Baypointe’s routing table, as Baypointe doesn’t care. Baypointe will send all packets destined
for the 172.30.0.0/16 network to SanJose1. Baypointe’s routing table:
R
172.30.0.0/16 [120/1] via 192.168.4.9, 00:00:11, Serial0
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.
14
Scenario 3: Running RIPv1 on a stub network
Company XYZ
Basic Configuration
SanJose2
hostname SanJose2
interface ethernet 0
ip add 172.30.1.1 255.255.255.0
interface serial 0
ip add 172.30.2.1 255.255.255.0
SanJose1
hostname SanJose1
interface ethernet 0
ip add 172.30.3.1 255.255.255.0
interface serial 0
ip add 172.30.2.2 255.255.255.0
interface serial 1
ip add 192.168.4.9 255.255.255.252
Baypointe
hostname Baypointe
interface ethernet 0
ip add 192.168.5.1 255.255.255.0
interface serial 0
ip add 192.168.4.10 255.255.255.252
15
Objective: Running RIPv1 on a stub network
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 dynamic routing
protocol between their company and their ISP.
For Scenario 3 let us assume that Baypointe is the ISP for our Company XYZ, which consists of the SanJose1
and SanJose2 routers using the 172.30.0.0/16 major network, subnetted with a /24 mask.
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 SanJose1 to
send Baypointe the RIP update of 172.30.0.0 every 30 seconds, because Baypointe has no 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
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.
Making changes between Scenario 2 and Scenario 3
Be sure to change the IP addressing as displayed in the diagram and Basic 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, wait for the LINK-5-CHANGED message, then follow it with a no shutdown command.
If you have just completed Scenario 2, lets remove RIP by issuing the following command on each router:
Router(config)# no router rip
Step 1 – Configuring RIP on SanJose1 and SanJose2
Here are the commands for each router:
SanJose2#configure terminal
Enter configuration commands, one per line.
SanJose2(config)#router rip
SanJose2(config-router)#network 172.30.0.0
SanJose1#configure terminal
Enter configuration commands, one per line.
SanJose1(config)#router rip
SanJose1(config-router)#network 172.30.0.0
End with CNTL/Z.
End with CNTL/Z.
Notice that we are only including the 172.30.0.0 interfaces, networks, for SanJose1. We will not be
exchanging RIP updates with Baypointe via the 192.168.4.0/30 network.
16
Step 2 - Configuring the default static route on SanJose1
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.
SanJose1(config)# ip route 0.0.0.0 0.0.0.0 serial 1
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 having to do a recursive lookup. However,
using an intermediate-address (next-hop-ip-address) would have worked also.
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). SanJose2 and all other routers will receive this default
route via RIP and forward to all other routers in the RIP routing domain.
However, with IOS 12.1 and later, we need to enter the default-information originate 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.
SanJose1(config)#router rip
SanJose1(config-router)#default-information originate
Step 3 - Configuring the static route on Baypointe for the 172.30.0.0/16 network
Since Baypointe and SanJose1 are not exchanging RIP updates, we need to configure a static route on
Baypointe for the 172.30.0.0/16 network. This will send all 172.30.0.0/16 traffic, packets with destination IP
addresses of 172.30.x.x, to SanJose1.
Baypointe(config)# ip route 172.30.0.0 255.255.0.0 serial 0
Once again, 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 having to do a recursive lookup.
However, using an intermediate-address (next-hop-ip-address) would have worked also.
17
SanJose1
SanJose1(config)# ip route 0.0.0.0 0.0.0.0 serial 1
SanJose1(config)#router rip
SanJose1(config-router)#network 172.30.0.0
SanJose1(config-router)#default-information originate
SanJose1#debug ip rip
RIP protocol debugging is on
SanJose1#
02:09:10: RIP: received v1 update from 172.30.2.1 on Serial0
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)
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
02:09:29: RIP: sending v1 update to 255.255.255.255 via Serial0 (172.30.2.2)
02:09:29:
subnet 172.30.3.0, metric 1
02:09:29:
default, metric 1
SanJose1#
SanJose1#undebug all
SanJose1#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
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
172.30.0.0/24 is subnetted, 3 subnets
172.30.2.0 is directly connected, Serial0
172.30.3.0 is directly connected, Ethernet0
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
SanJose1#
C
C
R
Reflections
• Notice that the static default route is being propagated by SanJose1 to other routers (SanJose2) via
RIP.
• Notice the static route in the routing table and the “Gateway of last resort.”
18
SanJose2
SanJose2(config)#router rip
SanJose2(config-router)#network 172.30.0.0
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
02:07:07:
0.0.0.0 in 1 hops
SanJose2#
02:07:23: RIP: sending v1 update to 255.255.255.255 via Ethernet0 (172.30.1.1)
02:07:23:
subnet 172.30.2.0, metric 1
02:07:23:
subnet 172.30.3.0, metric 2
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
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
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
SanJose2#
Reflections
• Notice that SanJose2 is receiving the default route from SanJose1.
• SanJose2 forwards that default route out Ethernet 0, a RIP enabled interface, although there are no
other routers on that segment.
• Notice the default route in the routing table and that it was learned via RIP.
• Notice the “Gateway of last resort”
19
Baypointe
Baypointe(config)# ip route 172.30.0.0 255.255.0.0 serial 0
No RIP messages, as we are not running RIP.
Baypointe#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
Gateway of last resort is not set
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
Baypointe#
Reflections
• Notice that RIP is not being used on Baypointe. The only routes that are not directly-connected is the
static route.
20
show ip protocols command
SanJose2 router from Scenario 3.
SanJose2#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 11 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Default version control: send version 1, receive any version
Interface
Send Recv
Key-chain
Ethernet0
1
1 2
Serial0
1
1 2
Routing for Networks:
172.30.0.0
Routing Information Sources:
Gateway
Distance
Last Update
172.30.2.2
120
00:00:04
Distance: (default is 120)
SanJose2#
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.
21
A Few Final Notes
RIP uses broadcasts
• 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 (172.30.1.1)
• All devices on the segment will see these RIP updates.
The passive-interface command
• How can you keep a RIP update from being sent out an interface which does not have any other
routers? (i.e The Ethernet interfaces in our network.)
• Because the network statement includes all interfaces which have an IP address on that classful
network, by default RIP will send out updates out each one of those interfaces.
• Do keep RIP from sending updates out an interface which does not have any other routers, you can use
the passive-interface command.
• The passive-interface command allows the interface to receive RIP updates on the interface, but does
not send RIP updates out that interface.
• For example, to keep SanJose2 from sending out RIP updates out Ethernet 0, you can do the following:
SanJose2(config)#router rip
SanJose2(config-router)#network 172.30.0.0
SanJose2(config-router)#passive-interface Ethernet 0
What is with the /30 network?
• /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-point serial link,
allowing the following for each subnet:
o 1 network address
o 2 host addresses
o 1 broadcast address
IP Class:
Mask Bits:
Subnets:
Hosts/Subnet:
C
6
62+1
2
IP Address:
Subnet Mask:
IP Major Net:
Major Net Bcast:
192.168.4.0
255.255.255.252
192.168.4.0
192.168.4.255
Subnets for Fixed Length Subnet Masking
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
No.
Subnet
Hosts
Hosts
Broadcast
Address
From
To
Address
0
1
2
3
4
5
6
7
8
9
<omitted>
61
62
63
192.168.4.0
192.168.4.4
192.168.4.8
192.168.4.12
192.168.4.16
192.168.4.20
192.168.4.24
192.168.4.28
192.168.4.32
192.168.4.36
192.168.4.1
192.168.4.5
192.168.4.9
192.168.4.13
192.168.4.17
192.168.4.21
192.168.4.25
192.168.4.29
192.168.4.33
192.168.4.37
192.168.4.2
192.168.4.6
192.168.4.10
192.168.4.14
192.168.4.18
192.168.4.22
192.168.4.26
192.168.4.30
192.168.4.34
192.168.4.38
192.168.4.3
192.168.4.7
192.168.4.11
192.168.4.15
192.168.4.19
192.168.4.23
192.168.4.27
192.168.4.31
192.168.4.35
192.168.4.39
192.168.4.244
192.168.4.248
192.168.4.252
192.168.4.245
192.168.4.249
192.168.4.253
192.168.4.246
192.168.4.250
192.168.4.254
192.168.4.247
192.168.4.251
192.168.4.255
22
How can I remove a single network from RIP?
•
Instead of using the following command to remove all networks from RIP:
Router(config)# no router rip
•
You can specify just the network you wish to remove by using the no network command, for example:
Router(config)#router rip
Router(config-router)#no network 172.30.0.0
Debug ip routing - FYI
•
If you wish to see what is happening in the router’s routing table process, you can use the debug ip
routing command:
SanJose2#debug ip routing
IP routing debugging is on
SanJose2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SanJose2(config)#router rip
SanJose2(config-router)#network 172.30.0.0
SanJose2(config-router)#
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
SanJose2(config-router)#
23
Download