Tải bản đầy đủ (.pdf) (665 trang)

Cisco Router Configuration Handbook docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (5.01 MB, 665 trang )

ptg
www.it-ebooks.info
ptg
Cisco Router
Configuration Handbook
Second Edition
Dave Hucaby, CCIE No. 4594
Steve McQuerry, CCIE No. 6108
Andrew Whitaker
Cisco Press
800 East 96th Street
Indianapolis, IN 46240
www.it-ebooks.info
ptg
ii Cisco Router Configuration Handbook
Cisco Router Configuration Handbook, Second Edition
Dave Hucaby, Steve McQuerry, Andrew Whitaker
Copyright © 2010 Cisco Systems, Inc.
Published by:
Cisco Press
800 East 96th Street
Indianapolis, IN 46240 USA
All rights reserved. No part of this book may be reproduced or transmitted in any form or by
any means, electronic or mechanical, including photocopying, recording, or by any informa-
tion storage and retrieval system, without written permission from the publisher, except for
the inclusion of brief quotations in a review.
Printed in the United States of America
First Printing June 2010
Library of Congress Cataloging-in-Publication data is on file.
ISBN-13: 978-1-58714-116-4
ISBN-10: 1-58714-116-7


Warning and Disclaimer
This book is designed to provide information about configuring Cisco routers. Every effort
has been made to make this book as complete and as accurate as possible, but no warranty or
fitness is implied.
The information is provided on an “as is” basis. The authors, Cisco Press, and Cisco Systems,
Inc. shall have neither liability nor responsibility to any person or entity with respect to any
loss or damages arising from the information contained in this book or from the use of the
discs or programs that may accompany it.
The opinions expressed in this book belong to the author and are not necessarily those of
Cisco Systems, Inc.
Trademark Acknowledgments
All terms mentioned in this book that are known to be trademarks or service marks have been
appropriately capitalized. Cisco Press or Cisco Systems, Inc., cannot attest to the accuracy of
this information. Use of a term in this book should not be regarded as affecting the validity of
any trademark or service mark.
www.it-ebooks.info
ptg
iii
Corporate and Government Sales
The publisher offers excellent discounts on this book when ordered in quantity for bulk pur-
chases or special sales, which may include electronic versions and/or custom covers and con-
tent particular to your business, training goals, marketing focus, and branding interests. For
more information, please contact: U.S. Corporate and Government Sales 1-800-382-3419

For sales outside the United States, please contact: International Sales

Feedback Information
At Cisco Press, our goal is to create in-depth technical books of the highest quality and value.
Each book is crafted with care and precision, undergoing rigorous development that involves
the unique expertise of members from the professional technical community.

Readers’ feedback is a natural continuation of this process. If you have any comments regard-
ing how we could improve the quality of this book, or otherwise alter it to better suit your
needs, you can contact us through e-mail at Please make sure to
include the book title and ISBN in your message.
We g r eatly a p p r e c i a t e y o ur a s s i s t a nce.
Cisco has more than 200 offices worldwide. Addresses, phone numbers, and fax numbers are listed on the Cisco Website at www.cisco.com/go/offices.
CCDE, CCENT, Cisco Eos, Cisco HealthPresence, the Cisco logo, Cisco Lumin, Cisco Nexus, Cisco StadiumVision, Cisco TelePresence, Cisco WebEx, DCE, and Welcome to the Human Network are trademarks; Changing the
Way We Work , Live, Play, and Learn and Cis co Sto re are ser vice marks; and A ccess Regist rar, A iron et, AsyncOS, Bringing th e Meeting To You, Cat alyst, CC DA, C CDP, CC IE, CCIP, CCNA , C CNP, CC SP, CCVP, Cis co, th e
Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Collaboration Without Limitation, EtherFast, EtherSwitch, Event Center, Fast Step,
Follow Me Browsing, FormShare, GigaDrive, HomeLink, Internet Quotient , IOS, iPhone, iQuick Study, IronPort, the IronPort logo, LightStream, Linksys, MediaTone, MeetingPlace, MeetingPlace Chime Sound, MGX, Networkers,
Networking Academy, Network Registrar, PCNow, PIX, PowerPanels, ProConnect, ScriptShare, SenderBase, SMARTnet, Spectrum Expert, StackWise, The Fastest Way to Increase Your Internet Quotient, TransPath, WebEx, and
the WebEx logo are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
All other trademarks mentioned in this document or website are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (0812R)
Americas Headquarters
Cisco Systems, Inc.
San Jose, CA
Asia Pacific Headquarters
Cisco Systems (USA) Pte. Ltd.
Singapore
Europe Headquarters
Cisco Systems International BV
Amsterdam, The Netherlands
Publisher: Paul Boger Manager, Global Certification: Erik Ullanderson
Associate Publisher: Dave Dusthimer Business Operation Manager, Cisco Press: Anand Sundaram
Executive Editor: Brett Bartow Senior Development Editor: Christopher Cleveland
Managing Editor: Sandra Schroeder Project Editor: Seth Kerney
Copy Editor: Apostrophe Editing Services Te c hn ic a l E d ito r s : Steve Kalman, Joe Harris
Editorial Assistant: Vane ssa Evan s Indexer: Wo r d W i s e Pu b l i s h i n g S e r v i c e s
Book Designer: Louisa Adair Proofreaders: Sheri Cain and Water Crest Publishing
Composition: Mark Shirar

