Acquisitions Editor: Jeff Kellum

Development Editor: Lisa Thibault

Technical Editor: Patrick J. Conlan

Production Editor: Eric Charbonneau

Copy Editor: Kim Wimpsett

Production Manager: Tim Tate

Vice President and Executive Group Publisher: Richard Swadley

Vice President and Executive Publisher: Joseph B. Wikert

Vice President and Publisher: Neil Edde

Compositor: Craig Johnson, Happenstance Type-O-Rama

Proofreader: Amy McCarthy

Indexer: Ted Laux

Anniversary Logo Design: Richard Pacifico

Cover Designer: Ryan Sneed

Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana

Published by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-0-4701-7560-6

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers should be aware that Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.

Library of Congress Cataloging-in-Publication Data is available from the publisher.

TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. CCNA and IOS are registered trademarks of Cisco Systems, Inc. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.

Dear Reader

Thank you for choosing Todd Lammle’s CCNA IOS Command Survival Guide. This book is part of a family of premium quality Sybex books, all written by outstanding authors who combine practical experience with a gift for teaching.

Sybex was founded in 1976. More than thirty years later, we’re still committed to producing consistently exceptional books. With each of our titles we’re working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal is to bring you the best books available.

I hope you see all that reflected in these pages. I’d be very interested to hear your comments and get your feedback on how we’re doing. Feel free to let me know what you think about this or any other Sybex book by sending me an email at nedde@wiley.com, or if you think you’ve found a technical error in this book, please visit http://sybex.custhelp.com. Customer feedback is critical to our efforts at Sybex.

Best regards,

Neil Edde

Vice President and Publisher

Sybex, an Imprint of Wiley

Acknowledgments

Kudos to Jeff Kellum for coming up with the idea for this book. This was one of my favorite books I have written.

Thanks to Lisa Thibault for her patience and gentle but effective direction and also thanks to Eric Charbonneau for helping me organize and keep my thoughts going in one direction—which is no easy task! Also, thanks to Pat Conlan for his technical expertise. Finally, thanks to copy editor Kim Wimpsett, proofreader Amy McCarthy, and compositor Craig Johnson; all of who helped to create this fantastic title.

About the Author

Todd Lammle, CCSI, CCNA/CCNP/CCSP, MCSE, CEH/CHFI, FCC RF Licensed, is the authority on Cisco Certification internetworking. He is a world renowned author, speaker, trainer and consultant. Todd has over 25 years of experience working with LAN’s, WAN’s and large licensed and unlicensed Wireless networks. He is president of GlobalNet Training and Consulting, Inc., a network integration and training firm based in Dallas. You can reach Todd through his forum at www.lammle.com.

Introduction

I know it’s kind of wrong to say this type of stuff about your own stuff, but I’m just going to do it—this is a really good book! It might even be the most interesting book I’ve written so far. A big reason for this is that its scope allowed me to go above and beyond covering the usual CCNA study guide material and really detail the commands I used in the guide, plus a lot of additional commands that just happen to be some of my personal favorites.

Do remember that, although very cool indeed, this volume isn’t intended to be a one-stop shop for passing the CCNA exams. Think of it and use it as a supplement to other study material—like, well, my Sybex CCNA study guide! But seriously, I want you to know that this book will complement anything no matter what you have stashed in your personal arsenal to pass the exams—it’s that good, and yes, I said it myself. By the way, know that lots of other people (who I didn’t pay) think so too!

How to Use This Book

If you want a solid foundation for the serious and I hope successful goal of effectively preparing for the Cisco Certified Network Associate (CCNA) suite of exams—including the ICND1, ICND2, and the CCNA composite 640-802—then this is your baby! I’ve spent hundreds of hours putting together this book with the sole objective of helping you to pass the whole group of CCNA exams while actually learning learn how to configure Cisco routers, switches, and tons of other things too.

So, yes, this book is loaded with lots of valuable information, and you will get the most out of all that and your studying time if you understand how I put the book together.

To maximize your benefit from this book, I recommend the following study method:

