HIGH PERFORMANCE
SWITCHES AND ROUTERS
H. JONATHAN CHAO and BIN LIU
HIGH PERFORMANCE
SWITCHES AND ROUTERS
HIGH PERFORMANCE
SWITCHES AND ROUTERS
H. JONATHAN CHAO and BIN LIU
Copyright © 2007 by John Wiley & Sons, Inc., All rights reserved.
Published by John Wiley & Sons, Inc., Hoboken, New Jersey
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any
means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under
Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the
Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center,
Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at
www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions
Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201)
748-6008, or online at http://www.wiley.com/go/permission.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in
preparing this book, they make no representations or warranties with respect to the accuracy or completeness of
the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a
particular purpose. No warranty may be created or extended by sales representatives or written sales materials.
The advice and strategies contained herein may not be suitable for your situation. You should consult with a
professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other
commercial damages, including but not limited to special, incidental, consequential, or other damages.
For general information on our other products and services or for technical support, please contact our Customer
Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax
(317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be
available in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com.
Library of Congress Cataloging-in-Publication Data.
Chao, H. Jonathan, 1955-
High performance switches and routers / by H. Jonathan Chao, Bin Liu.
p. cm.
ISBN-13: 978-0-470-05367-6
ISBN-10: 0-470-05367-4
1. Asynchronous transfer mode. 2. Routers (Computer networks)
3. Computer network protocols. 4. Packet switching (Data transmission)
I. Liu, Bin. II. Title.
TK5105.35.C454 2007
621.382
2006026971
16- -dc22
Printed in the United States of America.
10 9 8 7 6 5 4 3 2 1
CONTENTS
PREFACE
ACKNOWLEDGMENTS
1
INTRODUCTION
1.1
1.2
1.3
1.4
1.5
1.6
T640 TX-Matrix / 9
Carrier Routing System (CRS-1) / 11
Architecture of the Internet: Present and Future / 2
The Present / 2
1.1.1
1.1.2
The Future / 4
Router Architectures / 5
Commercial Core Router Examples / 9
1.3.1
1.3.2
Design of Core Routers / 13
IP Network Management / 16
1.5.1
1.5.2
1.5.3
Outline of the Book / 19
Network Management System Functionalities / 16
NMS Architecture / 17
Element Management System / 18
2
IP ADDRESS LOOKUP
2.1
2.2
Overview / 25
Trie-Based Algorithms / 29
2.2.1
2.2.2
Binary Trie / 29
Path-Compressed Trie / 31
xv
xvii
1
25
v
vi
CONTENTS
Level Compression Trie / 35
Lulea Algorithm / 37
Tree Bitmap Algorithm / 42
Tree-Based Pipelined Search / 45
Binary Search on Prefix Lengths / 47
Binary Search on Prefix Range / 48
2.2.3 Multi-Bit Trie / 33
2.2.4
2.2.5
2.2.6
2.2.7
2.2.8
2.2.9
Hardware-Based Schemes / 51
2.3.1
2.3.2
2.3.3
2.3.4
2.3.5
2.3.6
IPv6 Lookup / 67
2.4.1
2.4.2 A Folded Method for Saving TCAM Storage / 67
IPv6 Lookup via Variable-Stride Path and Bitmap
2.4.3
Compression / 69
DIR-24-8-BASIC Scheme / 51
DIR-Based Scheme with Bitmap Compression (BC-16-16) / 53
Ternary CAM for Route Lookup / 57
Two Algorithms for Reducing TCAM Entries / 58
Reducing TCAM Power – CoolCAMs / 60
TCAM-Based Distributed Parallel Lookup / 64
Characteristics of IPv6 Lookup / 67
2.3
2.4
2.5
Comparison / 73
3
PACKET CLASSIFICATION
77
3.1
3.2
3.3
3.4
Introduction / 77
Trie-Based Classifications / 81
Hierarchical Tries / 81
3.2.1
3.2.2
Set-Pruning Trie / 82
Grid of Tries / 83
3.2.3
Extending Two-Dimensional Schemes / 84
3.2.4
3.2.5
Field-Level Trie Classification (FLTC) / 85
Geometric Algorithms / 90
3.3.1
3.3.2
3.3.3
3.3.4
3.3.5 Area-Based Quadtree / 95
3.3.6
3.3.7
Heuristic Algorithms / 103
3.4.1
3.4.2
Background / 90
Cross-Producting Scheme / 91
Bitmap-Intersection / 92
Parallel Packet Classification (P2C) / 93
Hierarchical Intelligent Cuttings / 97
HyperCuts / 98
Recursive Flow Classification / 103
Tuple Space Search / 107