Tải bản đầy đủ (.pdf) (754 trang)

Policy and Protocols for Multivendor IP Networks

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (5.94 MB, 754 trang )

Walter J. Goralski
Juniper
®
and
Cisco

Routing
Policy and Protocols for
Multivendor IP Networks
TEAMFLY























































Team-Fly
®


Juniper
®
and Cisco

Routing
Policy and Protocols for
Multivendor IP Networks

Walter J. Goralski
Juniper
®
and
Cisco

Routing
Policy and Protocols for
Multivendor IP Networks
Publisher: Robert Ipsen
Editor: Carol Long
Developmental Editor: Scott Amerman
Associate Managing Editor: John Atkins
Text Design & Composition: Wiley Composition Services
Designations used by companies to distinguish their products are often claimed as trade-
marks. In all instances where Wiley Publishing, Inc. is aware of a claim, the product names

appear in initial capital or
ALL CAPITAL LETTERS
. Readers, however, should contact the appro-
priate companies for more complete information regarding trademarks and registration.
This book is printed on acid-free paper. ∞
Copyright © 2002 by Walter J. Goralski. All rights reserved.
Published by Wiley Publishing, Inc., Indianapolis, Indiana
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 Rose-
wood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470. Requests to the Pub-
lisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc.,
10475 Crosspointe Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, E-mail:

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, inci-
dental, consequential, or other damages.
For general information on our other products and services 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 books.
Library of Congress Cataloging-in-Publication Data:
ISBN: 0-471-21592-9
Printed in the United States of America
10 9 8 7 6 5 4 3 2 1
Acknowledgments xv
Introduction xvii
Part 1 The Internet and the Router 1
Chapter 1 A Brief History of the Internet and Router 3
The Pre-Web Internet 6
The Web Comes to Town 13
The Birth of the Web 15
The Web Explodes 19
The Birth of the ISPs 22
The Router’s Role 26
Chapter 2 TCP/IP Survivor’s Guide 33
Internet Protocol Suite: An Overview 34
TCP/IP Layers and the Client/Server Model 35
The Network Layer 38
The IP Layer 40
The Transport Layer 43
The Application Layer 47
Putting It All Together 50
Key TCP/IP Applications 51
FTP (File Transfer Protocol) 51
Telnet (Remote Login) 53
DNS (Domain Name Service) 54
SMTP (Simple Mail Transfer Protocol)
and Post Office Protocol (POP) 56
Trivial File Transfer Protocol (TFTP)

and Boot Protocol (BOOTP) 58
Contents
v
Network File System (NFS) 60
Simple Network Management Protocol 62
X Windows 64
Multimedia and Multicast 65
MIME (Multipurpose Internet Mail Extensions) 66
Multicast and the Multicast Backbone 69
ARP and ICMP 70
ARP Protocols 71
Internet Control Message Protocol (ICMP) 73
Chapter 3 IP Addressing and Routing 77
The IP Address 77
Private and Martian IP Addresses 82
Reading IP Addresses 83
Direct and Indirect Routing 83
Direct Delivery or No Routing Required 84
The IP Router and Indirect Delivery 87
Maximum Transmission Unit (MTU) 92
Fragmentation and Reassembly 95
Limitations of IPv4 98
Features of IPv6 100
The IPv6 Header Structure 103
IPv6 Header Changes 104
IPv6 Addresses 106
The IPv6 Address Prefix 107
IPv4 Packet Processing 109
IPv6 Packet Processing 110
The IPv4/IPv6 Transition: Terminology 110

IPv4/IPv6 Device Compatibility 111
Deploying IPv6 112
Chapter 4 Subnets and Supernets 115
IP Addressing and the Internet 116
IP Subnetting 121
Where IP Addresses Come From 122
The Basics of Subnetting 123
More Advanced Subnetting 127
Classless Interdomain Routing (CIDR) 130
VLSM and the Longest-Match Rule 135
The Longest-Match Rule 137
Radix Tree Representation 138
Aggregation 140
Aggregates on the Internet 142
Aggregates and Routing Policy 148
IPv6 Prefixes 150
Summary: The Five Roles for Routing Policy 152
vi Contents
Chapter 5 Cisco Router Configuration 155
Cisco Router Architecture 157
Cisco Hardware 158
Cisco Memory 159
RAM/DRAM 160
NVRAM 160
Flash Memory 160
ROM 161
Cisco Router Access 161
Cisco’s Router Operating System 163
Cisco Router Products 164
SOHO Routers 165