www.it-ebooks.info
ptg
iv Cisco Router Configuration Handbook
Dedications
Dave Hucaby: This book is dedicated to my wife, Marci, and my daughters, Lauren and Kara.
I am blessed to have three wonderful girls in the house; their love, encouragement, and sup-
port carry me along. God is good!
Steve McQuerry: I dedicate this work to my beautiful wife and love of my life, Becky. Also,
to my wonderful children, Katie, Logan, and Cameron. You are all my inspiration. Your
patience, love, and support give me the courage and strength needed to spend the required
time and energy on a project like this. Even through the long hours, I want you to know I love
you all very much.
www.it-ebooks.info
ptg
v
About the Authors
David Hucaby, CCIE #4594, is a lead network engineer for the University of Kentucky,
where he designs, implements, and maintains campus networks using Cisco products. Prior to
his current position, he was a senior network consultant, providing design and implementation
consulting, focusing on Cisco-based VPN and IP telephony solutions. Hucaby has bachelor of
science and master of science degrees in electrical engineering from the University of
Kentucky. He is also the author of CCNP Switching Exam Certification Guide by Cisco
Press.
Stephen McQuerry, CCIE #6108, is an instructor and consultant with more than ten years of
networking industry experience. He is a certified Cisco Systems instructor (CCSI) and a
course director/developer, teaching routing and switching concepts for Global Knowledge.
McQuerry regularly teaches Cisco Enterprise courses. Additionally, he has developed and
taught custom Cisco switching courses. McQuerry holds a bachelor of science degree in engi-
neering physics from Eastern Kentucky University. He is also the author of Interconnecting
Cisco Network Devices by Cisco Press.

Andrew Whitaker has been teaching and developing Cisco courses for more than seven years
and holds the following certifications: CCNP, CCVP, CCSP, CCDP, CCNA:Security, MCT,
CEI, CISSP, LPT, CEH, ECSA, MCTS, MCSE, CNE, A+, Network+, Security+, Convergence+,
CTP, CICP, CHFI, EMCPA. He is the author of several books, including Penetration Testing
and Network Defense by Cisco Press.
About the Technical Reviewers
Steven Kalman is the principal officer at Esquire Micro Consultants, which offers lecturing,
writing, and consulting services. He has more than 30 years of experience in data processing,
with strengths in network design and implementation. Kalman is an instructor and author for
Learning Tree International. He has written and reviewed many networking-related titles. He
holds CCNA, CCDA, ECNE, CEN, and CNI certifications.
Joe Harris, CCIE No. 6200 (R/S, Security & SP), is a Triple CCIE working for Cisco as a systems
engineer within the Wireline and Emerging Providers organization, where he specializes in
security and MPLS-related technologies. With more than 16 years of extensive experience
focusing on advance technologies within the IT arena, Joe has been primarily focused on
supporting various enterprise-sized networks revolving around all aspects of Cisco technology.
He has also provided high-end consulting for both large and small corporations, as well as
local government and federal agencies. Joe holds a bachelor of science degree from Louisiana
Te ch Un i ver s i t y a n d re s ide s w it h h i s w i fe a nd t wo c h i ldre n i n F r i s c o, Tex as.
www.it-ebooks.info
ptg
vi Cisco Router Configuration Handbook
Acknowledgments
Dave Hucaby: I am very grateful for another opportunity to work on a Cisco Press project.
Getting to dabble in technical writing has been great fun, a highlight in my career, and a lot of
work, too! Naturally, these good folks at Cisco Press have gone the extra mile to make writing
enjoyable and achievable: Brett Bartow, who kindly accepted my idea for a book like this and
kindly prodded us along to meet deadlines we didn’t think we could, and Chris Cleveland,
who is a superb development editor. As a matter of fact, every Cisco Press person I have met
along the way has been so nice, encouraging, and excited about their work!

