CCNA™: Cisco® Certified Network Associate Study Guide, 5th Edition Todd Lammle SYBEX® 4391.book Page i Wednesday, December 8, 2004 12:55 PM CCNA : ™ Cisco® Certified Network Associate Study Guide 5th Edition Todd Lammle San Francisco • London 4391.book Page ii Wednesday, December 8, 2004 12:55 PM Publisher: Neil Edde Acquisitions and Developmental Editor: Heather O’Connor Production Editor: Elizabeth Campbell Technical Editor: Toby Skandier Copyeditor: Suzanne Goraj Compositor: Craig James Woods, Happenstance Type-O-Rama Graphic Illustrator: Jeff Wilson, Happenstance Type-O-Rama CD Coordinator: Dan Mummert CD Technician: Kevin Ly Proofreaders: Jim Brook, Candace English, Nancy Riddiough Indexer: Nancy Guenther Book Designer: Judy Fung Cover Designer: Archer Design Cover Photographer: Photodisc, Victor Arre Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy, photograph, magnetic, or other record, without the prior agreement and written per- mission of the publisher. First edition copyright © 1999 SYBEX Inc. Second edition copyright © 2000 SYBEX, Inc. Third edition copyright © 2002 SYBEX, Inc. Fourth edition copyright © 2003 SYBEX, Inc. Library of Congress Card Number: 2004097259 ISBN: 0-7821-4391-1 SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc. in the United States and/or other countries. Screen reproductions produced with FullShot 99. FullShot 99 © 1991-1999 Inbit Incorporated. All rights reserved. FullShot is a trademark of Inbit Incorporated. The CD interface was created using Macromedia Director, COPYRIGHT 1994, 1997-1999 Macromedia Inc. For more information on Macromedia and Macromedia Director, visit http://www.macromedia.com. This study guide and/or material is not sponsored by, endorsed by or affiliated with Cisco Systems, Inc. Cisco ®, Cisco Systems ®, CCDA™, CCNA™, CCDP™, CSS1™, CCIP™, BSCI™, CCNP™, CCIE™, CCSI™, the Cisco Systems logo and the CCIE logo are trademarks or registered trademarks of Cisco Systems, Inc. in the United States and certain other countries. All other trademarks are trademarks of their respective owners. TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by following the capitalization style used by the manufacturer. The author and publisher have made their best efforts to prepare this book, and the content is based upon final release software whenever possible. Portions of the manuscript may be based upon pre-release versions supplied by software manufacturer(s). The author and the publisher make no representation or warranties of any kind with regard to the completeness or accuracy of the contents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book. Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 4391.book Page iii Wednesday, December 8, 2004 12:55 PM To Our Valued Readers: Thank you for looking to Sybex for your CCNA exam prep needs. We at Sybex are proud of our reputation for providing certification candidates with the practical knowledge and skills needed to succeed in the highly competitive IT marketplace. This new edition of the best-selling CCNA: Cisco Certified Network Associate Study Guide reflects our commit- ment to provide CCNA candidates with the most up-to-date, accurate, and accessible instructional material on the market. As with previous editions, Todd and the editors have worked hard to ensure that the study guide you hold in your hands is comprehensive, in-depth, and pedagogically sound. We’re confident that this book will exceed the demanding standards of the certification marketplace and help you, the CCNA certification candidate, succeed in your endeavors. As always, your feedback is important to us. If you believe you’ve identified an error in the book, please send a detailed e-mail to [email protected]. And if you have general comments or suggestions, feel free to drop me a line directly at [email protected]. At Sybex we're con- tinually striving to meet the needs of individuals preparing for certification exams. Good luck in pursuit of your CCNA certification! Neil Edde Publisher—Certification Sybex, Inc. 4391.book Page iv Wednesday, December 8, 2004 12:55 PM Software License Agreement: Terms and Conditions The media and/or any online materials accompanying media during this warranty period, you may obtain a this book that are available now or in the future contain replacement of identical format at no charge by sending programs and/or text files (the "Software") to be used in the defective media, postage prepaid, with proof of pur- connection with the book. SYBEX hereby grants to you chase to: a license to use the Software, subject to the terms that follow. Your purchase, acceptance, or use of the Soft- SYBEX Inc. ware will constitute your acceptance of such terms. Product Support Department The Software compilation is the property of SYBEX 1151 Marina Village Parkway unless otherwise indicated and is protected by copyright Alameda, CA 94501 to SYBEX or other copyright owner(s) as indicated in Web: http://www.sybex.com the media files (the "Owner(s)"). You are hereby granted a single-user license to use the Software for your After the 90-day period, you can obtain replacement personal, noncommercial use only. You may not repro- media of identical format by sending us the defective duce, sell, distribute, publish, circulate, or commercially disk, proof of purchase, and a check or money order for exploit the Software, or any portion thereof, without the $10, payable to SYBEX. written consent of SYBEX and the specific copyright Disclaimer owner(s) of any component software included on this media. SYBEX makes no warranty or representation, either In the event that the Software or components include expressed or implied, with respect to the Software or its specific license requirements or end-user agreements, contents, quality, performance, merchantability, or fit- statements of condition, disclaimers, limitations or war- ness for a particular purpose. In no event will SYBEX, ranties ("End-User License"), those End-User Licenses its distributors, or dealers be liable to you or any other supersede the terms and conditions herein as to that par- party for direct, indirect, special, incidental, consequen- ticular Software component. Your purchase, accep- tial, or other damages arising out of the use of or inabil- tance, or use of the Software will constitute your ity to use the Software or its contents even if advised of acceptance of such End-User Licenses. the possibility of such damage. In the event that the Soft- By purchase, use or acceptance of the Software you fur- ware includes an online update feature, SYBEX further ther agree to comply with all export laws and regula- disclaims any obligation to provide this feature for any tions of the United States as such laws and regulations specific duration other than the initial posting. may exist from time to time. The exclusion of implied warranties is not permitted by some states. Therefore, the above exclusion may not Software Support apply to you. This warranty provides you with specific Components of the supplemental Software and any legal rights; there may be other rights that you may have offers associated with them may be supported by the that vary from state to state. The pricing of the book specific Owner(s) of that material, but they are not sup- with the Software by SYBEX reflects the allocation of ported by SYBEX. Information regarding any available risk and limitations on liability contained in this agree- support may be obtained from the Owner(s) using the ment of Terms and Conditions. information provided in the appropriate read.me files or Shareware Distribution listed elsewhere on the media. Should the manufacturer(s) or other Owner(s) cease to This Software may contain various programs that are offer support or decline to honor any offer, SYBEX distributed as shareware. Copyright laws apply to both bears no responsibility. This notice concerning support shareware and ordinary commercial software, and the for the Software is provided for your information only. copyright Owner(s) retains all rights. If you try a share- SYBEX is not the agent or principal of the Owner(s), ware program and continue using it, you are expected to and SYBEX is in no way responsible for providing any register it. Individual programs differ on details of trial support for the Software, nor is it liable or responsible periods, registration, and payment. Please observe the for any support provided, or not provided, by the requirements stated in appropriate files. Owner(s). Copy Protection Warranty The Software in whole or in part may or may not be SYBEX warrants the enclosed media to be free of phys- copy-protected or encrypted. However, in all cases, ical defects for a period of ninety (90) days after pur- reselling or redistributing these files without authoriza- chase. The Software is not available from SYBEX in any tion is expressly forbidden except as specifically pro- other form or media than that enclosed herein or posted vided for by the Owner(s) therein. to www.sybex.com. If you discover a defect in the 4391.book Page v Wednesday, December 8, 2004 12:55 PM Acknowledgments For trying to keep me going in a straight line, I need to thank Heather O’Connor. It is no small accomplishment, and I applaud her patience and dedication to our vision. Elizabeth Campbell was instrumental in the success of this book. Without her hard work and focused attention to producing a flawless book, it would never have come together as quickly as it has. Elizabeth has an almost magical ability to turn my words into a beautiful book. Thank you! I also want to thank my technical editor, Toby Skandier. His dedicated, concise comments have been invaluable and made this a better book. I truly enjoy working with him. Thank you, Toby! Thanks also to the CD team whose hard work has resulted in a power-packed, good-looking CD test engine. Thanks also to the compositors at Happenstance Type-O-Rama that laid out the fine pages you are reading. And Suzanne Goraj’s eagle eye weeded out any grammar and spelling problems. Thanks, Suzanne! 4391.book Page vi Wednesday, December 8, 2004 12:55 PM 4391.book Page vii Wednesday, December 8, 2004 12:55 PM Contents at a Glance Introduction xxi Assessment Test xxxv Chapter 1 Internetworking 1 Chapter 2 Internet Protocols 59 Chapter 3 IP Subnetting and Variable Length Subnet Masks (VLSMs) 105 Chapter 4 Introduction to the Cisco IOS 159 Chapter 5 IP Routing 221 Chapter 6 Enhanced IGRP (EIGRP) and Open Shortest Path First (OSPF) 289 Chapter 7 Layer 2 Switching 343 Chapter 8 Virtual LANs (VLANs) 383 Chapter 9 Managing a Cisco Internetwork 431 Chapter 10 Managing Traffic with Access Lists 483 Chapter 11 Wide Area Networking Protocols 519 Appendix A Commands in This Study Guide 589 Glossary 601 Index 661 4391.book Page viii Wednesday, December 8, 2004 12:55 PM 4391.book Page ix Wednesday, December 8, 2004 12:55 PM Contents Introduction xxi Assessment Test xxxv Chapter 1 Internetworking 1 Internetworking Basics 2 Internetworking Models 7 The Layered Approach 7 Advantages of Reference Models 8 The OSI Reference Model 8 The Application Layer 10 The Presentation Layer 11 The Session Layer 12 The Transport Layer 13 The Network Layer 17 The Data Link Layer 20 The Physical Layer 23 Ethernet Networking 24 Half- and Full-Duplex Ethernet 25 Ethernet at the Data Link Layer 26 Ethernet at the Physical Layer 31 Ethernet Cabling 33 Straight-Through Cable 33 Crossover Cable 34 Rolled Cable 35 Wireless Networking 36 Data Encapsulation 38 The Cisco Three-Layer Hierarchical Model 42 The Core Layer 44 The Distribution Layer 44 The Access Layer 45 Summary 45 Exam Essentials 46 Written Lab 1 47 Written Lab 1.1: OSI Questions 47 Written Lab 1.2: Defining the OSI Layers and Devices 48 Written Lab 1.3: Identifying Collision and Broadcast Domains 49 Review Questions 50 Answers to Review Questions 54 Answers to Written Lab 1.1 56