Midrange Routers 166
Backbone Routers 166
Cisco’s Hierarchical Vision 168
Configuring Cisco Routers 171
Getting Started 172
Operating Modes 172
Configuration Files 173
Cisco Configuration Example 178
Initial Setup 179
Loopback, Static Routes, and an Aggregate Route 184
Setting the Loopback IP Address 184
Adding Static Route Addresses 185
Setting the Aggregate 188
Viewing the Results 191
More Cisco Configuration Tools 193
Chapter 6 Juniper Networks Router Configuration 195
Router Architecture: Juniper Networks 196
Juniper Networks Hardware: An Overview 197
The Routing Engine (RE) 200
Packet Forwarding Engine (PFE) 200
Physical Interface Card (PIC) 201
Flexible PIC Concentrator (FPC) 201
The Router Midplane 202
The Control Board 202
Packet Flow 203
Juniper Networks Router Access 205
Juniper Network’s Router Operating System 206
Juniper Networks Router Products 209
M40 210
M20 211

M160 211
M5/M10 213
Contents vii
Configuring Juniper Networks Routers 214
Getting Started 214
“Operating” Modes 215
Configuration Files 218
Juniper Networks Configuration Example 219
Initial Setup 221
Loopback, Static Routes, and Aggregate Routes 226
Setting the Loopback IP address 226
Adding Static Route Addresses 227
Setting the Aggregate 228
Viewing the Results 232
More Juniper Networks Configuration Tools 235
Part 2 Interior Routing Protocols 237
Chapter 7 Routing Information Protocol (RIP) 239
Distance-Vector Routing 240
Simple Hop-Count Routing 242
Broken Links 245
Distance-Vector Consequences 250
Split Horizon 251
Triggered Updates 252
RIPv1 253
RIPv1 Limitations 259
RIPv2 260
Authentication 262
Subnet Masks 264
Next-Hop Identification 264
Multicasting 266

RIPng for IPv6 266
Interior Gateway Routing Protocol (IGRP) and
Enhanced IGRP (EIGRP) 270
IGRP 270
EIGRP 272
Chapter 8 Configuring RIP 273
Fast Ethernet for Multivendor Connectivity 275
RIP and Static Routes 275
Cisco RIP Configuration 276
Cisco Fast Ethernet 276
Cisco Access Router RIPv1 Configuration 277
Viewing the Results for RIPv1 280
A Routing Policy to Redistribute Static Routes 282
Juniper Networks RIP Configuration 284
Juniper Access Router RIPv2 Configuration 284
Viewing the RIPv2 Results 287
The Send-Statics Routing Policy 289
A Note on RIPv1 Juniper Network Router Operation 291
viii Contents
Chapter 9 Open Shortest Path First (OSPF) 293
Link States and Shortest Paths 295
What OSPF Can Do 297
The Theory of OSPF 299
OSPF Network Types 303
OSPF Areas and Router Types 305
OSPF Area Types 305
Designated Router (DR) and Backup Designated Router (BDR) 308
OSPF Packets 309
The Hello Packet 310
The Database Description Packet 312

The Link-State Request Packet 313
The Link-State Update Packet 314
The Link-State Acknowledgment Packet 315
Database Synchronization and Neighbor States 316
OSPF LSA Types 318
The Router LSA 319
The Network LSA 322
The Network Summary and ASBR Summary LSAs 323
The AS External LSA 324
The NSSA External LSA 325
OSPF for IPv6 325
OSPF in the Real World 327
Chapter 10 Configuring OSPF 331
Basic OSPF Backbone Configuration 335
Viewing the Routing Table 336
ASBR0 Cisco Configuration 338
Nonbackbone, Nonstub Area Configuration 341
Viewing the Routing Table and Link-State Database 342
ABR1 Cisco Configuration 348
Stub Area Configuration 351
Viewing the Routing Table and Link-State Database 353
ABR2 Stub Cisco Configuration 357
Total Stub Area Configuration 360
Viewing the Routing Table and Link-State Database 362
ABR3 Total Stub Cisco Configuration 365
NSSA Configuration 367
Viewing the Routing Table and Link-State Database 370
ASBR4 NSSA Cisco Configuration 373
Chapter 11 Intermediate System–Intermediate System (IS-IS) 377
The Attraction of IS-IS 378

