Chapter 3 Dynamic Routing (RIP (Verify RIP Routing (The show ip route…
Chapter 3 Dynamic Routing
The Routing Table
Best Route = Longest Match
What is meant by the router must find the best match in the routing table? Best match is equal to the longest match.
The IPv4 Route Lookup Process
A route referencing only a next-hop IP address and not an exit interface, must be resolved to a route with an exit interface, if Cisco Express Forwarding (CEF) is not being used. Without CEF, a recursive lookup is performed on the next-hop IP address until the route is resolved to an exit interface. CEF is enabled by default.
If there is not a match with any route in the routing table, the router drops the packet.
If there is now a lesser match with a level 1 supernet or default routes, the router uses that route to forward the packet.
If there is not a match with any of the level 2 child routes, proceed to the next step.
If there is a match with a level 2 child route, that subnet is used to forward the packet.
The router examines child routes (the subnet routes) of the parent route for a best match:
If the best match is a level 1 parent route, proceed to the next step.
If the best match is a level 1 ultimate route, then this route is used to forward the packet.
Dynamically Learned IPv4 Routes
Routing Table Terms
Special terms are applied when discussing the contents of a routing table.
The Cisco IP routing table is a
that is used to speed up the lookup process when locating routes and forwarding packets
Routes are discussed in terms of:
Level 2 child routes
A level 2 child route is a route that is a subnet of a classful network address.
Level 1 parent route
A parent route is a level 1 network route that is subnetted. A parent route can never be an ultimate route.
Each entry displays the classful network address, the number of subnets and the number of different subnet masks into which the classful address has been subdivided.
Level 1 route
A level 1 route is a route with a
subnet mask equal to or less than the classful mask
of the network address. Therefore, a level 1 route can be a:
- A default route is a static route with the address 0.0.0.0/0.
- A supernet route is a network address with a mask less than the classful mask, for example, a summary address.
- A network route that has a subnet mask equal to that of the classful mask.
An ultimate route is a routing table entry that contains either
a next-hop IPv4 address or an exit interface
. Directly connected, dynamically learned, and local routes are ultimate routes.
Parts of an IPv4 Route Entry
Remote Network Entries
Outgoing interface - Identifies the exit interface to use to forward a packet toward the final destination.
Route timestamp - Identifies from when the route was last heard.
Next hop - Identifies the IPv4 address of the next router to forward the packet to.
Metric - Identifies the value assigned to reach the remote network. Lower values indicate preferred routes.
The metric for static and connected routes is 0.
Administrative distance (AD) - Identifies the trustworthiness of the route source.
The AD for static routes is 1 and the AD for connected routes is 0
. Dynamic routing protocols have an AD higher than 1 depending upon the protocol.
Destination network - Identifies the address of the remote network.
Route source - Identifies how the route was learned.
RIPv2 Classless advertising
The network config under RIP always uses classful (even if we issue the version 2 command) addressing but that does not mean that is what is being advertised.
is changed under the router RIP config to the classful network 126.96.36.199 (class B)
The config you see under router rip is not the networks you are going to advertise
The network command under RIP/EIGRP/OSPF is used to tell the router which interfaces to run the routing protocol on, it is not like the network command in BGP which is used to advertise a specific network.
the way to test this is to connect another router to this one, run RIPv2 on that as well and then look at the routing table
Propagate a Default Route
To propagate a default route in RIP, the edge router must be configured with:
A default static route using the ip route 0.0.0.0 0.0.0.0 command.
router configuration command. This instructs R1 to originate default information, by propagating the static default route in RIP updates.
Configure Passive Interfaces
By default, RIP updates are forwarded out all RIP-enabled interfaces
R1(config-router)# passive-interface interface-type interface-id
router configuration command to prevent the transmission of routing updates through a router interface
All routing protocols support the passive-interface command.
As an alternative, all interfaces can be made passive using the
command. Interfaces that should not be passive can be re-enabled using the
Sending out unneeded updates on a LAN impacts the network in three ways:
- Advertising updates on a broadcast network is a security risk. RIP updates can be intercepted with packet sniffing software. Routing updates can be modified and sent back to the router, corrupting the routing table with false metrics that misdirect traffic.
- All devices on the LAN must process the update up to the transport layers, at which point the devices will discard the update.
- Bandwidth is used to transport unnecessary updates. Because RIP updates are either broadcasted or multicasted, switches also forward the updates out all ports.
Disable Auto Summarization
RIPv2 automatically summarizes networks at major network boundaries by default, just like RIPv1
When automatic summarization has been disabled, RIPv2 no longer summarizes networks to their classful address at boundary routers. RIPv2 now includes all subnets and their appropriate masks in its routing updates.
how ip protocols
now states that “automatic network summarization is not in effect”.
To modify the default RIPv2 behavior of automatic summarization, use the
router configuration mode command.
RIPv2 must be enabled before automatic summarization is disabled.
Enable and Verify RIPv2
By default, when a RIP process is configured on a Cisco router, it is running RIPv1, however, even though the router only sends RIPv1 messages, it can interpret both RIPv1 and RIPv2 messages. A RIPv1 router ignores the RIPv2 fields in the route entry.
Use the version 2 router configuration mode command to enable RIPv2
Configuring version 1 enables RIPv1 only, while configuring
returns the router to the default setting of sending version 1 updates but listening for version 1 and version 2 updates
Notice how the show ip protocols command verifies that R2 is now configured to send and receive version 2 messages only. The RIP process now includes the subnet mask in all updates, making RIPv2 a classless routing protocol.
R1# config t
R1(config-router)# router rip
Verify RIP Routing
show ip route
command displays the RIP routes installed in the routing table.
show ip protocols
command displays the IPv4 routing protocol settings currently configured on the router.
Router RIP Configuration Mode
RIP is rarely used in modern networks, it is useful as a foundation for understanding basic network routing.
To enable RIPv1, use the
Router(config)# router rip
This command does not directly start the RIP process. Instead, it provides access to the router configuration mode where the RIP routing settings are configured:
R1(config)# router rip
To disable and eliminate RIP
, use the
no router rip
global configuration command. This command stops the RIP process and erases all existing RIP configurations.
To enable RIP routing for a network, use the
router configuration mode command. Enter the
network address for each directly connected network. This command:
Enables RIP on all interfaces that belong to a specific network. Associated interfaces now both send and receive RIP updates.
Advertises the specified network in RIP routing updates sent to other routers every 30 seconds.
RIPv1 is a classful routing protocol for IPv4. Therefore, if a subnet address is entered, the IOS automatically converts it to the classful network address
Dynamic Routing Protocols
Dynamic versus Static Routing
Dynamic Routing Advantages and Disadvantages
Dynamic Routing Protocols Uses
Dynamic routing protocols help the network administrator manage the time-consuming and exacting process of configuring and maintaining static routes.
Dynamic routing is the best choice for large network
Static Routing Uses
Static routing has several primary uses, including:
Providing ease of routing table maintenance in smaller networks that are not expected to grow significantly.
Routing to and from a stub network, which is a network with only one default route out and no knowledge of any remote networks.
Accessing a single default route (which is used to represent a path to any network that does not have a more specific match with another route in the routing table).
Static Routing Advantages and Disadvantages
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Evolution
One of the first routing protocols was RIP. RIPv1 was released in 1988, but some of the basic algorithms within the protocol were used on the Advanced Research Projects Agency Network (ARPANET) as early as 1969.
The RIP protocol was updated to RIPv2 to accommodate growth in the network environment. However,
RIPv2 still does not scale to the larger network implementations of today.
To address the needs of larger networks, two advanced routing protocols were developed: Open Shortest Path First (
) and Intermediate System-to-Intermediate System (
Cisco developed the Interior Gateway Routing Protocol (
) and Enhanced IGRP (
), which also
scales well in larger network implementations.
Additionally, there was the need to connect different internetworks and provide routing between them. The Border Gateway Protocol (
) is now used between Internet service providers (ISPs). BGP is also used between ISPs and their larger private clients to exchange routing information.