 •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
 •CrossReference 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: WideArea 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 ForwardVersusFilter 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
 •EdgeType Behavior and PortFast
 •LinkType Shared
 •LinkType PointtoPoint
 •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 LoopAvoidance Features
 •Route Poisoning
 •Split Horizon
 •Split Horizon with Poison Reverse
 •HoldDown 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
 •LinkState Routing Protocol and OSPF Concepts
 •SteadyState Operation
 •Loop Avoidance
 •Scaling OSPF Through Hierarchical Design
 •OSPF Areas
 •Stub Areas
 •Summary: Comparing LinkState 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 VariableLength 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: WideArea Networks
 •“Do I Know This Already?” Quiz
 •Foundation Topics
 •Review of WAN Basics
 •Physical Components of PointtoPoint Leased Lines
 •DataLink Protocols for PointtoPoint 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 FullyMeshed Network with One IP Subnet
 •Frame Relay Address Mapping
 •A PartiallyMeshed Network with One IP Subnet Per VC
 •A PartiallyMeshed Network with Some FullyMeshed 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 Handson Exercises
 •Accessing NetSim from the CD
 •Handson Exercises Available with NetSim
 •Scenarios
 •Labs
 •Listing of the Handson 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 ISIS Link State Routing Protocol
 •Summary of Interior Routing Protocols
 •Numbering Ports (Interfaces)
Analyzing and Interpreting IP Addresses and Subnets 107
example, someone with a problem might call and tell you his IP address. After ﬁnding out the mask that’s used, you enter the show ip route command on the router. That command typically lists subnets, so you need to be able to easily ﬁgure out the subnet of which the address is a member. And not all networks use nice, easy subnet masks.
No matter how useful this book might be toward helping you with a real networking job, its primary goal is to help you pass the exam. Therefore, the rest of this chapter is geared toward helping you understand how to interpret and analyze IP addresses.
Math Operations Used to Answer Subnetting Questions
Computers, especially routers, do not think about IP addresses in terms of the conventions shown in Table 42. They think in terms of 32bit binary numbers. This is ﬁne, because technically that’s what IP addresses are. Also, computers use a mask to deﬁne the structure of these binary IP addresses. A full understanding of what this means is not too difﬁcult. However, getting accustomed to doing the binary math in your head can be challenging, particularly if you don’t do it every day.
In this section, you will read about two key math operations that will be used throughout the discussion of answering CCNA addressing and subnetting questions. One operation converts IP addresses from decimal to binary and then back to decimal. The other operation performs a binary math operation called a Boolean AND.
Converting IP Addresses from Decimal to Binary and Back Again
If you already know how binary works, how binarytodecimal and decimaltobinary conversion work, and how to convert IP addresses from decimal to binary and back, skip to the next section, “The Boolean AND Operation.”
IP addresses are 32bit binary numbers written as a series of decimal numbers separated by periods. To examine an address in its true form, binary, you need to convert from decimal to binary. To put a 32bit binary number in the decimal form that is needed when conﬁguring a router, you need to convert the 32bit number back to decimal 8 bits at a time.
One key to the conversion process for IP addresses is remembering these facts:
When you convert from one format to the other, each decimal number represents 8 bits.
When you convert from decimal to binary, each decimal number converts to an 8bit number.
When you convert from binary to decimal, each set of 8 consecutive bits converts to one decimal number.
108 Chapter 4: IP Addressing and Subnetting
Consider the conversion of IP address 150.150.2.1 to binary. The number 150, when converted to its 8bit binary equivalent, is 10010110. How do you know that? For now, look at the conversion chart in Appendix B, “BinarytoDecimal Conversion Chart.” The next byte, another decimal 150, is converted to 10010110. The third byte, decimal 2, is converted to 00000010. Finally, the fourth byte, decimal 1, is converted to 00000001. The combined series of 8bit numbers is the 32bit IP address—in this case, 10010110 10010110 00000010 00000001.
If you start with the binary version of the IP address, you ﬁrst separate it into four sets of eight digits. Then you convert each set of eight binary digits to its decimal equivalent. For example, writing an IP address as follows is correct, but not very useful:
10010110100101100000001000000001
To convert this number to a moreconvenient decimal form, ﬁrst separate it into four sets of eight digits:
10010110 10010110 00000010 00000001
Then look in the conversion chart in Appendix B. You see that the ﬁrst 8bit number converts to 150, and so does the second. The third set of 8 bits converts to 2, and the fourth converts to 1, giving you 150.150.2.1.
Using the chart in Appendix B makes this much easier, but you will not have the chart at the exam, of course! So you can do a couple of things. First, you can learn how to do the conversion. The book does not cover it, but the websites referenced at the end of this section can help. The other alternative is to use the chart when studying, and study the examples that show you how to manipulate IP addresses and ﬁnd the right answers to the test questions without doing any binary math. If that works for you, you do not need to be speedy and proﬁcient at doing binarytodecimal and decimaltobinary conversions.
One last important fact: With subnetting, the subnet and host parts of the address might span only part of a byte of the IP address. But when you convert from binary to decimal and decimal to binary, the rule of always converting an 8bit binary number to a decimal number is always true. However, when thinking about subnetting, you need to ignore byte boundaries and think of IP addresses as 32bit numbers without speciﬁc byte boundaries. This is explained more in the section “Finding the Subnet Number.”
Here are some websites that might help you if you want more information:
■For basic information on base 10, base 2 (binary), and conversion practice, visit www.ibilce.unesp.br/courseware/datas/numbers.htm#mark2.
■For a description of the conversion process, try doit.ort.org/course/inforep/135.htm.
Analyzing and Interpreting IP Addresses and Subnets 109
■For another description of the conversion process, try www.goshen.edu/compsci/ mis200/decbinary.htm.
■For some free video classes that cover binary, conversion, and subnetting, go to www.learntosubnet.com.
The Boolean AND Operation
George Boole, a mathematician who lived in the 1800s, created a branch of mathematics that came to be called Boolean math after its creator. Boolean math has many applications in computing theory. In fact, you can ﬁnd subnet numbers given an IP address and subnet mask using a Boolean AND.
A Boolean AND is a math operation performed on a pair of onedigit binary numbers. The result is another onedigit binary number. The actual math is even simpler than those ﬁrst two sentences! The following list shows the four possible inputs to a Boolean AND, and the result:
■0 AND 0 yields a 0
■0 AND 1 yields a 0
■1 AND 0 yields a 0
■1 AND 1 yields a 1
In other words, the input to the equation consists of two onedigit binary numbers, and the output of the equation is one singledigit binary number. The only time the result is a binary 1 is when both input numbers are also binary 1; otherwise, the result of a Boolean AND is a 0.
You can perform a Boolean AND on longer binary numbers, but you are really just performing an AND on each pair of numbers. For instance, if you wanted to AND together two fourdigit numbers, 0110 and 0011, you would perform an AND on the ﬁrst digit of each number and write down the answer. Then you would perform an AND on the second digit of each number, and so on, through the four digits. Table 44 shows the general idea.
Table 44 Bitwise Boolean AND Between Two FourDigit Numbers