My Protocol’s Better Than Yours 379
IS-IS and OSPF 380
Similarities between IS-IS and OSPF 381
Contents ix
TEAMFLY






















































Team-Fly
®


Differences between IS-IS and OSPF 381
Areas 382
Route Leaking 383
Network Addresses 385
Network Types 387
Designated Intermediate System (DIS) 387
LSP Handling 388
Metrics 389
IS-IS PDUs 389
Type/Length/Value (TLV) 391
IS-IS Hello PDU 394
IS-IS for IPv6 402
Chapter 12 Configuring IS-IS 405
Basic IS-IS Area 0001 Configuration 409
Viewing the Routing Table 413
L2-Only Cisco Configuration 415
IS-IS Area 0002 Configuration 418
L1/L2_2to1 Configuration 418
L1_only2A Configuration 420
L1_only2B Configuration 421
Viewing the Routing Table and Link-State Database 423
L1_only2A Routing Table and Link-State Database 423
L2_only2B Routing Table and Link-State Database 425
L1/L2_2to1 Routing Table and Link-State Database 427
L1/L2_2to1 Cisco Configuration 431
IS-IS Area 0003 Configuration 435
L1/L2_3to1 Configuration 435
L1_only3A and L1_only3B Configuration 436
Viewing the Routing Table and Link-State Database 437

L1/L2_3to1 Routing Table and Link-State Database 439
L1_only3A and L1_only3B Routing Table and
Link-State Database 441
L1_only3B Cisco Configuration 443
Linking L1_only2B and L1_only3A 445
Part 3 Exterior Routing Protocols 449
Chapter 13 Border Gateway Protocol (BGP) 451
BGP Is Born 453
BGP as a Path Vector Protocol 454
IBPG and EBGP 455
BGP “Next Hops” and IGP Next Hops 457
IBGP and the IGP 458
Other Types of BGP 462
BGP Attributes 463
The ORIGIN Attribute 465
The AS_PATH Attribute 465
x Contents
The NEXT_HOP Attribute 465
The LOCAL_PREF Attribute 466
The MULTI_EXIT_DISC (MED) Attribute 466
The ATOMIC_AGGREGATE and AGGREGATOR Attributes 467
The COMMUNITY Attribute 468
The ORIGINATOR_ID and CLUSTER_LIST Attributes 469
BGP Route Selection 470
BGP as a Policy-Driven Routing Protocol 472
BGP Scaling 473
Route Reflectors 474
Confederations 476
Route Damping 477
BGP Message Types 479

BGP Message Formats 480
The Open Message 480
The Update Message 481
The Notification Message 484
Chapter 14 Configuring BGP 487
Basic BGP Configuration 492
Viewing the Routing Table 494
Earth Cisco Configuration 496
IBGP Mesh Configuration 498
Solving the BGP Next Hop Issue 506
Next Hop Self on Juniper Networks Router 507
Cisco IBGP Configuration 509
Adding the AS 64777 Router 512
BGP Route Reflectors 515
BGP Route Reflectors on Juniper Networks 515
A Cisco Route Reflector 520
BGP Confederations 522
A Cisco Confederation Router 525
Summary 527
Part 4 IGP Routing Policies 529
Chapter 15 Routing Policy 531
Cisco Routing Policy 534
Redistribution 536
Route Maps 538
Distribution Lists 540
Prefix Lists 541
Access Lists 542
A Few Routing Policy Examples 543
Juniper Networks Routing Policy 545
Structure of a Juniper Networks Routing Policy 549