Thanks to our technical reviewers: Steve Kalman and Joe Harris. Working on a book of this
nature has been challenging. The sheer volume and scope of the Cisco IOS Software com-
mands and features are a little overwhelming. I truly appreciate reviewers who can help us see
a bigger picture of better organization and accuracy while we’re writing in the depths of con-
figuration commands. This book is also a testimony to the great number of things you can do
with a router, thanks to the Cisco IOS Software. I don’t know how many hundreds of com-
mands we have covered in this book, but we had to leave out many more lesser-used com-
mands just to keep a handle on the book’s size and scope. I’m amazed at the robustness of the
software and its dynamic nature.
I would like to express my thanks to my friend and coauthor Steve McQuerry. We’ve followed
each other around for many years, and it has been great to work on this project with him.
Hopefully, we Kentucky boys can work on more things like this.
Lastly, I would like to acknowledge the person who stole my laptop computer halfway
through the first edition of this book project. Whoever you are, you left me a victim of my
own lack of current backups. I made up a silly joke many years ago: “A backup is worth a mil-
lion bytes, especially if you have to type them all back in.” Indeed.
Steve McQuerry: About 20 years ago, the late Rodger Yockey gave me an opportunity as a
field engineer in the computer industry. Since then, several people have been there at key
moments to help my career go in certain directions. I owe a great debt to these people, as
they have helped me reach the level I am at today. It is not often that one has the opportunity
to thank those who have been instrumental in molding his career. In addition to Rodger, I
would like to take a moment to also thank Ted Banner for his guidance and mentoring. I would
also like to thank Chuck Terrien for giving me the opportunity to work as an instructor in the
Cisco product line. I would like to thank Brett Bartow for the opportunity to begin sharing
my experiences with the network community by writing for Cisco Press. Last but not least, I
have to thank my friend and coauthor, Dave Hucaby. This book was his concept, and I thank
him for the opportunity work with him once again. I hope we will always find a way to con-
tinue working together in the future.
Since I began working on book and course projects a couple of years ago, I have a newfound
respect for what it takes to edit, coordinate, publish, and basically keep authors on track.

Behind every Cisco Press book is an incredible staff, and I would be remiss if I did not
acknowledge their work. Chris Cleveland, again it has been great working with you. I hope
that we can work together again in the future.
www.it-ebooks.info
ptg
vii
Without the following individuals behind the book, it would be no more than a collection of
jumbled notes and napkin sketches of networking configurations:
The sharp eyes of all our technical editors on the first and this edition: Joe Harris, Steve
Kalman, Alexander Marhold, and Kevin Turek.
All my students and fellow instructors at Global Knowledge. Your challenges and questions
provide me with the drive to have a better understanding.
My wife and children for their never-ending patience and understanding during this and all of
my projects.
Most important, God, for giving me the skills, talents, and opportunity to work in such a chal-
lenging and exciting profession.
Andrew Whitaker: I would like to express my thanks to both Dave Hucaby and Steve
McQuerry for this opportunity. Brett Bartow and Chris Cleveland, it is great to work with
both of you again. Finally, to Steve Kalman and Joe Harris, I appreciate how diligently you
worked to ensure a quality book.
www.it-ebooks.info
ptg
viii Cisco Router Configuration Handbook
Contents at a Glance
Introduction xxi
Part I: Configuration Fundamentals
Chapter 1 Configuration Basics 1
Chapter 2 Interface Configuration 73
Chapter 3 Dial Solutions 121
Part II: Network Protocols

