Chapter 6 IPv4 Routing
Chapter 6 IPv4 Routing
IPv4 Routing
CISCO CERTIFIED NETWORK ASSOCIATE
(CCNA)
Agenda
IP Routing Basic
IP Routing Process
Static Routing
Dynamic Routing Protocols
Distance Vector Routing Protocols
2
IP Routing Basic
3
What Is Routing?
4
What Is Routing?
5
IP Routing Process
6
IP Routing Process
If the destination is local, send directly:
◦ Find the destination host’s MAC address. Use the already-known Address Resolution Protocol (ARP) table entry, or
use ARP messages to learn the information
◦ Encapsulate the IP packet in a data link frame, with the destination data link address of the destination host
7
IP Routing Process
8
Example of IP Routing
IPv4 Network Used to Show Five-Step Routing Example
9
IP Address Configuration Overview
R1#config t
R1(config)#int g0/0
R1(config-if)#ip add 172.16.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int s0/0/0
R1(config-if)#ip add 172.16.4.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int s0/0/1
R1(config-if)#ip add 172.16.5.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shut
R1(config-if)#end
R1#write
10
Secondary IP Addressing
Secondary IP Addressing Cofiguration
R1#config t
R1(config)#int g0/0
R1(config-if)#ip add 172.16.1.1 255.255.255.0
R1(config-if)#ip add 172.16.9.1 255.255.255.0 secondary
R1(config-if)#no shut
R1(config-if)#end
R1#write
11
Identifying Static and Dynamic Routes
Static Route Dynamic Route
Uses a route that a network Uses a route that a network routing
administrator enters into the protocol adjusts automatically for
router manually topology or traffic changes
12
Static Routing
13
Static Routing
Static routing benefits
◦ There is no overhead on the router CPU
◦ There is no bandwidth usage between routers
◦ It adds security because the administrator can choose to allow routing access to certain networks only
14
Static Routing Configuration
Defines a path to an IP destination network or subnet or host
Router(config)#ip route network [mask]
{address | interface}[distance] [permanent]
15
Static Route Example Configuration
This is a unidirectional route. You must have a route configured in the opposite direction.
16
Default Routes
To send packets with a remote destination network not in the routing table to the next-hop router
This route allows the stub network to reach all known networks beyond router A
17
Verifying the Static Route
Verifying the Static Route Configuration
router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
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
18
Dynamic Routing Protocols
19
Dynamic Routing Protocols
Dynamic routing is when protocols
are used to find networks and
update routing tables on routers
This is easier than using static or
default routing, but it’ll cost you in
terms of router CPU processes and
bandwidth on the network links
20
Autonomous Systems
• An autonomous system is a collection of networks under a common administrative domain
◦ Autonomous Systems: Interior or Exterior Routing Protocols
◦ IGPs operate within an autonomous system
◦ EGPs connect different autonomous systems
21
IGPs and EGPs
Comparing Locations for Using IGPs and EGPs
22
Administrative Distances
Used to rate the trustworthiness of routing information received on a router from a neighbor router
An integer from 0 to 255, where 0 is the most trusted and 255 means no traffic will be passed via this
route
If a router receives two updates listing the same remote network, the first thing the router checks is
the AD
If one of the advertised routes has a lower AD than the other, then the route with the lowest AD will
be placed in the routing table
If both advertised routes to the same network have the same AD, then routing protocol metrics (such
as hop count or bandwidth of the lines) will be used to find the best path to the remote network. The
advertised route with the lowest metric will be placed in the routing table
if both advertised routes have the same AD as well as the same metrics, then the routing protocol will
load-balance to the remote network
23
Default Administrative Distances
Default Administrative Distances
Route Source Default AD
Connected interface 0
Static route 1
EIGRP 90
IGRP 100
OSPF 110
RIP 120
External EIGRP 170
Unknown 255 (this route will never be used)
24
AD Example
Administrative Distances Example
25
AD Example
Administrative Distances Example
26
Classes of Routing Protocols
Distance vector
◦ Find the best path to a remote network by judging distance
◦ Each time a packet goes through a router, that’s called a hop
◦ The route with the least number of hops to the network is determined to be the best route
◦ Example: RIP and IGRP
Link state
◦ Find the best path to a remote network by judging bandwidth (cost)
◦ also called shortest-path-first protocols, the routers each create three separate tables (neighbors table,
topology table, routing table)
◦ Example: OSPF, IS-IS
Hybrid
◦ Use aspects of both distance vector and link state
◦ Example: EIGRP
27
Classful Routing Protocols
Classful routing protocols do not include the subnet mask with the route advertisement.
Within the same network, consistency of the subnet masks is assumed.
Summary routes are exchanged between foreign networks.
Examples of classful routing protocols:
◦ RIP Version 1 (RIPv1)
◦ IGRP
28
Classless Routing Protocols
Classless routing protocols include the subnet mask with the route advertisement.
Classless routing protocols support variable-length subnet masking (VLSM).
Summary routes can be manually controlled within the network.
Examples of classless routing protocols:
◦ RIP Version 2 (RIPv2)
◦ EIGRP
◦ OSPF
◦ IS-IS
29
Routing Protocol Comparison
Routing Protocol Comparison Chart
30
Distance Vector Routing Protocols
31
Distance Vector Routing Protocols
Distance vector (sometimes called Bellman-Ford after its creators)
The distance-vector routing algorithm passes complete routing table contents to neighboring
routers, which then combine the received routing table entries with their own routing tables to
complete the router’s routing table
This is called routing by rumor, because a router receiving an update from a neighbor router
believes the information about remote networks without actually finding out for itself
Example: Routing Information Protocol (RIP) and Cisco-proprietary Interior Gateway Routing
Protocol (IGRP)
32
Periodic Copies of Routing Table
Routers pass periodic copies of routing table to neighbor routers and accumulate distance
vectors.
33
Routing Loops
Distance-vector routing protocols keep track of any changes to the internetwork by broadcasting
periodic routing updates out all active interfaces
◦ This broadcast includes the complete routing table
This works just fine, but it’s expensive in terms of CPU process and link bandwidth
And if a network outage happens, real problems can occur
◦ The slow convergence of distance-vector routing protocols can result in inconsistent routing tables and
routing loops
Routing loops can occur because every router isn’t updated simultaneously, or even close to it
34
Routing Loop Example
When Network 5 fails, RouterE tells RouterC
◦ This causes RouterC to stop routing to Network 5 through RouterE
But routers A, B, and D don’t know about Network 5 yet, so they keep sending out update information
RouterC will eventually send out its update and cause B to stop routing to Network 5, but routers A and D
are still not updated (it appears that Network 5 is still available through RouterB with a metric of 3)
35
Routing Loop Solution
Maximum Hop Count
◦ One way of solving this problem is to define a maximum hop count. RIP permits a hop count of up to 15, so anything
that requires 16 hops is deemed unreachable
Split Horizon
◦ This reduces incorrect routing information and routing overhead in a distance-vector network by enforcing the rule
that routing information cannot be sent back in the direction from which it was received
Route Poisoning
◦ For example, when Network 5 goes down, RouterE initiates route poisoning by advertising Network 5 as 16, or
unreachable (sometimes referred to as infinite)
◦ When RouterC receives a route poisoning from RouterE, it sends an update, called a poison reverse, back to RouterE
Holddowns
◦ Prevents regular update messages from reinstating a route that is going up and down (called flapping)
36