CCNA: Cisco Certified
Network Associate Study
Guide
CHAPTER 5:
IP Routing
© Wiley Inc. 2006. All Rights Reserved.
The CCNA exam topics
covered in this chapter
include the following:
© Wiley Inc. 2006. All Rights Reserved.
What is Routing?
To route a router need to
know:
– Remote Networks
– Neighbor Routers
– All Possible routes to remote network
– The absolute best route to all remote
networks
– Maintain and verify the routing
D C B A
information
© Wiley Inc. 2006. All Rights Reserved.
Basic Path Selection
What interface will the router send
out a packet if it has destination
address of [Link]?
© Wiley Inc. 2006. All Rights Reserved.
Simple IP Routing
>ping [Link]
[Link] [Link]
[Link] [Link]
e0 e0
A
B s0 B
[Link] s0
Host A
[Link] [Link] [Link]
Host B
© Wiley Inc. 2006. All Rights Reserved.
Routing/PDU Example:
Host A Web browses to the HTTP
Server…. 2600
Lab_A S0 S1 Lab_B
E0 E0
Host A
HTTP Server
1. The destination address of a frame will be the _______________________
2. The destination IP address of a packet will be the IP address
of the ________________________________
3. The destination port number in a segment header will have a value of __
© Wiley Inc. 2006. All Rights Reserved.
Static Routes
Stub Network
[Link] [Link]
SO
SO
AA B
B
[Link] [Link]
Routes must be unidirectional
© Wiley Inc. 2006. All Rights Reserved.
Static Route
Configuration
ip route remote network
[mask]
{address|interface}
[distance]
[permanent]
Router(config)#ip route remote_network
mask next_hop
© Wiley Inc. 2006. All Rights Reserved.
Static Route Example
Stub Network
[Link] [Link]
SO
SO
A B
B
[Link] [Link]
ip route [Link] [Link]
[Link]
or
ip route [Link] [Link] s0
© Wiley Inc. 2006. All Rights Reserved.
Default Routes
Stub Network
[Link]
[Link]
SO
SO
A B
B
[Link] [Link]
ip route [Link] [Link] [Link]
ip classless
© Wiley Inc. 2006. All Rights Reserved.
Routing vs. Routed
• Routing protocols are used
between routers to:
– Determine the path of a packet through a network
– Maintain routing tables
– Examples?
• Routed protocols are:
– Assigned to an interface
– Once the path is determined by the Routing protocol,
determines method of delivery
– Examples?
© Wiley Inc. 2006. All Rights Reserved.
Routing Protocols
IGPs: RIP, IGRP EGPs: BGP
Autonomous System 1 Autonomous System 2
• An autonomous system is a collection of
networks under a common administrative
domain.
• IGPs operate within an autonomous
system.
• EGPs connect different autonomous
© Wiley Inc. 2006. All Rights Reserved.
systems.
Classful Routing
Overview
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
© Wiley Inc. 2006. All Rights Reserved.
Classless Routing
Overview
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 © Wiley Inc. 2006. All Rights Reserved.
Administrative Distance
Router A Router B
IGRP
RIP Administrative
Administrative Distance=100
Distance=120
Router C Router D
Default Administrative Distance
Directly Connected: 0
Static Route: 1
RIP: 120
IGRP: 100
EIGRP: 90 © Wiley Inc. 2006. All Rights Reserved.
OSPF: 110
Distance Vector
Distance—How far
Vector—In which direction
D C B A
Routing Routing Routing Routing
Table Table Table Table
Distance vector algorithms do not allow a
router to know the exact topology of an
internetwork.
All routers just broadcast their entire
routing table out all active interfaces on
© Wiley Inc. 2006. All Rights Reserved.
periodic time intervals
Discovering Routes
© Wiley Inc. 2006. All Rights Reserved.
Discovering Routes
© Wiley Inc. 2006. All Rights Reserved.
Routing Loops
© Wiley Inc. 2006. All Rights Reserved.
Router Loops
© Wiley Inc. 2006. All Rights Reserved.
RIP Overview
64kbps
T1 T1
T1
– Hop count metric selects the path, 16 is unreachable
– Full route table broadcast every 30 seconds
– Load balance maximum of 6 equal cost paths
(default = 4)
© Wiley Inc. 2006. All Rights Reserved.
– RIPv2 supports VLSM and Discontiguous networks
RIP Routing
Configuration
Router(config)#router rip
Router(config-router)#network network-number*
[Link] [Link] [Link]
router RIP router RIP
network [Link] network [Link]
network [Link] network [Link]
*Network is a classful network address.
Every device on network uses the same subnet mask
© Wiley Inc. 2006. All Rights Reserved.
RIP Version 2
• Allows the use of variable length
subnet masks (VLSM) by sending
subnet mask information with each
route update
• Distance Vector – same AD, and
timers.
• Easy configuration, just add the
command “version 2” under the
router rip
router rip configuration
network [Link]
version 2
© Wiley Inc. 2006. All Rights Reserved.
Discontiguous
Addressing
• Two networks of the same classful
networks are separated by a different
network address
[Link]/24 [Link]/24
[Link]/24
– RIPv1 and IGRP do not advertise subnet masks, and
therefore cannot support discontiguous subnets.
– OSPF, EIGRP, and RIPv2 can advertise subnet masks,
and therefore can support discontiguous subnets.
© Wiley Inc. 2006. All Rights Reserved.
Passive Interface
Maybe you don’t want to send RIP
updates out your router
interface connected to the
Internet. Use the passive-
interface command:
Router(config)#router rip
X
Router(config-router)#passive-interface
Updates
serial0
Internet S0 Gateway
This allows a router to receive route updates on an interfac
but not send updates via that interface
© Wiley Inc. 2006. All Rights Reserved.
Verifying RIP
Router#show ip protocols
Router#show protocols
Router#show ip route
Router#debug ip rip
Router#undebug all (un all)
© Wiley Inc. 2006. All Rights Reserved.
IGRP
• Interior Gateway Routing Protocol - Cisco
Proprietary
• Uses bandwidth and delay of the line by default
to select best path
Router A Router B
Autonomous
System
Router C Router D
Requires Autonomous System number
for activation © Wiley Inc. 2006. All Rights Reserved.
IGRP vs. RIP
• The important IGRP
characteristics are as follows:
– More scalability than RIP
– Fast response to network changes
– Sophisticated metric
– Multiple-path support
© Wiley Inc. 2006. All Rights Reserved.
Configuring IGRP
Router(config)#router igrp autonomous-system
Router(config-router)#network network-number*
[Link] [Link] [Link]
router IGRP 10 router IGRP 10
network [Link] network [Link]
network [Link] network [Link]
*Network is a classful network address.
Every device on network uses the same subnet mask
© Wiley Inc. 2006. All Rights Reserved.
Verifying IGRP
Router# show ip route
Router# show ip protocols
Router# debug ip igrp
transaction
Router# debug ip igrp events
Router# undebug all (un all)
© Wiley Inc. 2006. All Rights Reserved.