Chapter 4 IPv4 Addressing and Services 153
Chapter 5 IPv6 Addressing and Services 195
Chapter 6 IP Routing Protocols 227
Chapter 7 IP Multicast Routing 275
Chapter 8 IP Route Processing 293
Part III: Packet Processing
Chapter 9 Quality of Service 311
Chapter 10 Multiprotocol Label Switching 359
Part IV: Voice & Telephony
Chapter 11 Voice and Telephony 375
Part V: Security
Chapter 12 Router Security 423
Chapter 13 Virtual Private Networks 475
Chapter 14 Access Lists and Regular Expressions 519
Appendixes
Appendix A Cisco IOS Software Release and Filename Conventions 543
Appendix B Cabling Quick Reference 551
Appendix C SNMP MIB Structure 557
Appendix D Password Recovery 561
Appendix E Configuration Register Settings 569
Appendix F Well-Known IP Protocol Numbers 577
Appendix G Well-Known IP Port Numbers 587
Appendix H ICMP Type and Code Numbers 601
Appendix I Well-Known IP Multicast Addresses 605
Appendix J To o l C o m m a n d L a n g u a g e ( T C L ) R e f e r e n c e 619
Appendix K Ethernet Type Codes 623
Index 631
www.it-ebooks.info
ptg
ix

Contents
Introduction xxi
Part I: Configuration Fundamentals
Chapter 1 Configuration Basics 1
1-1: User Interfaces 1
Configuration 2
Navigating File Systems 19
1-2: File Management 19
Deleting Files from Flash 22
Moving System Files 23
Configuration Rollback 25
Related File Management Commands 26
Alias Commands 27
1-3: Cisco Discovery Protocol (CDP) 28
Configuration 28
Example 29
1-4: System Time 30
Configuration 30
Example 33
1-5: Logging 34
Configuration 34
Ver i f y i n g L o g g i n g 37
Example 37
1-6: System Monitoring 38
Configuration 39
Example 47
1-7: Service Assurance Agent (SAA) 47
Configuration 48
Example 56
1-8: Buffer Management 56

Configuration 57
Example 61
1-9: Some Troubleshooting Tools 61
IP Connectivity Tools: Extended ping 62
IP Connectivity Tools: ping 62
IP Connectivity Tools: traceroute 63
Debugging Output from the Router 65
IP Connectivity Tools: Telnet 65
www.it-ebooks.info
ptg
x Cisco Router Configuration Handbook
Poor Man’s Sniffer 67
Troubleshooting Router Crashes 69
Monitoring Router Activity 70
Getting Assistance from Cisco 71
Information for the Cisco Technical Assistance Center (TAC) 71
Chapter 2 Interface Configuration 73
2-1: Ethernet Interfaces 73
Configuration 74
Example 75
2-2: FDDI Interfaces 76
Configuration 76
Example 76
2-3: Loopback and Null Interfaces 77
Configuration 77
Example 77
2-4: VLAN Interfaces 78
Configuration 78
Example 79
2-5: Tunnel Interfaces 79

Configuration 80
Example 81
2-6: Synchronous Serial Interfaces 82
Configuration 82
Configuring Channelized T1/E1 Serial Interfaces 84
Configuring Synchronous Serial Interfaces 85
Example 91
2-7: Packet-Over-SONET Interfaces 91
Configuration 92
Configuring APS on POS Interfaces 93
Example 94
2-8: Frame Relay Interfaces 95
Configuration 96
Example 104
2-9: Frame Relay Switching 105
Configuration 105
Example 109
2-10: ATM Interfaces 110
Configuration 111
Example 117
www.it-ebooks.info
ptg
xi
Further Reading 118
Ethernet 118
Fast Ethernet 118
Gigabit Ethernet 118
Frame Relay 119
ATM 119
Chapter 3 Dial Solutions 121

