- •Warning and Disclaimer
- •Feedback Information
- •Trademark Acknowledgments
- •About the Author
- •About the Technical Reviewers
- •Dedication
- •Acknowledgments
- •Contents at a Glance
- •Contents
- •Icons Used in This Book
- •Command Syntax Conventions
- •Cisco’s Motivation: Certifying Partners
- •Format of the CCNA Exams
- •What’s on the CCNA Exams
- •ICND Exam Topics
- •Cross-Reference Between Exam Topics and Book Parts
- •CCNA Exam Topics
- •INTRO and ICND Course Outlines
- •Objectives and Methods
- •Book Features
- •How This Book Is Organized
- •Part I: LAN Switching
- •Part II: TCP/IP
- •Part III: Wide-Area Networks
- •Part IV: Network Security
- •Part V: Final Preparation
- •Part VI: Appendixes
- •How to Use These Books to Prepare for the CCNA Exam
- •For More Information
- •Part I: LAN Switching
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Brief Review of LAN Switching
- •The Forward-Versus-Filter Decision
- •How Switches Learn MAC Addresses
- •Forwarding Unknown Unicasts and Broadcasts
- •LAN Switch Logic Summary
- •Basic Switch Operation
- •Foundation Summary
- •Spanning Tree Protocol
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Spanning Tree Protocol
- •What IEEE 802.1d Spanning Tree Does
- •How Spanning Tree Works
- •Electing the Root and Discovering Root Ports and Designated Ports
- •Reacting to Changes in the Network
- •Spanning Tree Protocol Summary
- •Optional STP Features
- •EtherChannel
- •PortFast
- •Rapid Spanning Tree (IEEE 802.1w)
- •RSTP Link and Edge Types
- •RSTP Port States
- •RSTP Port Roles
- •RSTP Convergence
- •Edge-Type Behavior and PortFast
- •Link-Type Shared
- •Link-Type Point-to-Point
- •An Example of Speedy RSTP Convergence
- •Basic STP show Commands
- •Changing STP Port Costs and Bridge Priority
- •Foundation Summary
- •Foundation Summary
- •Virtual LANs and Trunking
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Review of Virtual LAN Concepts
- •Trunking with ISL and 802.1Q
- •ISL and 802.1Q Compared
- •VLAN Trunking Protocol (VTP)
- •How VTP Works
- •VTP Pruning
- •Foundation Summary
- •Part II: TCP/IP
- •IP Addressing and Subnetting
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •IP Addressing Review
- •IP Subnetting
- •Analyzing and Interpreting IP Addresses and Subnets
- •Math Operations Used to Answer Subnetting Questions
- •Converting IP Addresses from Decimal to Binary and Back Again
- •The Boolean AND Operation
- •How Many Hosts and How Many Subnets?
- •What Is the Subnet Number, and What Are the IP Addresses in the Subnet?
- •Finding the Subnet Number
- •Finding the Subnet Broadcast Address
- •Finding the Range of Valid IP Addresses in a Subnet
- •Finding the Answers Without Using Binary
- •Easier Math with Easy Masks
- •Which Subnet Masks Meet the Stated Design Requirements?
- •What Are the Other Subnet Numbers?
- •Foundation Summary
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Extended ping Command
- •Distance Vector Concepts
- •Distance Vector Loop-Avoidance Features
- •Route Poisoning
- •Split Horizon
- •Split Horizon with Poison Reverse
- •Hold-Down Timer
- •Triggered (Flash) Updates
- •RIP and IGRP
- •IGRP Metrics
- •Examination of RIP and IGRP debug and show Commands
- •Issues When Multiple Routes to the Same Subnet Exist
- •Administrative Distance
- •Foundation Summary
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Link-State Routing Protocol and OSPF Concepts
- •Steady-State Operation
- •Loop Avoidance
- •Scaling OSPF Through Hierarchical Design
- •OSPF Areas
- •Stub Areas
- •Summary: Comparing Link-State and OSPF to Distance Vector Protocols
- •Balanced Hybrid Routing Protocol and EIGRP Concepts
- •EIGRP Loop Avoidance
- •EIGRP Summary
- •Foundation Summary
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Route Summarization and Variable-Length Subnet Masks
- •Route Summarization Concepts
- •VLSM
- •Route Summarization Strategies
- •Sample “Best” Summary on Seville
- •Sample “Best” Summary on Yosemite
- •Classless Routing Protocols and Classless Routing
- •Classless and Classful Routing Protocols
- •Autosummarization
- •Classful and Classless Routing
- •Default Routes
- •Classless Routing
- •Foundation Summary
- •Advanced TCP/IP Topics
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Scaling the IP Address Space for the Internet
- •CIDR
- •Private Addressing
- •Network Address Translation
- •Static NAT
- •Dynamic NAT
- •Overloading NAT with Port Address Translation (PAT)
- •Translating Overlapping Addresses
- •Miscellaneous TCP/IP Topics
- •Internet Control Message Protocol (ICMP)
- •ICMP Echo Request and Echo Reply
- •Destination Unreachable ICMP Message
- •Time Exceeded ICMP Message
- •Redirect ICMP Message
- •Secondary IP Addressing
- •FTP and TFTP
- •TFTP
- •MTU and Fragmentation
- •Foundation Summary
- •Part III: Wide-Area Networks
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Review of WAN Basics
- •Physical Components of Point-to-Point Leased Lines
- •Data-Link Protocols for Point-to-Point Leased Lines
- •HDLC and PPP Compared
- •Looped Link Detection
- •Enhanced Error Detection
- •Authentication Over WAN Links
- •PAP and CHAP Authentication
- •Foundation Summary
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •ISDN Protocols and Design
- •Typical Uses of ISDN
- •ISDN Channels
- •ISDN Protocols
- •ISDN BRI Function Groups and Reference Points
- •ISDN PRI Function Groups and Reference Points
- •BRI and PRI Encoding and Framing
- •PRI Encoding
- •PRI Framing
- •BRI Framing and Encoding
- •DDR Step 1: Routing Packets Out the Interface to Be Dialed
- •DDR Step 2: Determining the Subset of the Packets That Trigger the Dialing Process
- •DDR Step 3: Dialing (Signaling)
- •DDR Step 4: Determining When the Connection Is Terminated
- •ISDN and DDR show and debug Commands
- •Multilink PPP
- •Foundation Summary
- •Frame Relay
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Frame Relay Protocols
- •Frame Relay Standards
- •Virtual Circuits
- •LMI and Encapsulation Types
- •DLCI Addressing Details
- •Network Layer Concerns with Frame Relay
- •Layer 3 Addressing with Frame Relay
- •Frame Relay Layer 3 Addressing: One Subnet Containing All Frame Relay DTEs
- •Frame Relay Layer 3 Addressing: One Subnet Per VC
- •Frame Relay Layer 3 Addressing: Hybrid Approach
- •Broadcast Handling
- •Frame Relay Service Interworking
- •A Fully-Meshed Network with One IP Subnet
- •Frame Relay Address Mapping
- •A Partially-Meshed Network with One IP Subnet Per VC
- •A Partially-Meshed Network with Some Fully-Meshed Parts
- •Foundation Summary
- •Part IV: Network Security
- •IP Access Control List Security
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Standard IP Access Control Lists
- •IP Standard ACL Concepts
- •Wildcard Masks
- •Standard IP ACL: Example 2
- •Extended IP Access Control Lists
- •Extended IP ACL Concepts
- •Extended IP Access Lists: Example 1
- •Extended IP Access Lists: Example 2
- •Miscellaneous ACL Topics
- •Named IP Access Lists
- •Controlling Telnet Access with ACLs
- •ACL Implementation Considerations
- •Foundation Summary
- •Part V: Final Preparation
- •Final Preparation
- •Suggestions for Final Preparation
- •Preparing for the Exam Experience
- •Final Lab Scenarios
- •Scenario 1
- •Scenario 1, Part A: Planning
- •Solutions to Scenario 1, Part A: Planning
- •Scenario 2
- •Scenario 2, Part A: Planning
- •Solutions to Scenario 2, Part A: Planning
- •Part VI: Appendixes
- •Glossary
- •Answers to the “Do I Know This Already?” Quizzes and Q&A Questions
- •Chapter 1
- •“Do I Know This Already?” Quiz
- •Chapter 2
- •“Do I Know This Already?” Quiz
- •Chapter 3
- •“Do I Know This Already?” Quiz
- •Chapter 4
- •“Do I Know This Already?” Quiz
- •Chapter 5
- •“Do I Know This Already?” Quiz
- •Chapter 6
- •“Do I Know This Already?” Quiz
- •Chapter 7
- •“Do I Know This Already?” Quiz
- •Chapter 8
- •“Do I Know This Already?” Quiz
- •Chapter 9
- •“Do I Know This Already?” Quiz
- •Chapter 10
- •“Do I Know This Already?” Quiz
- •Chapter 11
- •“Do I Know This Already?” Quiz
- •Chapter 12
- •“Do I Know This Already?” Quiz
- •Using the Simulation Software for the Hands-on Exercises
- •Accessing NetSim from the CD
- •Hands-on Exercises Available with NetSim
- •Scenarios
- •Labs
- •Listing of the Hands-on Exercises
- •How You Should Proceed with NetSim
- •Considerations When Using NetSim
- •Routing Protocol Overview
- •Comparing and Contrasting IP Routing Protocols
- •Routing Through the Internet with the Border Gateway Protocol
- •RIP Version 2
- •The Integrated IS-IS Link State Routing Protocol
- •Summary of Interior Routing Protocols
- •Numbering Ports (Interfaces)
Configuring RIP and IGRP 173
must use the same IGRP AS number (5 in this case), and because all interfaces on each of the routers are in network 10.0.0.0, only a single network 10.0.0.0 subcommand is needed.
The show ip route command provides the most direct view of what a routing protocol does. First, the legend at the beginning of the show ip route command in Example 5-9 defines the letter codes that identify the source of the routing information—such as C for connected routes, R for RIP, and I for IGRP. Each of the Class A, B, and C networks is listed, along with each of that network’s subnets. If a static mask is used within that network, the mask is shown only in the line referring to the network. Each routing entry lists the subnet number and the outgoing interface. In most cases, the next-hop router’s IP address is also listed.
IGRP learns the same routes that RIP learned, but using different metrics. The output of the show ip route command lists six subnets. Also, notice the two routes to 10.1.5.0/24—one through Yosemite and one through Seville. Both routes are included in the routing table, because the default setting for maximum-paths is 4, and because the routes have an equal metric. Looking further into the output of the debug ip igrp transactions command, you can see the equal-cost routes being advertised. One route is shown in the update received on Serial1; the other route in the update is received on Serial0.
The output of the debug ip igrp transactions command shows the details of the routing updates, whereas the debug ip igrp events command simply mentions that routing updates have been received.
Finally, the show ip protocol command lists several important details about the routing protocol. The update timer is listed, shown with the time remaining until the next routing update is to be sent. Also, the elapsed time since an update was received from each neighboring router is listed at the end of the output. This command also lists each of
the neighbors from which routing information was received. If you are in doubt as to whether updates have been received during the recent past and from which routers, the show ip protocol command is the place to find out.
Issues When Multiple Routes to the Same Subnet Exist
With redundant links in a network, routers learn about multiple routes to the same subnet. A router might learn one route with one metric and then learn a better route that has a lower metric and replace the old route with the new, better route. Or, the old route might have a better metric. In some cases, the metric might tie, and the router has to decide what to do.
Figure 5-12 outlines an example in which new routes are learned. In the figure, Router B formerly only had a link to Router A; then, a link to Router C was added. Table 5-12 shows Router B’s routing table before the serial link between Routers B and C comes up, and Table 5-13 shows Router B’s routing table after the link between Routers B and C comes up.
174 Chapter 5: RIP, IGRP, and Static Route Concepts and Configuration
Figure 5-12 Routers A and C Advertising to Router B
162.11.5.0Router A
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Routing Update |
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
162.11.10.0 |
|
2 |
|
||
|
|
|
|
|
|
|
S0 |
S1 |
|
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
162.11.5.0 |
|
1 |
|
|||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162.11.9.0 |
|
1 |
|
||
162.11.9.0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
162.11.8.0 |
|
|
|
|
|||||||||
|
|
S0 |
|
|
|
|
|
|
|
|
|
|
S0 |
|
|
|
||||||
|
|
162.11.6.0 |
|
|
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
S1 |
|
|
S1 |
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||
Router C |
|
|
|
|
|
|
|
|
Router B |
|||||||||||||
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
162.11.10.0 |
1 |
|
|
|
|
|
E0 |
|
|
|
|
|
||
|
|
|
|
|
|
|
|
162.11.9.0 |
1 |
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
162.11.5.0 |
2 |
|
|
|
|
|
|
|
|
|
|
|
||
|
|
162.11.10.0 |
|
|
|
|
|
|
|
|
|
|
|
|
162.11.7.0 |
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Routing Update
NOTE The routing updates shown in Figure 5-12 show only the information needed for the point being made in this example. Other routes that would normally be in the routing update have been omitted.
Table 5-12 Router B Routing Table While Router B Serial1 Is Down
Group |
Outgoing Interface |
Next-Hop Router |
Metric |
Comments |
|
|
|
|
|
162.11.5.0 |
S0 |
162.11.8.1 |
1 |
|
|
|
|
|
|
162.11.7.0 |
E0 |
— |
0 |
|
|
|
|
|
|
162.11.8.0 |
S0 |
— |
0 |
|
|
|
|
|
|
162.11.9.0 |
S0 |
162.11.8.1 |
1 |
The metric 1 route is |
|
|
|
|
learned from Router A. |
|
|
|
|
|
162.11.10.0 |
S0 |
162.11.8.1 |
2 |
Currently, the best |
|
|
|
|
route is through |
|
|
|
|
Router A, because the |
|
|
|
|
link to Router C is |
|
|
|
|
down. |
|
|
|
|
|
Configuring RIP and IGRP 175
Table 5-13 Router B Routing Table After Learning a Second Valid Route to Subnet 162.11.10.0
|
Outgoing |
|
|
|
Group |
Interface |
Next-Hop Router |
Metric |
Comments |
|
|
|
|
|
162.11.5.0 |
S0 |
162.11.8.1 |
1 |
|
|
|
|
|
|
162.11.6.0 |
S1 |
— |
0 |
This route was added because it |
|
|
|
|
is directly connected to S1, |
|
|
|
|
which is now up and |
|
|
|
|
operational. |
|
|
|
|
|
162.11.7.0 |
E0 |
— |
0 |
|
|
|
|
|
|
162.11.8.0 |
S0 |
— |
0 |
|
|
|
|
|
|
162.11.9.0 |
S0 |
162.11.8.1 |
1 |
The metric 1 route was learned |
|
|
|
|
from Router A, but Router C |
|
|
|
|
also advertises a metric 1 route! |
|
|
|
|
Only one route is chosen—the |
|
|
|
|
first one that was learned. |
|
|
|
|
|
162.11.10.0 |
S1 |
162.11.6.2 |
1 |
A better route replaces the old |
|
|
|
|
route. The new route has a |
|
|
|
|
smaller metric and points |
|
|
|
|
directly out S1 toward Router |
|
|
|
|
C. |
|
|
|
|
|
Router B changes only one route in this case in reaction to the new routing updates
from Router C. Router B changes its route to 162.11.10.0 because the metric for the route through Router C (metric 1) is smaller than the one from Router A (metric 2).
Router B adds only one route in this example—the directly connected subnet 162.11.6.0. This route is added not because of this distance vector routing protocol, but because it is a directly connected subnet and that interface is now up.
In this example, Router B does not change its route to subnet 162.11.9.0, even though Router B now learns a metric 1 route to subnet 162.11.9.0 through both Router C
and Router A. In this case, the route that was already in the table is left in the table, which is a reasonable choice. For Router B to behave as in this example, it needs to configure the router igrp or router rip subcommand command maximum-paths 1, which means that Router B should add at most one route to the same subnet to the routing table. With maximum-paths set to 1, the first route that is added to the table stays in the table, and routes learned later, with the same metric, are not added.
By default, Cisco IOS software includes up to four equal-cost routes to the same subnet in the routing table—essentially as if maximum-paths 4 had been configured. In the last example, if Router B had used the default setting, it would have added a second route to 162.11.9.0, pointing out Serial1 through Router C. You can configure maximum-paths as low as 1 or as high as 6.
176 Chapter 5: RIP, IGRP, and Static Route Concepts and Configuration
When RIP places more than one route to the same subnet in the routing table, the router balances the traffic across the various routes. (The details of how Cisco IOS software balances packets is explained in detail in the Cisco Press book Inside Cisco IOS Software Architectures.)
The metric formula used for IGRP (and EIGRP) poses an interesting problem when considering equal-metric routes. IGRP can learn more than one route to the same subnet with different metrics; however, the metrics are very unlikely to be equal, because the metric is actually calculated with a mathematical formula. So, with IGRP (and EIGRP), you can tell the routing protocol to think of metrics that are “pretty close” as being equal. To do so, Cisco IOS software uses the variance router subcommand to define how different the metrics can be for routes to be considered to have equal metrics.
The variance command defines a multiplier; any metrics lower than the product of the lowest metric and the variance are considered equal. For example, if the metric for the better of two routes is 100, and the variance is set to 2, a second route with a metric less than 200 is considered equal-cost and can be added to the routing table (depending on the configuration of maximum-paths). If the variance were set to 4 in this example, routes to the same subnet with a metric less than 400 could be added to the routing table.
When IGRP places more than one route to the same subnet in the routing table, the router balances the traffic across the various routes in proportion to the metric values. You can choose to tell the router to use only the lowest-cost route using the traffic-share min router IGRP subcommand. This command tells the router that, even if multiple routes to the same subnet are in the routing table, it should use only the route that truly has the smallest metric. So why not just add only the truly lowest metric route to the routing table in the first place? Well, if the other pretty good routes are in the table, and the best one fails, you do not have to wait on IGRP to converge and add a new route to the routing table. Convergence time is practically instantaneous! So you can use the strategy of adding multiple nearly-equal-cost routes using the variance command, use the traffic-share min command to tell the router to just use the best of these routes, and converge more quickly when that route fails.
Administrative Distance
Many companies and organizations use a single routing protocol. However, in some cases, a company needs to use multiple routing protocols. For instance, if two companies connect their networks so that they can exchange information, they need to exchange some routing information. If one company uses RIP, and the other uses IGRP, on at least one router, both RIP and IGRP must be used. This is just one example, but it is not that unusual to need to run more than one routing protocol in a single router.
Configuring RIP and IGRP 177
Depending on the network topology, two routing protocols might learn routes to the same subnets. When a single routing protocol learns multiple routes to the same subnet, the metric tells it which route is best. However, because different routing protocols use different metrics, the IOS cannot compare the metrics. For instance, RIP might learn a route to subnet 10.1.1.0 with metric 1, and IGRP might learn a route to 10.1.1.0 with metric 8729. There is no basis for comparison between the two metrics.
To decide which route to use, IOS uses a concept called administrative distance. Administrative distance is a number that denotes how believable an entire routing protocol is on a single router. The lower the number, the better, or more believable, the routing protocol. For instance, RIP has a default administrative distance of 120, and IGRP defaults to 100, making IGRP more believable than RIP. So, when both routing protocols learn routes to the same subnet, the router adds only the IGRP route to the routing table.
The administrative distance values are configured on a single router and are not exchanged with other routers. Table 5-14 lists the various sources of routing information, along with the default administrative distances.
Table 5-14 Default Administrative Distances
Route Type |
Administrative Distance |
|
|
Connected |
0 |
|
|
Static |
1 |
|
|
EIGRP summary route |
5 |
|
|
EBGP |
20 |
|
|
EIGRP (internal) |
90 |
|
|
IGRP |
100 |
|
|
OSPF |
110 |
|
|
IS-IS |
115 |
|
|
RIP |
120 |
|
|
EIGRP (external) |
170 |
|
|
iBGP (external) |
200 |
|
|