1. My recommendation is to read the full Sybex CCNA Study Guide Sixth Edition and then just start reading this book from Chapter 1 and don’t stop until your all the way through Chapter 12. This study method will really help you concentrate on the command needed to cover the many CCNA objectives.

2. Study each chapter carefully, making sure you fully understand the command covered in each chapter. Pay extra-close attention to any chapter that includes material covered you struggled with when reading the full study guide.

3. Check out www.lammle.com for more Cisco exam prep questions and updates to this book and other Cisco books I have written. The questions found at www.lammle.com will be updated at least monthly, if not weekly or even daily! Before you take your test, be sure and visit my website for questions, videos, audios, and other useful information.

4. Make sure you download any new PDF files found at www.lammle.com or www.sybex.com/go/IOS so you have the latest technical information covered by the latest CCNA objectives.

To learn every bit of the material covered in this book, you’ll have to apply yourself regularly and with discipline. Try to set aside the same time period every day to study, and select a comfortable and quiet place to do so. If you work hard, you will be surprised at how quickly you learn this material.

What Does This Book Cover?

This book covers everything you need to know in order to understand the CCNA exam objective commands. However, taking the time to study and practice with routers or a router simulator is the real key to success.

You will learn the following information in this book:

Chapter 1 introduces you to the Cisco Internetwork Operating System (IOS) and command-line interface (CLI). In this chapter you will learn how to turn on a router and configure the basics of the IOS, including setting passwords, banners, and more. IP configuration using the Secure Device Manager (SDM) will be discussed in Chapter 12.

Chapter 2 provides you with the management skills needed to run a Cisco IOS network. Backing up and restoring the IOS, as well as router configuration, are covered, as are the troubleshooting command tools necessary to keep a network up and running. Chapter 12 will provide you the SDM configuration covered in this chapter.

Chapter 3 teaches you about IP routing. This is an important chapter, because you will learn how to build a network, add IP addresses, and route data between routers. You will also learn about static, default, and dynamic routing using RIP and RIPv2 (with a small touch of IGRP).

Chapter 4 dives into more complex dynamic routing with Enhanced IGRP and OSPF routing.

Chapter 5 gives you a background on layer-2 switching and how switches perform address learning and make forwarding and filtering decisions. Network loops and how to avoid them with the Spanning Tree Protocol (STP) will be discussed, as well as the 802.1w STP version.

Chapter 6 covers virtual LANs and how you can use them in your internetwork. This chapter also covers the nitty-gritty of VLANs and the different concepts and protocols used with VLANs, as well as troubleshooting.

Chapter 7 covers security and access lists, which are created on routers to filter the network. IP standard, extended, and named access lists are covered in detail.

Chapter 8 covers Network Address Translation (NAT). New information and all the configuration commands, troubleshooting, and verification commands needed to understand the NAT CCNA objectives are covered in this chapter.

Chapter 9 covers wireless technologies. This is an introductory chapter regarding wireless technologies as Cisco views wireless. Make sure you understand your basic wireless technologies such as access points and clients as well as the difference between 802.11a, b, and g. This chapter is more technology based than configuration based to cover the current CCNA objectives.

Chapter 10 covers IPv6. This is a very fun chapter and has some great information. IPv6 is not the big, bad scary monster that most people think it is. IPv6 is an objective on this new exam, so study this chapter carefully. This chapter is more technology based then configuration based to cover the current CCNA objectives. Keep an eye out at www.lammle.com for up-to-the-minute updates.

Chapter 11 concentrates on Cisco wide area network (WAN) protocols. This chapter covers HDLC, PPP, and Frame Relay in depth. You must be proficient in all these protocols to be successful on the CCNA exam.

Chapter 12 covers SDM for basic router configures that we covered in Chapters 1, 2, 3, and 4.

NOTE

For up-to-the minute updates covering additions or modifications to the CCNA certification exams, as well as additional study tools and review questions, be sure to visit the Todd Lammle forum and website at www.lammle.com or www.sybex.com/go/ccnafastpass.