3-1: Modems 122
Configuration 122
3-2: ISDN 128
PRI Configuration 129
PRI Example 131
BRI Configuration 131
BRI Example 133
3-3: Dial-on-Demand Routing (DDR) 133
Configuration 134
Example 139
3-4: Dial Backup 141
Dial Backup Configuration 141
Dial Backup Example 142
Dialer Watch Configuration 143
Dialer Watch Example 143
3-5: Routing Over Dialup Networks 144
Snapshot Routing Configuration 145
Snapshot Routing Example 146
ODR Configuration 146
3-6: Point-to-Point Protocol (PPP) 148
Configuration 148
Example 152
Further Reading 152
Part II: Network Protocols
Chapter 4 IPv4 Addressing and Services 153
4-1: IP Addressing and Resolution 154
Configuration 154
Example 157
4-2: IP Broadcast Handling 158
Configuration 158

Example 160
www.it-ebooks.info
ptg
xii Cisco Router Configuration Handbook
4-3: Hot Standby Router Protocol (HSRP) 160
Configuration 161
Example 164
4-4: Virtual Router Redundancy Protocol 165
Configuration 166
Example 166
4-5: Dynamic Host Configuration Protocol (DHCP) 167
Configuration 167
Example 171
4-6: Mobile IP 172
Configuration 173
Example 176
4-7: Network Address Translation (NAT) 178
Configuration 179
Examples 183
4-8: Server Load Balancing (SLB) 185
Configuration 186
Example 190
Chapter 5 IPv6 Addressing and Services 195
5-1: IPv6 Addressing 196
Configuration 198
Example 198
5-2: Dynamic Host Configuration Protocol (DHCP) Version 6 199
Example 201
5-3: Gateway Load Balancing Protocol Version 6 (GLBPv6) 202
Configuration 203

Example 206
5-4: Hot Standby Router Protocol for IPv6 208
Configuration 208
Example 210
5-5: Mobile IPv6 211
Configuration 212
Example 214
5-6: Network Address Translation-Protocol Translation 215
Configuration 216
Example 220
www.it-ebooks.info
ptg
xiii
5-7: Tunneling 221
Configuration 221
Example 223
Chapter 6 IP Routing Protocols 227
6-1: Routing Information Protocol (RIP) 227
Configuration 228
RIP-2-Specific Commands 230
Example 232
6-2: Routing Information Protocol (RIP) for IPv6 233
Example 233
Configuration 233
6-3: Enhanced Interior Gateway Routing Protocol (EIGRP) 234
Configuration 235
Example 238
6-4: Enhanced Interior Gateway Routing Protocol (EIGRP) for IPv6 239
Configuration 239
Example 242

6-5: Open Shortest Path First (OSPF) 242
Configuration 243
Example 249
6-6: Open Shortest Path First (OSPF) Version 3 (IPv6) 250
Configuration 251
Example 252
6-7: Integrated IS-IS 252
Configuration 253
Example 255
6-8: Integrated IS-IS for IPv6 257
Configuration 257
6-9: Border Gateway Protocol (BGP) 257
Configuration 259
Example 268
6-10: Multiprotocol Border Gateway Protocol (BGP) for IPv6 270
Configuration 270
Example 271
Chapter 7 IP Multicast Routing 275
7-1: Protocol Independent Multicast (PIM) 275
Configuration 277
Example 279
www.it-ebooks.info
ptg
xiv Cisco Router Configuration Handbook
7-2: Internet Group Management Protocol (IGMP) 280
Configuration 281
Example 283
7-3: Multiprotocol BGP (MBGP) 284
Configuration 285
Example 286

7-4: Multicast Source Discovery Protocol (MSDP) 287
Configuration 288
Example 289
7-5: IPv6 Multicast 290
Configuration 290
Example 291
Chapter 8 IP Route Processing 293
8-1: Manually Configuring Routes 293
Configuration 294
Example 295
8-2: Policy Routing 296
Configuration 296
Example 298
8-3: Redistributing Routing Information 298
Configuration 298
Example 304
8-4: Filtering Routing Information 305
Configuration 306
Example 308
8-5: Load Balancing 308
Configuration 308
Example 309
Part III: Packet Processing
Chapter 9 Quality of Service 311
9-1: Modular QoS Command-Line Interface (MQC) 314
Configuration 315
MQC Example 321
9-2: Network-Based Application Recognition (NBAR) 322
Configuration 323
NBAR Example 327

