CONMUTACIÓN Y RUTEO I
Tema 6. Dynamic
Routing & RIPv2
Alberto Arellano A. Ing. Msc.
aarellano@[Link]
CCNA – CCNP - CCSP
1
Dynamic Routing Protocol
Operation
In general, the operations of a dynamic routing protocol can be described
as follows:
The router sends and receives routing messages on its interfaces.
The router shares routing messages and routing information with
other routers that are using the same routing protocol.
Routers exchange routing information to learn about remote
networks.
When a router detects a topology change the routing protocol can
advertise this change to other routers.
Discover Directly
Attached Networks
R1 adds the [Link] network available through interface FastEthernet
0/0 and [Link] is available through interface Serial 0/0/0.
R2 adds the [Link] network available through interface Serial 0/0/0
and [Link] is available through interface Serial 0/0/1.
R3 adds the [Link] network available through interface Serial 0/0/1
and [Link] is available through interface FastEthernet 0/0.
Network Interface Hop Network Interface Hop Network Interface Hop
C [Link] Fa0/0 0 C [Link] S0/0/0 0 C [Link] S0/0/1 0
C [Link] S0/0/0 0 C [Link] S0/0/1 0 C [Link] Fa0/0 0
Network Convergence
Convergence is when a network has complete and accurate information
about the entire network
Convergence time is the time it takes routers to share information, calculate
best paths, and update their routing tables.
NOTE:
A network is not completely operable until the network has converged.
Routing Protocols
Classification
Dynamic Routing Protocols
Purpose Interior Gateway Protocols Exterior Gateway Protocols
(IGP) (EGP)
Distance Vector Link-State Path-Vector
Operation Routing Protocols Routing Protocols Routing Protocol
RIPv1 IGRP Classful
Behaviour
RIPv2 EIGRP OSPF IS-IS BGP Classless
RIPv1 and IGRP are legacy Link-state routing
protocols that have evolved protocols are classless
into the classless routing by nature.
protocols, RIPv2 and EIGRP.
5
CNT BGP TELCONET
An autonomous system
(AS), is a collection of routers
under a common
administration.
• Company ’ s internal
network
• An ISP’s network.
Because the Internet is based on the autonomous system concept,
two types of routing protocols are required:
Interior Gateway Protocols IGP (RIP, EIGRP, OSPF, IS-IS):
Routing inside an autonomous system
Exterior Gateway Protocols (BGP): Between ISPs, CNT and
TELCONET, and some customers (usually just say BGP).
Routing between autonomous systems
IGP versus EGP Routing
Protocols
ISP with customers
ISP with customers
BGP
ISP-1 AS-2
IS-IS OSPF
AS-1
BGP
EIGRP
Static Route
ISP-2 AS-3
OSPF Default Static Route IS-IS
Single customer
IGPs are used by organizations and within service provider’s network.
BGP could be used to interconnect large organizations to service
providers and in between various service providers.
Smaller organizations would typically connect using static routes but
could also use BGP.
Distance Vector Routing
Protocol Operation
What does a street sign like this tell
you?
How far (distance)
Which way (direction)
Distance vector
Routes are advertised as vectors
of distance and direction.
Distance is defined in terms of a metric
Such as hop count
Direction is simply the:
Nexthop router or
Exit interface
Typically use the Bellman-Ford
algorithm for the best-path (shortest)
route determination
Distance Vector Routing
Protocol Operation
Routing protocol
Does not know the topology of an internetwork.
Only knows the routing information received from its
neighbors.
Does not know if another path would actually be faster.
Would another path I don’t have a map of
that is longer actually the network.
be faster? (speed
limit)
All I know is how far
and which direction
(to next hop router)
Distance Vector
Routing Protocols
Routing Information Protocol (RIP)
Three versions: IPv4 RIPv1 and RIPv2. RIPng for IPv6.
Standard Protocol
Hedrick RFC 1058 (06/1988). Routing Information Protocol
Malkin RFC 2453 (11/1998). RIP Version 2
Malkin, Minnear. RFC 2080 (11/1997). RIPng for IPv6
Uses hop counts as its metric.
Interior Gateway Routing Protocol (IGRP)
Legacy Cisco Proprietary protocol.
Uses bandwidth and delay as its metric.
Enhanced IGRP (EIGRP)
Initially, Cisco Proprietary protocol.
Uses bandwidth and delay as its metric.
Only event driven distance-vector routing protocol.
Link-State Protocol
Operation
Link-state routing protocol can
create a “complete view,” or
topology, of the network.
Link-state protocols are
associated with Shortest Path
First (SPF) calculations.
A link-state router uses the OR
link-state information to:
Create a topology map
Select the best path to all
destination networks in the
topology.
Each router makes the
decision!
Link-State Protocol
Operation
Link-state protocols work
best in situations where
The network design is
hierarchical, usually
occurring in large networks.
The administrators have a
good knowledge of the
implemented link-state
routing protocol.
Fast convergence of the
network is crucial.
Link-State Concepts
Link-State Routing
Protocols
Open Shortest Path First (OSPF)
Standard Protocol
J. Moy: RFC 1131 (10/1989)
J. Moy: RFC 2328, OSPF Version 2 (04/1998)
R. Coltun, D. Ferguson, J. Moy, A. Lindem: RFC 5340, OSPF for
IPv6 (07/2009)
Metric : Cost
Intermediate System-to-Intermediate System (IS-
IS)
Popular in provider networks
Standard Protocol
Oran. RFC 1142 (12/1990) Use of OSI IS-IS for Routing in TCP/IP
and Dual Environments.
Hopps. RFC 5308 (10/2008) Routing IPv6 with IS-IS
Classful Routing Protocols
[Link]/16
Major Classful
Network
Classful routing protocols do not send subnet mask information in their routing
updates:
Only RIPv1 and IGRP are classful.
Created when network addresses were allocated based on classes (class A, B,
or C).
Cannot provide variable length subnet masks (VLSMs) and classless
interdomain routing (CIDR).
Create problems in discontiguous networks.
R1 Forwards a Classful Update to R2
[Link]/24 [Link]/30 [Link]/30 [Link]/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0
Routing update:
My 30 seconds are up. [Link]
I’m sending an update
to my RIP neighbor(s).
R2# show ip route | begin Gateway
Gateway of last resort is not set
R [Link]/16 [120/1] via [Link], 00:00:11, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/30 is directly connected, Serial0/0/0
L [Link]/32 is directly connected, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/30 is directly connected, Serial0/0/1
L [Link]/32 is directly connected, Serial0/0/1
R2#
R3 Forwards a Classful Update to R2
Discontiguous Networks
[Link]/24 [Link]/30 [Link]/30 [Link]/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0
Routing update: My 30 seconds are up.
[Link] I’m sending an update
to my RIP neighbor(s).
R2# show ip route | begin Gateway
Gateway of last resort is not set
R [Link]/16 [120/1] via [Link], 00:00:14, Serial0/0/1
[120/1] via [Link], 00:00:16, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/30 is directly connected, Serial0/0/0
L [Link]/32 is directly connected, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/30 is directly connected, Serial0/0/1
L [Link]/32 is directly connected, Serial0/0/1
R2#
Connectivity Fails or
Inconsistent
Discontiguous Networks
[Link]/24 [Link]/30 [Link]/30 [Link]/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0
R2# ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2
seconds:
U.U.U
Success rate is 0 percent (0/5)
R2#
R2# traceroute [Link]
Type escape sequence to abort.
Tracing the route to [Link]
VRF info: (vrf in name/id, vrf out name/id)
1 [Link] 4 msec
[Link] 4 msec
[Link] 4 msec
R2#
Classless Routing
Protocols
[Link]/24 [Link]/30 [Link]/30 [Link]/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0
Routing update:
My 30 seconds are up.
I’m sending an update [Link]/24
to my RIP neighbor(s).
R2# show ip route | begin Gateway
Gateway of last resort is not set
[Link]/24 is subnetted, 1 subnets
R [Link] [120/1] via [Link], 00:00:06, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/30 is directly connected, Serial0/0/0
L [Link]/32 is directly connected, Serial0/0/0
R2#
Classless routing protocols include subnet mask information in the
routing updates:
RIPv2, EIGRP, OSPF, and IS-IS and IPv6 routing protocols
Support VLSM and CIDR
Also support discontiguous networks
R3 Forwards a Classless
Update to R2
[Link]/24 [Link]/30 [Link]/30 [Link]/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0
Routing update:
My 30 seconds are up.
[Link]/24 I’m sending an update
to my RIP neighbor(s).
R2# show ip route | begin Gateway
Gateway of last resort is not set
[Link]/24 is subnetted, 2 subnets
R [Link] [120/1] via [Link], 00:00:03, Serial0/0/0
R [Link] [120/1] via [Link], 00:00:03, Serial0/0/1
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/30 is directly connected, Serial0/0/0
L [Link]/32 is directly connected, Serial0/0/0
[Link]/24 is variably subnetted, 2 subnets, 2 masks
C [Link]/30 is directly connected, Serial0/0/1
L [Link]/32 is directly connected, Serial0/0/1
R2#
Connectivity Success
[Link]/24 [Link]/30 [Link]/30 [Link]/24
.1 .1 .2 .2 .1 .1
S0/0/0 S0/0/0 S0/0/1 S0/0/1
G0/0 R1 R2 R3 G0/0
R2# ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms
R2#
R2# traceroute [Link]
Type escape sequence to abort.
Tracing the route to [Link]
VRF info: (vrf in name/id, vrf out name/id)
1 [Link] 4 msec 4 msec *
R2#
Routing Protocol
Characteristics
Speed of Convergence:
Routing loops can occur when inconsistent routing tables are not
updated due to slow convergence in a changing network.
Scalability:
Large networks require a scalable the routing protocol.
Classful or Classless (Use of VLSM and summarization):
Classful routing protocols do not include the subnet mask and cannot
support VLSM while classless routing protocols do.
Resource Usage:
Defines how much memory space (RAM), CPU utilization, and link
bandwidth utilization is required by the routing protocol.
Implementation and Maintenance:
This describes the level of knowledge that is required for a network
administrator to implement and maintain the network based on the
routing protocol deployed.
Speed Convergence
Routing Protocol Convergence Comparison using Simulation and Real
Equipment. D. Sankar and D. Lancaster.
Centre for Security, Communications and Network Research Plymouth University,
United Kingdom. 2013
Network Convergence Time
Purpose of a Metric
Metrics are a way to measure or compare.
Determine the best path.
Routing protocol learns multiple routes to the same
destination.
Metric is used to determine which path is most preferable
Lower the metric, the better
Routing Protocols and
Their Metrics
Routing Default
Description
Protocol Metric
•Simple metric that counts the number of routers a packet
RIP Hop count
traverses.
•Bandwidth influences path selection by preferring the
path with the highest overall bandwidth.
Bandwidth
•Delay considers the time a packet takes to traverse a
EIGRP and path.
Delay •Optionally, load (traffic utilization of a certain link) and
reliability (probability of a link failure) can also be
included in the metric calculation.
OSPF Cost •A value based on the cumulative link bandwidths.
IS-IS Cost •A value based on the cumulative link cost
Routing Protocol Metrics
Different routing protocols use different metrics.
Routing metrics are not interchangeable between routing
protocols.
Two different routing protocols might choose different paths to
the same destination.
For example:
56 Kbps
27
Routing Protocol Metrics
R [Link]/24 [120/1] via [Link], 00:00:24, Serial0/0/0
C [Link]/24 is directly connected, Serial0/0/0
C [Link]/24 is directly connected, FastEthernet0/0
C [Link]/24 is directly connected, Serial0/0/1
R [Link]/24 [120/1] via [Link], 00:00:26, Serial0/0/1
R [Link]/24 [120/1] via [Link], 00:00:24, Serial0/0/0
[120/1] via [Link], 00:00:26, Serial0/0/1
R [Link]/24 [120/1] via [Link], 00:00:26, Serial0/0/1
R [Link]/24 [120/2] via [Link], 00:00:26, Serial0/0/1
All routers running RIP
What is the metric (distance)
for R2 to reach the
[Link] network?
2 (hops away)
What is the direction (vector)
for R2 to reach the
[Link] network?
Serial 0/0/1 (via R3)
Equal Cost Multipath Routing
Load Balancing
R2# show ip route
<output omitted>
R [Link]/24 [120/1] via [Link], 00:00:24, Serial0/0/0
[120/1] via [Link], 00:00:26, Serial0/0/1
What happens when two or more routes to the same destination have identical
metric values?
The router load balances between these equal-cost paths.
All routing protocols do equal cost load balancing.
EIGRP also does unequal cost load balancing.
Distance Vector Routing
Protocols
Dynamic Routing Protocols
Distance vector routing protocols:
Interior Gateway Protocols Share updates between neighbors
(IGP)
Not aware of the network topology
RIPv1 sends periodically broadcasts
Distance Vector
Routing Protocols
updates to IP [Link] even if
topology has not changed
Updates consume bandwidth and
RIPv1 IGRP
network device CPU resources
RIPv2 EIGRP EIGRP will only send an update when
topology has changed
RIPv2 and EIGRP use multicast
addresses
30
Routing Information
Protocol ver. 1 (RIPv1)
I Can’t 15 hops 14 hops 13 hops 12 hops 11 hops 10 hops 9 hops
reach
[Link]
8 hops
RIPv1 (RFC 1058) is a legacy 1st generation IPv4 protocol.
Easy to configure, making it a good choice for small networks.
RIPv1 has the following key characteristics: 7 hops
Metric = hop count (lower is better).
Updates broadcasted every 30 seconds to [Link].
6 hops
If hop count > 15 hops = too far and the update is not
propagated.
5 hops
RIP updates are encapsulated into a UDP segment, with both
source and destination port numbers set to UDP port 520.
1 hop 2 hops 3 hops 4 hops
[Link]/24
Routing Information
Protocol ver. 2 (RIPv2)
RIPv2 (RFC 2053) replaced RIPv1 and included the
following improvements:
Classless routing protocol: Supports VLSM and
CIDR, because it includes the subnet mask in the
routing updates.
Increased efficiency: Forwards updates to multicast
address [Link], instead of the broadcast address
[Link].
Reduced routing entries: Supports manual route
summarization.
Secure: Supports an authentication mechanism to
secure routing table updates between neighbors.
Split horizon
Distance vector protocols are susceptible to routing loops.
Routing loops occur when a packet is continually routed
through the same routers over and over, in an endless circle.
Split horizon is one of the methods used by distance vector
routing protocols to avoid routing loops. The principle is
simple – a router will not advertise a route back onto the
interface from which it was learned. Split horizon is
enabled on interfaces by default.
Route Poisoning
Another method employed by distance vector routing protocols to
prevent routing loops is route poisoning. When a router detects
that one of its directly connected routes has failed, it will advertise
a failed route with an infinite metric (“poisoning the route”).
Routers who receive the routing update will consider the route as
failed and remove it from their routing tables.
Each routing protocol has its own definition of an infinite metric. In the
case of RIP the infinite metric is 16
RIP Timers
Update Timer: Default value is of 30 secs, it resets itself as soon as the
update is received from neighboring router.
Invalid Timer: Default value is of 180 secs, If a router fails to receive an
update post 30 secs, it will wait for another 150 secs before declaring the
route for which update was not received as “Invalid”
Hold Timer: It triggers as soon as Invalid timer is finished at 180 Secs. Hold
timer will hold the Invalid route until the flush timer is complete on source
router.
Flush Timer: Default time of 240 Seconds. This timer starts along with
update and Invalid timer and it indicates how long a route can remain in a
routing table before being flushed.
RIPv2 Manual
Route Summarization
R1(config)#int fa0/0
R1(config-if)#ip summary-address rip [Link] [Link]
RIPv1 versus RIPv2
Features RIPv1 RIPv2
Both use hop count as a simple
Metric metric. The maximum number of
hops is 15.
Forward Updates To Address [Link] [Link]
Supports VLSM
Supports CIDR
Supports Summarization
Secure
RIP Summary
IGRP
The Interior Gateway Routing Protocol (IGRP) was
the first proprietary IPv4 routing protocol developed by
Cisco in 1984.
IGRP Features:
No hop limit
Easy to understand
Bandwidth and delay are used to create a composite
metric.
Optionally, load and reliability can also be included in
the calculation.
Routing updates are broadcast every 90 seconds, by
default.
EIGRP
In 1992, Enhanced IGRP (EIGRP) replaced IGRP.
EIGRP also supports VLSM and CIDR, increases
efficiency, reduces routing updates, and supports
secure message exchange.
EIGRP also introduced:
Bounded triggered updates
Hello keepalive mechanism
Maintains a topology table (DUAL – backup routes)
Rapid convergence
Multiple network layer protocol support (IPv4, IPv6,
IPX, Appletalk)
IGRP versus EIGRP
Features IGRP EIGRP
Both use a composite metric consisting of
bandwidth and delay. Reliability and load
Metric
can also be included in the metric
calculation.
Forward Updates To Address [Link] [Link]
Supports VLSM
Supports CIDR
Supports Summarization
Supports Authentication
RIPv2 Topology
[Link]/24
Example
42
GNS3 Cloud object
[Link]/24
The cloud object was in fact a direct usage of the emulator capabilities to
connect to external networks
43
Configure Mikrotik
GUI Access
Configure the ip address of the ether5
interface by accessing the CLI
Configure Mikrotik
GUI Access
Verify connectivity from the Windows command line to configured
addresses
Configure Mikrotik
GUI Access
Winbox is a small utility that allows administration of Mikrotik RouterOS
Using a fast and simple GUI.
Configure IP Address
MKTK_2
Configure IP Address
MKTK_1
Verify conectivity
Configure IP address
Cisco_1
Configure IP address
Brocade_1
Configure RIP on
MKTK_2
1. Add the interfaces by which RIP messages are sent and
received
Configure RIP on
MKTK_2
2. Set RIP Networks
Configure RIP on
MKTK_2
3. RIP Settings Redistribute Connected Routes
Configure RIP on
MKTK_1
1. Add the interfaces by which RIP messages are sent and received
Configure RIP on
MKTK_1
2. Set RIP Networks
Configuring RIP on
Cisco_1
Cisco_1(config)# router rip
Cisco_1(config-router)# version 2
Cisco_1(config-router)# no auto-summary
Cisco_1(config-router)# network [Link]
Cisco_1(config-router)# network [Link]
To enable RIP and advertise a network, use the routing configuration
command network network-address
Enter the network address for each directly connected network.
Entering the command automatically :
Enables RIP on all interfaces that belong to a specific network.
Interfaces now both send and receive RIP updates.
Advertises the specified network in RIP updates every 30 seconds.
Configuring RIP on
Brocade_1
Verifying RIP Routes on
Cisco_1
Verifying RIP Routes on
MKTK_2
Verifying RIP Routes on
MKTK_1
Verify Connectivity
PC3 PC2
RIP Passive Interfaces
[Link]/24
[Link]/24 .1 G0/0
[Link]/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1
[Link]/30 [Link]/30
Sending out unneeded updates on a LAN:
Wastes Bandwidth
Wastes Resources
Security Risk
The passive-interface
Stops routing updates out the specified interface.
The network that the specified interface belongs to is still
advertised in routing updates that are sent out other interfaces.
Should be configured on interfaces which do not connect to
other RIP routers.
Configuring a Passive
Interface on Cisco
[Link]/24
Routing update:
[Link]/24
[Link]/24 .1 G0/0
[Link]/24
.1 DCE DCE .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1
[Link]/30 [Link]/30
R1(config)# router rip
R1(config-router)# passive-interface g0/0
R1(config-router)# end
R1#
R1# show ip protocols | begin Default
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Serial0/0/0 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
[Link]
[Link]
Passive Interface(s):
GigabitEthernet0/0
Routing Information Sources:
Gateway Distance Last Update
[Link] 120 00:00:06
Distance: (default is 120)
Configuring a Passive
Interface on Mikrotik
[Link]/24
RIP Propagating a
Default Static Route
Internet
[Link]/24
[Link]/27
.226
[Link]/24 S0/0/1 [Link]/24
.225 .1 G0/0
.1 .1
S0/0/0 S0/0/0 S0/0/1
G0/0 R1 R2 S0/0/1 R3 G0/0
.1 .2 .2 .1
[Link]/30 [Link]/30
It is common to configure a default static route on an edge router and
then propagating the default route throughout the routing domain using
the routing protocol.
Otherwise, you would have to individually configure default static
routes on all internal routers.
Edge router must be configured with default static route:
ip route [Link] [Link] exit-intf next-hop-ip
Propagated to other routers via RIP using:
default-information originate
Propagating a Default
Route on R1
Internet
[Link]/24
[Link]/27
.226
[Link]/24 S0/0/1 [Link]/24
.225 .1 G0/0
.1 DCE DCE .1
RIP DefaultS0/0/0
S0/0/0 Route R2RIPS0/0/1
Default Route
S0/0/1
G0/0 R1 R3 G0/0
.1 .2 .2 .1
[Link]/30 [Link]/30
R1(config)# ip route [Link] [Link] S0/0/1 [Link]
R1(config)# router rip
R1(config-router)# default-information originate
R1(config-router)# ^Z
R1#
*Mar 10 23:33:51.801: %SYS-5-CONFIG_I: Configured from
console by console
Propagating a Default
Route on Mikrotik
Homework
RIP&Default Route