FourDigit 





Binary 
First 
Second 
Third 
Fourth 

Number 
Digit 
Digit 
Digit 
Digit 






First Number 
0110 
0 
1 
1 
0 






Second Number 
0011 
0 
0 
1 
1 






Boolean AND Result 
0010 
0 
0 
1 
0 






110 Chapter 4: IP Addressing and Subnetting
This table separates the four digits of each original number to make the point more obvious. Look at the “First Digit” column. The ﬁrst digit of the ﬁrst number is 0, and the ﬁrst digit of the second number is also 0. 0 AND 0 yields a binary 0, which is listed as the Boolean AND result in that same column. Similarly, the second digits of the two original numbers are 1 and 0, respectively, so the Boolean AND result in the “Second Digit” column shows a 0. For the third digit, the two original numbers’ third digits are 1 and 1, so the AND result this time shows a binary 1. Finally, the fourth digits of the two original numbers are 0 and 1, so the Boolean AND result is 0 for that column.
When you Boolean AND together two longer binary numbers, you perform what is called a bitwise Boolean AND. This term simply means that you do what the previous example shows: You AND together the ﬁrst digits from each of the two original numbers, and then the second digits, and then the third, and so on, until each pair of singledigit binary numbers has been ANDed.
IP subnetting math frequently uses a Boolean AND between two 32bit binary numbers. The actual operation works just like the example in Table 44, except it is longer.
To discover the subnet number in which a particular IP address resides, you perform a bitwise AND between the IP address and the subnet mask. Although humans can sometimes look at an IP address and mask in decimal and derive the subnet number, routers and other computers use a Boolean AND between the IP address and the subnet mask to ﬁnd the subnet number, so you need to understand this process. In this chapter, you will also read about a process by which you can ﬁnd the subnet number without using binary conversion or Boolean ANDs.
Table 45 shows an example of the derivation of a subnet number.
Table 45 Bitwise Boolean AND Example

Decimal 
Binary 



Address 
150.150.2.1 
1001 0110 1001 0110 0000 0010 0000 0001 



Mask 
255.255.255.0 
1111 1111 1111 1111 1111 1111 0000 0000 



Result of AND 
150.150.2.0 
1001 0110 1001 0110 0000 0010 0000 0000 



First, focus only on the third column of the table. The binary version of the IP address 150.150.2.1 is listed ﬁrst. The next row shows the 32bit binary version of the subnet mask (255.255.255.0). The last row shows the results of a bitwise AND of the two numbers. In other words, the ﬁrst bit in each number is ANDed, and then the second bit in each number, and then the third, and so on, until all 32 bits in the ﬁrst number have been ANDed with the bit in the same position in the second number.