9-3: Policy-Based Routing (PBR) 327
Configuration 328
PBR Example 329
www.it-ebooks.info
ptg
xv
9-4: Quality of Service for VPNs 329
Configuration 329
QoS for VPNs Example 330
9-5: QoS Policy Propagation via BGP 330
Configuration 330
QoS Policy Propagation via BGP Example 331
9-6: Priority Queuing (PQ) 332
Configuration 332
Priority Queuing Example 333
9-7: Custom Queuing (CQ) 333
Configuration 334
Custom Queuing Example 336
9-8: Weighted Fair Queuing (WFQ) 337
Configuration 337
We i g h t ed F a i r Q u e u i n g E x a m p l e 339
9-9: Weighted Random Early Detection (WRED) 340
Configuration 340
We i g h t ed R a nd o m Early D e t e c t i o n E x a m p l e 341
9-10: Committed Access Rate (CAR) 342
Configuration 342
Committed Access Rate Example 343
9-11: Generic Traffic Shaping (GTS) 344
Configuration 344
Generic Traffic Shaping Example 345

9-12: Frame Relay Traffic Shaping (FRTS) 345
Configuration 346
Frame Relay Traffic Shaping Example 347
9-13: Use RSVP for QoS Signaling 348
Configuration 348
Using RSVP for QoS Signaling Example 351
9-14: Link Efficiency Mechanisms 351
Configuration 352
Link Efficiency Mechanism Example 353
9-15: AutoQoS for the Enterprise 353
Configuration 354
Example 356
www.it-ebooks.info
ptg
xvi Cisco Router Configuration Handbook
Chapter 10 Multiprotocol Label Switching 359
10-1: Configuring Basic MPLS 359
Configuration 360
Example 362
10-2: MPLS Traffic Engineering 364
Configuration 365
Example 368
10-3: MPLS Virtual Private Networks (VPN) 369
Configuration 369
Example 371
Part IV: Voice & Telephony
Chapter 11 Voice and Telephony 375
11-1: Quality of Service for Voice 376
11-2: Voice Ports 381
Configuration 382

11-3: Dialing 395
Configuration 396
11-4: H.323 Gateways 405
Configuration 406
11-5: H.323 Gatekeepers 408
Configuration 408
Example 414
11-6: Interactive Voice Response (IVR) 415
Configuration 415
11-7: Survivable Remote Site (SRS) Telephony 417
Configuration 417
Example 420
Part V: Security
Chapter 12 Router Security 423
12-1: Suggested Ways to Secure a Router 424
User Authentication on the Router 424
Control Access to the Router Lines 424
Configure Login Timing Options 425
Use Warning Banners to Inform Users 426
Router Management 426
Implement Logging on the Router 427
Control Spoofed Information 427
Control Unnecessary Router Services 428
www.it-ebooks.info
ptg
xvii
12-2: Authentication, Authorization, and Accounting (AAA) 429
Configuration 430
Example 437
12-3: Dynamically Authenticate and Authorize Users with Authentication

Proxy 438
Configuration 439
Example 442
12-4: Controlling Access with Lock and Key Security 442
Configuration 442
Example 445
12-5: Filtering IP Sessions with Reflexive Access Lists 446
Configuration 446
Example 448
12-6: Prevent DoS Attacks with TCP Intercept 448
Configuration 449
Example 451
12-7: Intelligent Filtering with Context-Based Access Control (CBAC) 451
Configuration 451
Example 456
12-8: Detect Attacks and Threats with the IOS Intrusion Prevention System 458
Configuration 458
Example 471
12-9: Control Plane Security 471
Configuration 472
Example 472
12-10: AutoSecure 473
Configuration 473
Example 474
Chapter 13 Virtual Private Networks 475
13-1: Using Internet Key Exchange (IKE) for VPNs 476
Configuration 476
Example 482
13-2: IPSec VPN Tunnels 483
Configuration 484