Match Conditions 551
Actions 553
Contents xi
Route Filter Match Types 556
Routing Policy Notes 560
Some Routing Policy Examples 561
Regular Expressions and Routing Policy 563
Chapter 16 IGP Routing Policies 565
OSPF Routing Policies 566
Setting Metrics on Redistributed Routes 566
Type 1 and Type 2 External Routes 568
Cisco OSPF External Types 571
Juniper Networks OSPF External Types 571
OSPF Area Range 572
Cisco Area Range 573
Juniper Networks Area Range 574
Changing OSPF Administrative Distance/Protocol Preference 575
Gracefully Cutover OSPF to IS-IS 576
Cisco OSPF to IS-IS Cutover 578
Juniper Networks OSPF to IS-IS Cutover 579
IS-IS Routing Policies 579
Juniper Networks Router IS-IS Metrics 580
IS-IS Route Leaking 581
Route Leaking Mechanisms 585
Route Leaking, TLVs, and Metrics 588
Configuring Route Leaking 590
Cisco Route Leaking 590
Juniper Networks Route Leaking 593
IS-IS Area Range (Summary Address) 594
Part 5 EGP Routing Policies 597

Chapter 17 Basic BGP Routing Policies 599
Aggregation 600
Cisco Aggregation 602
Juniper Networks Aggregation 604
The Origin and MED Attributes 608
The Origin Attribute 609
Using the Origin Attribute 611
Routing Policies for the Origin Attribute 614
Cisco to Juniper Networks 615
Juniper Networks to Cisco 616
The Policy for AS 65001 617
The MED Attribute 618
Cisco MED Routing Policy 622
Juniper Networks MED Routing Policy 623
MEDs and Aggregates 624
xii Contents
Chapter 18 AS Path and Local Preference 627
The AS Path Attribute 629
Removing Private AS Numbers 631
Routing Policy for the AS Path 634
The Cisco AS Path Routing Policy 634
The Juniper Networks AS Path Routing Policy 635
AS Path Regular Expressions 635
The Null AS Path 637
Cisco AS Path Regular Expressions 638
Juniper Networks AS Path Regular Expressions 642
The Local Preference Attribute 647
Cisco Routers and Local Preference 653
Juniper Networks Routers and Local Preference 654
Chapter 19 BGP Community and Route Damping 657

The BGP Community Attribute 658
Well-Known Communities 659
Using Communities to Represent Local Preference 664
Communities and Transit Traffic 665
Communities on a Cisco Router 666
Cisco Community Regular Expressions 669
Communities on a Juniper Networks Router 670
Juniper Networks Community Regular Expressions 673
Route Damping 676
How Route Damping Works 679
Cisco Route Damping 682
Juniper Networks Route Damping 685
Acronyms 689
Bibliography 697
Index 701
Contents xiii

Acknowledgments
xv
At this point in my career, I find myself working with an incredible array of
people of pure genius and inspiration. My employer, Juniper Networks, has
provided me with a home unlike any I have found in a career spanning more
than 30 years. I feel truly lucky to be here.
I would like to thank my employer, Juniper Networks, and especially Scott
Kriens and Pradeep Sindhu, for creating the type of intellectual work environ-
ment where personal growth is always encouraged and for nurturing a climate
that creates a quest for knowledge. I owe special thanks to Matt Kolon, who
brought me on board, Todd Warble, my manager, and Scott Edwards for
respecting my ideas and never failing to support my efforts.
I owe a great deal to individuals I have had contact with over the years who

