Preface

This is a book for everybody who has to deal with Cisco’s routers.

As you well know, Cisco Systems has created an extremely diverse line of routers and other network products. One unifying thread runs through the product line: virtually all of Cisco’s products run the Internetwork Operating System (IOS). This is both a great advantage and a great disadvantage. On the one hand, when you’re familiar with one Cisco router, you’re reasonably familiar with them all. Someone using a small DSL router in a home office could look at a configuration file for a high-end router at an ISP and not be lost. He might not understand how to configure the more esoteric routing protocols or high-speed network interfaces, but he’d be looking at a language that was recognizably the same.

On the other hand, this uniformity means that just about everything has been crammed into IOS at one time or another. IOS is massive—there’s no other way to say it. And it has evolved over many years. The command-line interface isn’t graceful, and is often non-uniform: many commands don’t do what you think they should, and the same command verbs can mean completely different things in different contexts. This inconsistency is probably a natural result of evolution at an extremely large company with an extremely large number of developers, but it doesn’t make life any easier.

So, where do you find out what commands you need to know? There’s the almost mythical “green wall” of Cisco documentation, but it’s difficult to find what you need in tens of thousands of pages. Of course, even getting to Cisco’s online documentation may be impossible if your router doesn’t work. And the volume of documentation is imposing. A search for ip cef traffic-statistics—not one of the more frequently used commands—yields 163 hits. How do you get to the right one? Beats me. That’s why I wrote this book.

This book is primarily a quick reference to the commands that are most frequently needed to configure Cisco routers for standard IP routing tasks. There are plenty of weasel words in there, and they’re needed. This is far from a complete quick ref to all of IOS—such a quick ref would probably be well over 2000 pages long, clearly too long to be useful. Therefore, I haven’t attempted to cover protocols other than IP (although there is support for everything from AppleTalk to SNA), nor any of the more exotic creatures in the IP space. And even in areas I have covered thoroughly, I was still forced to exclude commands that are useful only in limited cases.

Above all, this is a network administrator’s book: it represents practical experience with IP routing on Cisco routers and covers the commands that you’re likely to need. No doubt some readers will disagree with the choices I’ve made—such disagreement is inevitable. But though you occasionally won’t find information about a command you need to use, you will far more often find, at your fingertips, precisely what you need to know.

More than anything else, the goal of this book is to give you information quickly. It aspires not to give you in-depth knowledge of how IP routing works, but to help you remember what arguments you need to give to the snmp-server enable traps command, or to help you scan through the many commands that start with ip to jog your memory about which one configures the forwarding of broadcast packets to selected subnets. If I succeed in doing that, I’m happy.

Organization

This book consists primarily of two parts. The first could be considered a tutorial, but that doesn’t quite capture its purpose. I try to teach the basic principles behind configuring the router, but there are many other sources for that information (for example, Scott Ballew’s Managing IP Networks with Cisco Routers, or Kevin Dooley and Ian J. Brown’s Cisco Cookbook, both from O’Reilly). This part of the book quickly breezes through as many examples of different configuration tasks as possible. I provide explanations, but the focus is on the examples. By studying them, you’ll see how to accomplish many of the tasks involved in setting up a router.

The bulk of the book is the quick reference. There’s nothing fancy here—it’s organized alphabetically and shows the commands that I felt were most useful to someone using a Cisco router in an IP environment.

What’s New in This Edition

In this edition, we updated the book with features that were integrated into Cisco’s latest major IOS release, 12.3, along with highlights from minor release 12.4. Some of the new features you’ll find are AutoSecure, AutoQoS, and the new IOS naming model. We’ve also expanded other sections to include IS-IS routing, MPLS, and some new hardware types. Previously neglected topics such as quality-of-service and multicast routing have been expanded (a new chapter, Chapter 11, covers quality-of-service; multicasting is discussed in Chapter 13). You’ll also find a new appendix that covers IP subnetting, the OSI network model, and other useful nuggets.

We’ve broken from our previous mantra of “routing-only topics” to include VLANs and switching, adding a new chapter on these topics (Chapter 14). Since the book was first written, routing and switching have come quite a long way; switches are a pretty fundamental part of Cisco’s product line. And now, you’ll find IOS on most of their newer switches instead of CatOS.

