Tcl Scripting for Cisco IOS
Ray Blair, CCIE No. 7050
Arvind Durai, CCIE No. 7016
John Lautmann
Cisco Press
800 East 96th Street
Indianapolis, IN 46240
Tcl Scripting for Cisco IOS
Ray Blair, Arvind Durai, John Lautmann
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 information 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:
Blair, Ray, 1965
Tcl scripting for Cisco IOS / Ray Blair, Arvind Durai, John Lautmann.
p. cm.
ISBN-13: 978-1-58705-945-2 (pbk.)
ISBN-10: 1-58705-945-2 (pbk.)
1. Tcl (Computer program language) 2. Cisco IOS. I. Durai, Arvind.
II. Lautmann, John. III. Title.
QA76.73.T44B58 2010
005.13'3dc22
2010015179
ISBN-13: 978-1-58705-945-2
ISBN-10: 1-58705-945-2
Warning and Disclaimer
This book is designed to provide information about the Tcl scripting for Cisco IOS Software. 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.
Corporate and Government Sales
The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content 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 regarding 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 greatly appreciate your assistance.
Publisher: Paul Boger
Associate Publisher: Dave Dusthimer
Executive Editor: Brett Bartow
Managing Editor: Sandra Schroeder
Senior Development Editor: Christopher Cleveland
Project Editor: Mandie Frank
Editorial Assistant: Vanessa Evans
Cover Designer: Sandra Schroeder
Indexer: Tim Wright
Cisco Representative: Eric Ullanderson
Cisco Press Program Manager: Anand Sundaram
Copy Editor: Keith Cline
Proofreader: Sheri Cain
Technical Editors: Joe Marcus Clarke, Greg S. Thompson
Book Designer: Louisa Adair
Composition: Mark Shirar
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
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 Cisco Store are service marks; and Access Registrar, Aironet, AsyncOS, Bringing the Meeting To You, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, CCVP, Cisco, the 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)
About the Authors
Ray Blair, CCIE No. 7050, is a Vertical Solutions Architect and has been with Cisco Systems for more than 10 years, working primarily with large network designs. He has almost 22 years of experience with designing, implementing, and maintaining networks that have included nearly all networking technologies. During the early stages of his career, he wrote many applications using Assembly language and C. Mr. Blair maintains three CCIE certifications in Routing and Switching, Security, and Service Provider. He is also a Certified Information Systems Security Professional (CISSP) and coauthor of the Cisco Secure Firewall Services Module book.
Arvind Durai, CCIE No. 7016, is an Advanced Services Technical Leader for Cisco Systems. His primary responsibility in the past 10 years has been in supporting major Cisco customers in the enterprise sector, including financial, manufacturing, e-commerce, state government, utility (smart grid networks) and health-care sectors. Some of his focuses have been on security, multicast, network virtualization, and he has authored several white papers and design guides in various technologies. He has leveraged Embedded Event Manager (EEM) and Tool Command Language (Tcl) scripts in various customer designs. Mr. Durai maintains two CCIE certifications: Routing and Switching, and Security. He holds a Bachelor of Science degree in electronics and communication, a masters degree in electrical engineering (MS), and masters degree in business administration (MBA), and is a coauthor of
Next page