took time to show me their work and correct my numerous misunderstand-
ings of what at times seemed beyond my comprehension. I must especially
mention some of my fellow developers, instructors, and associates: Tim
Brown, Jeff Doyle, Paul Goyette, Alan Gravett, Hannes Gredler, Pete Moyer,
Harry Reynolds, Scott Robohn, Jason Rogan, Derek Rogillio, Chris Summers,
and Tom Van Meter. All took the time to answer my frequent questions and
provide me with key sources of information when I needed it. And Matt Kolon
even provided a router when I needed it (but I got the upgrade!).
Some others helped directly with the book. Patrick Ames had the vision to
propose this series in the first place, Aviva Garrett looked at the early drafts
and pronounced them up to Juniper Networks standards (a judgment I
seriously worried about), Peter Lundquist shared key findings of his own on
Cisco/Juniper Networks router interoperability and configurations, Joe Sori-
celli wrote a whole course on routing policy that I contributed to and formed
the basis for the later chapters in this book, and Richard Salaiz read the first
draft and reviewed the content. Outside of Juniper Networks, William Caban-
Babilonia was a key source of support and information, and Tony Martin
provided a close reading of the first draft.
On the publishing side at Wiley, Margaret Eldridge has been a great sup-
porter and editor. The production editor, John Atkins, supported the process
from start to finish with efficiency.
Finally, my family and inner circle continue to provide support as well.
Camille Obert, the love of my life, has stood by me throughout the writing
effort. Sometimes she sensed my distress and suggested a late night of writing
or a Saturday of router lab time without me even having to ask (is she a keeper,
or what?). Clay Obert has become the “one more child” I always wanted. Kay
Obert welcomed me into the fold and made me feel right at home. Camille’s
sister and husband, Kim and Iako Tsoukalas, have provided welcome relief
from the stress and strain of the writing grind. My children, Christopher,
Alexander, and Arianna, are now used to having a writer for a father. Thank

you all.
xvi Acknowledgments
It seems appropriate to launch this initial volume in this series of texts on the
multivendor aspects of routing and the Internet with a more comprehensive
introduction than might be expected in later volumes in the series. This will
establish the general philosophy and approach of the texts and provide the
reader with a context for determining the purpose of each of the volumes. For
instance, this volume on routing policy is not just about routing protocols, but
how routers use various configurable policies to determine precisely which
routes are accepted by the router or advertised to (shared with) other routers. In
keeping with the multivendor theme of the series, once the role of a particular
routing policy is established in a chapter, the actual syntax used to implement
that routing policy in the configuration languages of both Cisco and Juniper
Networks routers is presented. So a chapter and section on prepending AS
Path information with the BGP AS Path attribute is followed by sections on
prepending AS Path information in both the Cisco and Juniper Networks
router environment.
This brief section has already introduced some key terms such as policies and
advertised. Several other key terms are used over and over again in this book.
All of these terms are more fully explained when first introduced. Be aware
that this is not a book about routing protocol. Nevertheless, enough of the oper-
ational details of all the major routing protocols such as OSPF, IS-IS, and BGP
are given to allow the reader to appreciate what is being done to the routing
protocols through the use of routing policies. The emphasis throughout this
book is on the routing policy and in particular those features of the routing
policy that add to, delete from, or modify the routing information normally
shared by routers when no routing policies are in place.
Introduction
xvii
Sometimes routing policy is treated as having almost the same meaning as

policy-based routing, but in this book we distinguish the two terms. There are
no real official definitions of these terms, so this is the place, right up front, to
be clear about how the terms are used in this book. Policy-based routing, as
normally defined and used, means the local application of additional packet infor-
mation, such as the source address, to influence how a packet is routed to the next-
hop router. This might be done, for instance, to selectively forward a particular
customer’s packets to one transit ISP or another, depending on circumstances,
or for quality of service (QoS) considerations, such as finding and setting some
packet’s type of service (TOS) header bits for preferential treatment down-
stream, or for potential cost savings by routing bulk or interactive traffic over
certain links. There might even be more reasons to base routing on one policy
or another.
Whatever the reason, the key is that policy-based routing usually concerns
how a packet is handled locally, in conformance to a locally defined policy. In
contrast, in this book, routing policy applies not so much to how packets are
routed locally (although that is the end result, of course), but how routing
information is distributed and used by the routing protocols beyond the local
router. So policy-based routing has a more restricted, local scope, and routing
policy has a more general, wider scope than just the local router. In fact, rout-
ing policy is most effective when formulated and enforced over as wide a
scope and among as many routers as possible, whether an OSPF area, an IS-IS
level, a whole AS, or even between ISP peers.
All of these terms and ideas are fully discussed in this book. The point here
is that every router vendor today has a routing policy framework (a set of tools)
in place for configuration purposes that enables the construction and use of a
routing policy that can be used for, among other things, policy-based routing of
packets through the collection of routers. This is how these terms are defined
for the purposes of this book and how the concepts relate to each other. The
emphasis here is on the routing policy itself, although the related concepts will
play a role as well.

