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 massivethere'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 commandsyields 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 IOSsuch 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 madesuch 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 hereit'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, ). 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 (). 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:
ItalicUsed 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.