Cisco Certified Network Associate (CCNA)

The CCNA certification was the first in the new line of Cisco certifications and was the precursor to all current Cisco certifications. Now you can become a Cisco Certified Network Associate for the meager cost of this book and either one test at $150 or two tests at $125 each—although the CCNA exams are extremely hard and cover a lot of material, so you have to really know your stuff! Taking a Cisco class or spending months with hands-on experience is not out of the norm.

Once you have your CCNA, you don’t have to stop there—you can choose to continue with your studies and achieve a higher certification, called the Cisco Certified Network Professional (CCNP). Someone with a CCNP has all the skills and knowledge he or she needs to attempt the routing and switching CCIE lab. Just becoming a CCNA can land you that job you’ve dreamed about.

Why Become a CCNA?

Cisco, not unlike Microsoft and Novell (Linux), has created the certification process to give administrators a set of skills and to equip prospective employers with a way to measure skills or match certain criteria. Becoming a CCNA can be the initial step of a successful journey toward a new, highly rewarding, sustainable career.

The CCNA program was created to provide a solid introduction not only to the Cisco Internetwork Operating System (IOS) and Cisco hardware but also to internetworking in general, making it helpful to you in areas that are not exclusively Cisco’s. At this point in the certification process, it’s not unrealistic that network managers—even those without Cisco equipment—require Cisco certifications for their job applicants.

If you make it through the CCNA and are still interested in Cisco and internetworking, you’re headed down a path to certain success.

What Skills Do You Need to Become a CCNA?

To meet the CCNA certification skill level, you must be able to understand or do the following:

A CCNA certified professional can install, configure, and operate LAN, WAN, and wireless access services securely, as well as troubleshoot and configure small to medium networks (500 nodes or fewer) for performance.

This knowledge includes, but is not limited to, use of these protocols: IP, IPv6, EIGRP, RIP, RIPv2, OSPF, serial connections, Frame Relay, cable, DSL, PPPoE, LAN switching, VLANs, Ethernet, security, and access lists.

How Do You Become a CCNA?

The way to become a CCNA is to pass one little test (CCNA Composite exam 640-802). Then—poof!—you’re a CCNA. (Don’t you wish it were that easy?) True, it can be just one test, but you still have to possess enough knowledge to understand what the test writers are saying.