Overview of the Book and Technology
Books about Internet routing protocols and the role that these routing proto-
cols play on the Internet have been around for a while. But other books tend to
play up the nuts-and-bolts aspects of the routing protocols such as message
exchanges and protocol packet structures. So there are long chapters on the
low-level functioning of OSPF Link-State Advertisements (LSAs), IS-IS Type-
Length-Value (TLV) extensions, and BGP attributes, but little information
about how network administrators use these routing protocols on the Internet
xviii Introduction
today. A key aspect of the way these routing protocols interoperate and inter-
act today is the concept of a routing policy. A routing policy is just a set of rules
that establish the ways that a route (today most often called a prefix) is used
when learned by the router and then passed on (advertised) to other routers.
Yet information about the formulation and use of these routing policies is quite
hard to come by.
For example, the index to a major and standard book on BGP references only
four pages concerning routing policies out of a total page count of almost 500.
A well-known and standard text on OSPF is no better: eight pages listed in the
index out of almost 350 in the book. And these texts can be considered as treat-
ing routing policy very well when it comes to some other texts. One standard
treatment of IS-IS is typical of these books: one solitary page on policy routing
out of about 500.
Now, it is true enough that routing policy plays little role in IGP routing pro-
tocols such as OSPF and IS-IS, especially when each IGP is considered in isola-
tion. But routing policy has an absolutely crucial role in BGP, and considering
that on the Internet today no IGP is ever used in isolation without at least some
interaction with BGP, routing policy should still be a topic even when IGPs are
the focus of the discussion.
In fairness, the goal of many of these books is not routing policy or use of the
routing protocols, but just a detailed (and often very detailed) examination of

the role of every byte and every bit in every packet and every message type in
the routing protocol. But even one huge book that explores the operational
aspects of the routing protocols, a book that emphasizes the actual use of the
routing protocols, devotes little more than 20 pages to routing policy out of
more than 1,000. Many of the other books in this field are written by academ-
ics or router vendor gurus that apparently have little time to spend in a lab
actually configuring routers and seeing how they behave when distributing
routing information, or finding out how the ISPs actually use routing proto-
cols and routing policy. Most of these other books also seem to be embedded
in “Cisco-speak,” the assumption being that the reader will only be using a
Cisco router to implement any of these protocols. For instance, one BGP book’s
section on route stability makes certain Cisco-specific actions seem like key
features of the BGP specification. When many authors say “BGP,” they often
mean “Cisco’s implementation of BGP,” although this is rarely made clear to
the reader.
This book corrects these situations in several ways. First, the emphasis is not
so much on how the routing protocols exchange messages or the format of the
protocol message fields, although that information is, of course, present. The
emphasis in this book (and series) is on configuring the routing protocols to do
what needs to be done, either to attach a site to an ISP, to allow a router to
participate in an ISP backbone, or to connect the router to other ISPs’ routers.
Introduction xix
TEAMFLY























































Team-Fly
®

There is more than enough information in this book on IS-IS and OSPF in gen-
eral, but the emphasis is on BGP as the most important routing protocol on the
Internet today. Second, there are numerous real-world examples showing
the configuration parameters in action in a vendor-independent fashion. For
instance, when we discuss a BGP feature such as route damping, the general
topic is followed by a section on how to configure the key damping parame-
ters on a Cisco router. Then there is a section on how to configure the same
behavior on a Juniper Networks router. At each step, comparisons are made,
but not in a judgmental fashion. Including information on only Cisco and
Juniper Networks routers is in no way intended as a critical judgment on other
vendor’s products or methods. The exclusion of router vendors other than

