Supplemental files and examples for this book can be found at http://examples.oreilly.com/9780596527228/. Please use a standard desktop web browser to access these files, as they may not be accessible from all ereader devices.
All code files or examples referenced in the book will be available online. For physical books that ship with an accompanying disc, whenever possible, weve posted all CD/DVD content. Note that while we provide as much of the media content as we are able via free download, we are sometimes limited by licensing restrictions. Please direct any questions or concerns to .
Preface
Cicso routers are nearly ubiquitous in IP networks. They are extremely flexible and reliable devices. The number and variety of features grows with each new release of the Internetwork Operating System (IOS). And while Cisco Press and several other publishers supply excellent documentation of these features both online and in a variety of books, it is often difficult to know when, why, and how to use these features. There are often many different ways to solve any given networking problem using Cisco devices. Some of these solutions are clearly more effective than others.
The most pressing question in the mind of you, the network engineer, is which of the many potential solutions is the most appropriate for your particular situation. And once you have decided to use a particular feature, the next question is how to actually implement it. Unfortunately, the feature documentation that describes a particular command or feature frequently does very little to answer either of these questions.
Indeed, there are many cases in which the Cisco IOS and documentation offers solutions that will make the network extremely difficult to support in the long term. These solutions are legitimate in odd special situations, but we strongly believe that they should be avoided in most production networks. In some cases this is because there are features that open potentially serious security holes in their default modes. In other cases, there are features that can render the network exceedingly difficult to manage effectively (policy-based routing is the classic example of this problem). Everybody who has worked with Cisco routers for any length of time has at one time or another had to ask their friends and co-workers for example router configuration files that show how to actually solve a common problem. A good working configuration example can often save huge amounts of time and frustration when implementing a feature that youve never used before. This is often true even when you already understand the theory behind this feature. This is why we have written this book.
We dont intend the Cisco IOS Cookbook to replace the detailed feature documentation included in books like Cisco IOS in a Nutshell, Second Edition, by James Boney (OReilly), or information available on Ciscos web site (http://www.cisco.com). We dont have the space to tell you in detail about how particular protocols actually work. This is information that you can find in places like the Internet Engineering Task Force (IETF) Request for Comment (RFC) documents, as well as a wide variety of books.
Instead, this book is a complement to those sources of information. They will tell you things like what a routing protocol is, how it works, and which command turns it on. We will help you select the right routing protocol and configure it in the most efficient way for your network.
This book includes a collection of sample router configurations and scripts that we have found useful in real-world networks. It also includes, wherever possible, our advice on what features to use in which situations and how to use them most effectively. There are many common mistakes that we have seen before (although we rarely make mistakes ourselves), and we want to help you to avoid making these same mistakes yourself.
Whats New in This Edition
The first important difference between the first and second editions of this book is visible right on the cover: we changed the title from Cisco Cookbook to Cisco IOS Cookbook . We had two main reasons for making this change. First, its more accurate. Cisco has several different product lines with completely different configuration interfaces. This book just covers the Cisco Internetwork Operating System (IOS), the software that runs on most of Ciscos routers and switches. It doesnt cover PIX or ASA firewall configuration or content switching or Ciscos Intrusion Detection Systems (IDS), for example.
The second reason for the change is that somebody might one day want to write a Cisco firewall or content switching or IDS cookbook. In fact, several readers have written to us asking for such things, although having just completed the marathon process of updating this book, neither of us feels a burning desire to undertake such a project right away.
For the second edition, we had two main goals. The first was to update the information for the first edition so that it now reflects IOS Version 12.4. And our second goal was to add some of the new topics, like MPLS and IPv6, which have become more relevant since the first edition was published. Many of these ideas came from reader suggestions. However, Cisco rarely deletes features from its software when it creates a new version, so we have also retained most of the content from the first edition of this book.
This means that much of the content in this book is also relevant to lower IOS versions. We have tried to make it clear when certain features were introduced, or if they are only available with certain IOS feature sets.
In each chapter, whenever there were relevant and useful new features, we have added new recipes showing how to use these features effectively. And when there were modifications to existing features, we have added information to the existing recipes.
We have also written four new chapters on topics that either were requested by readers, or that we felt were interesting and important. The new chapters cover IP Mobility, IP Version 6, MPLS, and Security, respectively.
In all, this edition contains 89 entirely new recipes, and we have deleted two old ones, one because we didnt feel it was still the best solution to the problem, and the other because it made sense to absorb its content into another recipe. We have made significant updates to existing recipes in every chapter, mostly to describe useful new options to existing commands.
We welcome feedback from our readers. If you have comments, suggestions, or ideas for other recipes or topics that youd like to see covered, please let us know. Just as we did with this edition, if there are additional future editions of the Cisco IOS Cookbook , we will include any suggestions that we think are especially useful. You can reach us at or ijbrown@hotmail.com .
Organization
As the name suggests, the Cisco Cookbook is organized as a series of recipes. Each recipe begins with a problem statement that describes a common situation that you might be faced with. After each problem statement is a brief solution that shows a sample router configuration or a script that you can use to resolve this particular problem. Then we turn to a discussion section where we describe the solution, how it works, and when you should or should not use it.