Example 490
13-3: High Availability Features 493
Configuration 494
Example 497
www.it-ebooks.info
ptg
xviii Cisco Router Configuration Handbook
13-4: Dynamic Multipoint VPN (DMVPN) 504
Configuration 505
Example 511
13-5: Secure Socket Layer VPNs 514
Configuration 515
Example 517
Further Reading 517
Chapter 14 Access Lists and Regular Expressions 519
14-1: IP Access Lists 521
Configuration 521
Examples 530
14-2: MAC Address and Protocol Type Code Access Lists 532
Configuration 532
Examples 533
14-3: IPv6 Access Lists 533
Configuration 534
Examples 538
14-4: Regular Expressions 539
Configuration 539
Examples 540
Appendixes
Appendix A Cisco IOS Software Release and Filename Conventions 543
Appendix B Cabling Quick Reference 551

Appendix C SNMP MIB Structure 557
Appendix D Password Recovery 561
Appendix E Configuration Register Settings 569
Appendix F Well-Known IP Protocol Numbers 577
Appendix G Well-Known IP Port Numbers 587
Appendix H ICMP Type and Code Numbers 601
Appendix I Well-known IP Multicast Addresses 605
Appendix J Tool C ommand Lang ua ge ( TCL ) Refe renc e 619
Appendix K Ethernet Type Codes 623
Index 631
www.it-ebooks.info
ptg
xix
Icons Used in This Book
Throughout this book, you see the following icons used for networking devices:
The following icons are used for peripherals and other devices:
DSU/CSU
Router Bridge Hub DSU/CSU
Catalyst
Switch
Multilayer
Switch
ATM
Switch
ISDN/Frame Relay
Switch
Communication
Server
Gateway
Access

Server
PC PC with
Software
Sun
Workstation
Macintosh
Te r mina l File
Server
Web
Server
Cisco Works
Workstation
Printer Laptop IBM
Mainframe
Front End
Processor
Cluster
Controller
www.it-ebooks.info
ptg
xx Cisco Router Configuration Handbook
Command Syntax Conventions
The conventions used to present command syntax in this book are the same conventions
used in the IOS Command Reference. The Command Reference describes these conventions
as follows:
■ Boldface indicates commands and keywords that are entered literally as shown. In
actual configuration examples and output (not general command syntax), boldface
indicates commands that are manually input by the user (such as a show command).
■ Italic indicates arguments for which you supply actual values.
■ Ver t i c a l b a r s ( |) s e par ate a l ter n a t i ve, m u t u a lly ex c lu s i ve e le men t s .

■ Square brackets ([ ]) indicate an optional element.
■ Braces ({ }) indicate a required choice.
■ Braces within brackets () indicate a required choice within an optional element.
www.it-ebooks.info
ptg
xxi
Introduction
There are many sources of information and documentation for configuring Cisco networking
devices, but few provide a quick and portable solution for networking professionals. This
book is designed to provide a quick-and-easy reference guide for a wide range of commonly
used features that can be configured on Cisco routers. In essence, the subject matter from an
entire bookshelf of Cisco IOS Software documentation, along with other networking refer-
ence material, has been “squashed” into one handy volume that you can take with you.
This idea for this book began with my study habits for the CCIE written and lab exam. Over
time, I found that I had put together a whole notebook of handwritten notes about how to
configure a variety of Cisco router features. I also found that I began carrying this notebook
with me into the field as a network consultant. When you’re on the job and someone requires
you to configure a feature you’re not too familiar with, it’s nice to have your handy reference
notebook in your bag! Hopefully, this book will be that handy reference for you.
Features and Organization
This book is meant to be used as a tool in your day-to-day tasks as a network administrator or
engineer. As such, we have avoided presenting a large amount of instructional informa-tion or
theory on the operation of protocols or commands. That is better handled in other textbooks
dedicated to a more limited subject matter.
Instead, this book is divided into parts that present quick facts, configuration steps, and
explanations of configuration options for each feature in the Cisco IOS Software.
How to Use This Book
All the information in this book has been designed to follow a quick-reference format. If you
know what feature or technology you want to use, you can turn right to the section that deals
with it. Sections are numbered with a quick-reference index, showing both chapter and section