Cisco and Juniper Networks is a decision forced by the demands of time,
resources, and sheer magnitude of the task.
How This Book Is Organized
This book about routing protocols and routing policy addresses not only IGPs
such as IS-IS and OSPF but also the key EGP known as BGPv4. Also addressed
are Cisco implementations of routing policies as well as implementations for
Juniper Networks routers as well. All aspects of routing policy are fully cov-
ered. Despite the recent industry doldrums, the Internet remains a key part of
life around the world. The time for such a volume is clearly here.
This book also demystifies the operation of all routing protocols in general
and BGP in particular. Full attention is paid to details of operation at the lower
levels of the protocols, such as what happens when two BGP routers first inter-
act. But the whole idea is to present a framework for understanding how
routers are gathered into ISP networks and how these networks are combined
into the Internet. It is at this point of creating an internetwork that routing
policy plays a key role.
No other books are available that explain how routing policy works in non-
technical detail and at the same time explain why routing policy technologies
are so important to the Internet today. So far, most of the latest ideas in the
routing policy field have been discussed only in vendor white papers and
technical journals. This book is state-of-the-art subject matter with a multi-
vendor approach. This is a fresh approach to the entire field of routing policy.
This routing policy book is organized as a readable, practical guide rather
than a reference manual. The structure offers a balance between the extreme
technical detail of the vendor reference materials and the high-level overviews
found in the trade press and magazine articles dedicated to other subjects. By
working through the numerous real-world applications and examples, espe-
cially in the later portions of the work, this book reaches readers with a variety
of backgrounds and experience.
xx Introduction

This book has no computations to speak of, other than a few algebraic
formulas to illustrate topics like route damping. And these are represented
graphically as well as in formal mathematical notation.
One final note is needed regarding the scope of the chapters on the routing
protocols and the example networks used to illustrate the main routing proto-
col principles. None of the example networks are intended to exhaustively
explore every aspect of each routing protocol and all of the routing policy pos-
sibilities. To do so would require a book at least twice as large as the present
volume. So there is no mention or configuration of more obscure (but worth-
while) features such as ignoring the attach bit, creating virtual links, or multi-
ple hops for border routers. All of the routing protocol and routing policy
basics are covered, but the size of the book limited the depth to which each
protocol and policy could be explored.
Part 1: The Internet and the Router. These six chapters set the tone
for the rest of the book and series. This part of the book positions the
Internet, Web, the IP packet, and the role of the router (both Cisco and
Juniper Networks routers) so that readers can appreciate the importance
of later topics in the book.
Chapter 1: A Brief History of the Internet and Router. This chapter
sets the stage not only for the whole work but for the whole series.
This is a historical overview of the Internet, with the emphasis on
what has happened since the Web hit town in the 1990s. The empha-
sis, naturally, is on the role of the ISPs and the use of the router today
as the network node of the Internet. The Internet history presented
here is an overview, focusing on the growth of the Internet since
around 1983 rather than the details of the roots of early Internet as
ARPANET. Then the history of the Internet almost merges around
1993 with the history and growth of the Web (then the World Wide
Web). The growth of the Internet and Web spurred the currently con-
tinuing evolution of the router as the key component and network

node of the Internet. Finally, the role of the Internet service providers
(ISPs) themselves is introduced, again in historical perspective.
Chapter 2: TCP/IP Survivor’s Guide. This chapter offers an overview
of the Internet protocol suite, more commonly known as the TCP/IP
stack. The intent is to provide basic information and knowledge that
is assumed in the later chapters. The approach treats the TCP/IP pro-
tocol stack’s lower layers first, meaning the basic frame structures
and transports used for IP packet and routing protocol information
transfer. Next come the Internet protocol suite upper layers, meaning
transport protocols TCP and UDP, as well as the applications that rely
on these and other lower layers to perform their roles. Several adjunct
IP functions such as DNS and ARP are also discussed here. Finally, the
Introduction xxi
basic structure of the IP version 4 (IPv4) packet header is examined.
Although the emphasis throughout most of this book is on IPv4
(simply called IP in this book), the next chapter takes a close look
at the newer IP version 6 (IPv6).
Chapter 3: IP Addressing and Routing. This chapter explores the key
topic of the IP address space. Routers in a very real sense do little more
when they receive a packet than figure out just what to do with an IP
address. The differences between direct routing and indirect routing
are investigated. This chapter also looks at IPv6 addressing and head-
ers. The main topics here are the original classful IP address space, IPv4
as currently implemented using classless IP addressing, and IPv6
addressing.
Chapter 4: Subnets and Supernets. This chapter puts all of the con-
cepts from the previous chapters together. The chapter introduces
the idea of the IP masking to create subnets and supernets and how
routers deal with IP addresses with variable-length network prefixes.
All of the necessary terminology and practices regarding subnets and