This book has grown substantially since its first edition. And I hope you’ll find that its usefulness has grown as well.

Conventions

The following conventions are used in this book:

Italic

Used for filenames, URLs, and occasionally for emphasis or clarity

Constant width

Used for commands, command keywords, and anything else that has to be typed literally

Constant width italic

Used for parameters or arguments that must be substituted in commands

Constant width bold

Used for user input

[Keywords and other stuff]

Used for optional keywords and arguments

{choice-1 | choice-2}

Used to signify either choice-1 or choice-2

Tip

This icon signifies a tip relating to the nearby text.

Warning

This icon indicates a warning relating to the nearby text.

One of the confusing things about working with a Cisco router is the notion of a command context. Most commands are legal only in limited situations; all of the quick-reference entries include a command context that indicates how the command is to be used. A context of “command” means that the command is for interactive use and is not entered into the router’s configuration; you do not need to enter the configuration mode (configure terminal) to give the command, and you can’t include it in a configuration file that you upload. A context of “global” indicates that a command doesn’t require any specific context; you can give it as soon as you’ve entered the configuration mode. A context of “interface” indicates that you must be in the interface configuration submode to give the command; “line” means that you must be in the line configuration submode, and so on.

IOS has no concept of a continuation character for breaking up command lines that are too long. That may be okay for a router, but it’s a problem for a book; still, I’ve decided not to invent a continuation character for the purposes of this book. I’ve split long commands across lines as it seemed most convenient and clear; just remember that you have to type it all on one line.

Safari Enabled

image with no caption

When you see a Safari® Enabled icon on the cover of your favorite technology book, that means the book is available online through the O’Reilly Network Safari Bookshelf.

Safari offers a solution that’s better than e-books. It’s a virtual library that lets you easily search thousands of top tech books, cut and paste code samples, download chapters, and find quick answers when you need the most accurate, current information. Try it free at http://safari.oreilly.com.

We’d Like to Hear from You

Please address comments and questions concerning this book to the publisher:

O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the United States or Canada)
(707) 829-0515 (international or local)
(707) 829-0104 (fax)

There is a web page for this book, which lists errata and any additional information. You can access this page at:

http://www.oreilly.com/catalog/cisiosnut2/

To comment or ask technical questions about this book, send email to:

For more information about books, conferences, Resource Centers, and the O’Reilly Network, see the O’Reilly web site at:

http://www.oreilly.com

Acknowledgments

As I began to plan the second edition of this book, I proclaimed that this time the writing would be effortless. I reassured everyone that the book would be completed very quickly. Evidently, I had tossed away lessons learned from the previous writing experience.

As it turned out, this edition wasn’t easy or quick. Looking back, this edition proved to be every bit as long a journey as the first one. Now that the journey is over, I’d like to thank the people who helped me along the way.

I wish to thank my editors for their heroic efforts. For the first edition, Mike Loukides performed a great deal of work and provided fantastic guidance. Without him, this book would not exist today. For the second edition, I owe editor Deb Cameron a tremendous amount of gratitude. Besides being a terrific editor, she displayed a depth of patience when faced with my seemingly natural ability for procrastination. Without her help and hard work, this second edition would never have been completed.

I’d like to thank all the reviewers from the first edition: Terry Slattery, Scott Ballew, Kevin Kelleher, Kennedy Clark, Val Pavlichenko, and Duke Meesuk. For the second edition, new reviewers provided invaluable feedback and deserve my thanks: Trey McMahon, Kevin Dooley, Ian J. Brown, and Theodore Wallingford. You guys went above and beyond the call of duty.

I’d like to thank my wife Peggy. Once again, she provided moral support. And she had to listen to me say, countless times, “I have to go work on the new book,” which she probably found significantly more irritating than before. Also, she had the added strenuous task of watching our beautiful little daughter while I wrote this edition.

Finally, I need to rectify a glaring omission from the acknowledgments in the first edition. I’d like to thank my parents, George and Gail Boney. Not only did they tolerate me for the last thirty-three years, but they provided an endless amount of support, which would be too much to quantify and impossible to repay.

Get Cisco IOS in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.