number. For example, 13-3 is Chapter 13, Section 3. You'll also find shaded index tabs on each
page, listing the section number, the chapter subject, and the topic dealt with in that section.
Facts About a Feature
Each section in a chapter includes a bulleted list of quick facts about the feature, technol-ogy,
or protocol. Refer to these lists to quickly learn or review how the feature works. Immediately
following, we have placed a note that details what protocol or port number the feature uses. If
you are configuring filters or firewalls and you need to know how to al-low or block traffic
from the feature, look for these notes.
www.it-ebooks.info
ptg
xxii Cisco Router Configuration Handbook
Configuration Steps
Each feature covered in a section includes the required and optional commands used for com-
mon configuration. The difference is that the configuration steps are presented in an outline
format. If you follow the outline, you can configure a complex feature or technol-ogy. If you
find that you don't need a certain feature option, skip over that level in the out-line.
Sample Configurations
Each section includes an example of how to implement the commands and their options. We
have tried to present the examples with the commands listed in the order you would actually
enter them to follow the outline. Many times, it is more difficult to study and un-derstand a
configuration example from an actual router, because the commands are dis-played in a prede-
fined order, not in the order you entered them. Where possible, the ex-amples have also been
trimmed to show only the commands presented in the section.
Further Reading
Each chapter ends with a recommended reading list to help you find more in-depth sources of
information for the topics discussed.
www.it-ebooks.info
ptg
Chapter 1
Configuration Basics

This chapter presents background and configuration information for the following config-
uration basics:
■ 1-1: User Interfaces
■ 1-2: File Management
■ 1-3: Cisco Discovery Protocol (CDP)
■ 1-4: System Time
■ 1-5: Logging
■ 1-6: System Monitoring
■ 1-7: Service Assurance Agent (SAA)
■ 1-8: Buffer Management
■ 1-9: Some Troubleshooting Tools
1-1: User Inter faces
A router supports user access by command-line interface (CLI), a web browser, or by GUI
device management tools. A router also provides a user interface to the ROM monitor
bootstrap code.
Users can execute IOS commands from a user level or from a privileged level. User level
offers basic system information and remote connectivity commands. Privileged level
offers complete access to all router information, configuration editing, and debugging
commands.
A router offers many levels of configuration modes, allowing the configuration to be
changed for a variety of router resources.
A context-sensitive help system offers command syntax and command choices at any user
prompt.
www.it-ebooks.info
ptg
2 Cisco Router Configuration Handbook
A history of IOS commands executed can be kept. Command lines can also be edited and
reused.
The output from a command can be searched and filtered so that useful information can
be found quickly.

Parameters for the CLI connection to the router can be set to preferred values.
Asynchronous ports on a router can be connected to other serial devices. You can open
reverse-Telnet connections to the external devices for remote access.
Banners can be defined and displayed at various points in the login process.
Menus can be defined to give terminal session users easy access to other functions or
remote systems.
Role Based Access Control (RBAC) enables you to define the rules for an assigned role that
restricts the authorization that the user has to access for management and configuration.
Access to the router can be configured for Secure Shell (SSH) version 1 or version 2.
Configuration
1. User interface modes.
a. User EXEC mode: Users can connect to a router via the console port, auxiliary
port, Telnet session, SSH session, or the Security Device Manager (SDM). By
default, the initial access to a router places the user in user EXEC mode and offers
a limited set of commands. When connecting to the router, a user-level password
might or might not be required.
b. Privileged EXEC mode:
(exec) enable
password: [password]
As soon as a user gains access in user EXEC mode, the enable command can be
used to enter privileged EXEC or enable mode. Full access to all commands is
available. To leave privileged EXEC mode, use the disable or exit commands.
c. Configuration mode:
(exec) configure terminal
From privileged EXEC mode, configuration mode can be entered. Router com-
mands can be given to configure any router feature that is available in the IOS soft-
ware image. When you are in configuration mode, you are managing the router’s
active memory. Anytime you enter a valid command in any configuration mode
and press Enter, the memory is immediately changed. Configuration mode is
organized in a hierarchical fashion. Global configuration mode allows commands

that affect the router as a whole. Interface configuration mode allows commands
that configure router interfaces. There are many other configuration modes that
you can move into and out of, depending on what is being configured. To move
from a lower-level configuration mode to a higher level, type exit. To leave global
www.it-ebooks.info

×