supernets are explored, as well as the key topic of variable-length
subnet masking (VLSM). Various forms of IP prefix notation are also
covered in full, especially with regard to IPv6.
Chapter 5: Cisco Router Configuration. This chapter begins with a
discussion of Cisco router architectures, using generic Cisco memory
components as examples. This chapter then introduces the notation
used for the configuration and routing policy examples used in the
rest of the book. The examples in this book assume the simplest case
of router access for configuration purposes: direct terminal console
connection to the router. Other methods of access are briefly discussed,
but not in detail. The normal look and feel of the configuration files
and command-line interfaces for Cisco routers is also shown in this
chapter. The chapter ends with the configuration of a Cisco router for
global and interface parameters, and then a loopback address, some
static routes, and an aggregate route.
Chapter 6: Juniper Networks Router Configuration. This chapter
begins with a discussion of Juniper Networks router architectures
and products, emphasizing Juniper Networks routers’ distinct
hardware-based approach to routing. Access methods for Juniper
Networks routers are discussed, but the examples in this book assume
the simplest case of router access for configuration purposes: direct
terminal console connection to the router. Other methods of access are
briefly discussed, but not in detail. The normal look and feel of the
configuration files and command-line interfaces for Juniper Networks
xxii Introduction
routers is also shown in this chapter. The chapter ends with the
configuration of a Juniper Networks router for global and interface
parameters, and then a loopback address, some static routes, and an
aggregate route.
Part 2: Interior Routing Protocols. These six chapters show the operation

of the leading IGP routing protocols OSPF and IS-IS. Even RIP is covered,
but mostly to show the shortcomings of RIP with regard to current
thinking about what an IGP should and could do. The intent here is to
avoid getting bogged down in the operational details of protocols like
OSPF and IS-IS during the later discussions of IGP routing policies.
Chapter 7: Routing Information Protocol (RIP). This is a chapter
about the first standardized IGP routing protocol, RIP. The chapter
also explains why RIP is not often used today for “serious” Internet
routing. The whole point is to explain why RIP is not used much in
this book, despite the continued use of RIP. The chapter starts with
a look at how RIP functions, and then proceeds to specifically detail
the reasons that RIP should probably be avoided today.
Chapter 8: Configuring RIP. This chapter includes a look at how to
configure RIP and RIPv2 on a Cisco and Juniper Networks routers.
This is done mostly to prepare the reader for the OSPF and IS-IS con-
figurations given later in this part of the book. There is a section on
the use of RIPng for IPv6. Finally, because they are specific to Cisco,
the chapter only includes a note on IGRP/EIGRP, and there is no
detailed treatment of the Cisco IGRP and EIGRP routing protocols
at all in this multivendor book.
Chapter 9: Open Shortest Path First (OSPF). This chapter details the
architecture and operation of OSPF. All aspects of OSPF are explored,
from updates to handshakes, and from areas to subareas. After an
introduction to the origins of OSPF, the chapter investigates the key
concept of OSPF areas, and all aspects of using OSPF as an IGP today.
A short section considers extensions to OSPF for IPv6 use.
Chapter 10: Configuring OSPF. All the details on how to configure
OSPF on Cisco and Juniper Networks routers are examined in this
chapter. First, general configuration steps are given, and then several
specific examples of a Cisco OSPF configuration and a Juniper Net-

works OSPF configuration, both using the same reference network.
Chapter 11: Intermediate System. Intermediate System (IS-IS). This
chapter details the operation of the key components of the IS-IS rout-
ing protocol. The treatment is at the same depth as that for OSPF. So
after an introduction to the origins of IS-IS, the chapter investigates
Introduction xxiii

×