However, Cisco has a two-step process that you can take in order to become a CCNA that may or may not be easier than taking one longer exam (this book is based on the one-step 640-802 method; however, this book has all the information you need to pass all three exams.

The two-step method involves passing the following:

Exam 640-822: Interconnecting Cisco Networking Devices 1(ICND1)

Exam 640-816: Introduction to Cisco Networking Devices 2 (ICND2)

I can’t stress this enough: It’s critical that you have some hands-on experience with Cisco routers. If you can get ahold of some 1841 or 2800 series routers, you’re set. But if you can’t, I’ve worked hard to provide hundreds of configuration examples throughout this book to help network administrators (or people who want to become network administrators) learn what they need to know to pass the CCNA exam.

Since the new 640-802 exam is so hard, Cisco wants to reward you for taking the two-test approach. Or so it seems anyway. If you take the ICND1 exam, you actually receive a certification called the Cisco Certified Entry Networking Technician (CCENT). This is one step toward your CCNA. To achieve your CCNA, you must still pass your ICND2 exam.

Again, this book is written to help you study for all three exams.

NOTE

For Cisco-authorized hands-on training with CCSI Todd Lammle, please see www.globalnettraining.com. Each student will get hands-on experience by configuring at least three routers and two switches—no sharing of equipment!

Where Do You Take the Exams?

You may take any of the CCNA exams at any of the Pearson VUE authorized centers (www.vue.com) or call (877) 404-EXAM (3926).

To register for a Cisco Certified Network Associate exam, follow these steps:

1. Determine the number of the exam you want to take.

2. Register with the nearest Pearson VUE testing center. At this point, you will be asked to pay in advance for the exam. At the time of this writing, the exam for the 640-802 is $150 and must be taken within one year of payment. You can schedule exams up to six weeks in advance or as late as the same day you want to take it—but if you fail a Cisco exam, you must wait five days before you will be allowed to retake the exam. If something comes up and you need to cancel or reschedule your exam appointment, contact Pearson VUE at least 24 hours in advance.

3. When you schedule the exam, you’ll get instructions regarding all appointment and cancellation procedures, the ID requirements, and information about the testing-center location.

Tips for Taking Your CCNA Exams

The CCNA Composite exam test contains about 55 questions and must be completed in 75 to 90 minutes or less. This information can change per exam. You must get a score of about 80 to 85 percent to pass this exam, but again, each exam can be different.

Many questions on the exam have answer choices that at first glance look identical—especially the syntax questions! Remember to read through the choices carefully because close doesn’t cut it. If you get commands in the wrong order or forget one measly character, you’ll get the question wrong. So, to practice, do the hands-on exercises at the end of this book’s chapters over and over again until they feel natural to you.

Also, never forget that the right answer is the Cisco answer. In many cases, more than one appropriate answer is presented, but the correct answer is the one that Cisco recommends. On the exam, you’re always instructed to pick one, two, or three, never “choose all that apply.” The latest CCNA exams may include the following test formats:

Multiple-choice single answer

Multiple-choice multiple answer

Drag-and-drop

Fill-in-the-blank

Router simulations

In addition to multiple choice and fill-in response questions, Cisco Career Certifications exams may include performance simulation exam items. They do allow partial command responses. For example, show config, sho config, or sh conf would be acceptable. Router#show ip protocol or router#show ip prot would be acceptable.

Here are some general tips for exam success:

Arrive early at the exam center so you can relax and review your study materials.

Read the questions carefully. Don’t jump to conclusions. Make sure you’re clear about exactly what each question asks.

When answering multiple-choice questions that you’re not sure about, use the process of elimination to get rid of the obviously incorrect answers first. Doing this greatly improves your odds if you need to make an educated guess.

You can no longer move forward and backward through the Cisco exams, so double-check your answer before clicking Next since you can’t change your mind.

After you complete an exam, you’ll get immediate, online notification of your pass or fail status, a printed Examination Score Report that indicates your pass or fail status, and your exam results by section. (The test administrator will give you the printed score report.) Test scores are automatically forwarded to Cisco within five working days after you take the test, so you don’t need to send your score to them. If you pass the exam, you’ll receive confirmation from Cisco, typically within two to four weeks, sometimes longer.

NOTE

This book covers everything CCNA related. For up-to-date information on Todd Lammle Cisco Authorized CCNA CCNP, CCSP, CCVP, and CCIE boot camps, please see www.lammle.com or www.globalnettraining.com.

How to Contact the Author

You can reach Todd Lammle through GlobalNet Training Solutions, Inc., (www.globalnettraining.com), his training and systems Integration Company in Dallas, Texas—or through his forum at www.lammle.com.

Chapter 1

Basic IOS Commands

This book starts by introducing you to the Cisco Internetwork Operating System (IOS). The IOS is what runs Cisco routers as well as some Cisco switches, and it’s what allows you to configure the devices. You use the command-line interface (CLI) to configure a router, and that is what I’ll show you in this chapter.

The Cisco router IOS software is responsible for the following important tasks:

Carrying network protocols and functions

Connecting high-speed traffic between devices

Adding security to control access and stop unauthorized network use

Providing scalability for ease of network growth and redundancy

Supplying network reliability for connecting to network resources

You can access the Cisco IOS through the console port of a router, from a modem into the auxiliary (or aux) port, or even through Telnet and Secure Shell (SSH). Access to the IOS command line is called an exec session.

Once you have attached your console cable (this is a rolled cable, sometimes referred to as a rollover cable) to the router and have started your terminal software, you will be ready to power on the router. Assuming that this is a new router, it will have no configuration and thus will need to have, well, everything set up. In this chapter, first I’ll cover the power-on process of the router, and then I’ll introduce the setup script.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!